3D Touch
####. Swift 2.2
####. Xcode 7.3
用最简单的方式集成3D Touch:
(1). 快速集成QA
(2). 快速集成Peek。
(3). Pop Gesture太过简单,无需集成,直接实现previewActionItems方法即可
let m1 = ThreeDTouchItemModel(title: "消息", subTitle: "发一条消息", imgName: "news", userInfo: nil)
m1.quickAction = {
//do sth
}
let m2 = ThreeDTouchItemModel(title: "新建", subTitle: "新建一条说说", imgName: "unfinished", userInfo: nil)
m2.quickAction = {
//do sth
}
ThreeDTouch.create([m1,m2])
==========
class MyVC: PeekVC{ }
registerPeek(btn, peekVC: vc)
unRegisterPeek(btn)
removeAllPeek()
tableview一样支持,建议使用普通vc添加tableview即可,然后在cellForIndexPath注册cell即可。