我有一个关于 iOS 推送导航 Controller 的问题。我想在滑动手势上插入 View Controller 。就像在 Snapchat 应用程序中一样:主视图捕获图像。如果您从左向右滑动,Snapchat 消息 View 会平滑地滑动(推送)到主窗口。如果从右向左滑动 > 联系人 View 。如何创建这种导航?非常感谢!
最佳答案
我相信 Snapchat 的做法是通过 UIViewController 包含。本质上,主视图 Controller 包含一个 ScrollView (启用分页)和 3 个 subview Controller (快照、相机和联系人)。他们不使用导航 Controller 在您滑动时显示和弹出 View Controller 。
请参阅有关 View Controller 包含的文档:https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/ImplementingaContainerViewController.html
关于iOS Push UIViewController 像 Snapchat 这样的滑动手势,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26784771/