如何移动 UIViewController?
我想做一个像 Facebook 这样的应用程序,当你按下面板按钮时,菜单会出现在左侧。为此,我有一个带有 UITableView 的第一个 UIViewController,另一个放在上面的带有没有动画的模式转换的 UIViewController。为了显示 UITableView (我的菜单),我想将第二个 UIViewController 移动到右侧。
我怎样才能做到这一点?这是正确的方法吗?
I want to do an app like Facebook with the menu that appears on the left when you push on the panel button. To do that, I have a first UIViewController with an UITableView, and another put above with a modal transition without animation. To display the UITableView (my menu), I want to move my second UIViewController on the right.
How can I do that ? It is the right way ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我怎样才能做到这一点?
只是使用 UIView 动画来移动视图控制器的视图。添加另一个视图(即菜单),并使用相同的动画移动它。这实际上很容易。
这是正确的方法吗?
我不知道你所说的“正确的方式”是什么意思……也许吧?
How can I do that ?
Just used a UIView animation to move the view of the view controller. Add another view that is your menu, and move that using the same animation. It's actually pretty easy.
It is the right way ?
I don't know what you mean by "the right way"... Sooooo, maybe?
您需要的内容以模板形式提供。
检查这个 git..下载它..并使用它..
https://github.com/pkluz/ZUUIRevealController
What you need is provided as a template.
Check this git..download it..and play around with it..
https://github.com/pkluz/ZUUIRevealController