自定义 UIViewController 容器在两个视图之间交换
我想重现 Apple 的 TheElementes 示例中的 UIView 交换效果代码,其中点击 UINavBar 中的按钮会导致导航下方的视图翻转并被另一个视图替换。
我想知道是否可以更新此代码以利用 iOS 5 中引入的自定义 UIViewController
容器。而不是使用一个 UIViewController
来交换两个 UIViews ,它会有一个容器
UIViewController
,可以在两个 UIViewControllers
之间交换(在我的例子中是一个普通的 UIViewController
和一个 UITableViewController
代码>)。我想它也可能涉及创建一个自定义故事板转场。
有人对此有任何见解吗?
如果只有一个 ViewController 更好,那么它应该是常规视图控制器子类还是 UITableViewController 子类?初始视图应该是普通的 UIView,但第二个视图应该是 UITableView。哪个会更容易?
I'd like to reproduce the UIView swapping effect from Apple's TheElementes sample code where tapping a button in the UINavBar causes the view below the the Nav to flip around and get replaced with another view.
I'm wondering if this code could be updated to take advantage of custom UIViewController
containers introduced in iOS 5. Instead of having one UIViewController
that swaps two UIViews
, it would have a container UIViewController
that swaps between two UIViewControllers
(in my case a normal UIViewController
and a UITableViewController
). I imagine that it could involve creating a custom story board segue as well.
Does anyone have any insight on this?
If it is better to just have one ViewController should it be a regular view controller subclass or a UITableViewController subclass? The initial view should be a normal UIView but the second view is supposed to be a UITableView. Which would be easier?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论