UISplitViewController 和 UINavigationController
我是 iOS 世界的初学者。 我想要一个基于 UISplitViewController 的应用程序,但是在某些情况下,详细视图上的按钮(即 UINavigationController)将在整个屏幕上打开一个 UI(带有后退按钮,该按钮将返回到 splitViewController)。 唯一的选择(来自苹果的合法选择)是使用 ModalView 进行建模吗?
I'm a beginner in the iOS world.
I would like to have an app that is based on UISplitViewController, however on some cases a button on the detail view (which is UINavigationController) will open a UI on the entire screen (with back button which will take back to splitViewController).
Does the only option (legitimate from apple), is modeling it with ModalView?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定它是否是“HIG友好的”,但是你可以实现一些东西,当用户单击按钮时,你向你的AppDelegate发送一条消息,并告诉它用你的fullScreenViewController交换你的splitViewController在窗口水平。
例如,在您的
AppDelegate.m
中:通过利用相应的
else
语句并加载splitViewController<,可以轻松将该方法转换为“视图切换”方法/代码> 相反。
希望这有帮助。
I'm not sure off the top of my head whether it's 'HIG-friendly', but you could implement something whereby when the user clicks the button, you send a message back to your AppDelegate and tell it to swap your splitViewController with your fullScreenViewController at the window level.
For example, in your
AppDelegate.m
:This method can easily be turned into a 'view switching' method by utilising the corresponding
else
statement and loading thesplitViewController
instead.Hope this helps.