根据我的要求,使用ECSlidingViewController
源代码[ https://github.com/edgecase/ECSlidingViewController ]来实现Facebook幻灯片菜单类型的观点。
我的需求是:我有一个loginScreen,然后是UITabBarController
,有5个标签。当我点击第二个选项卡时,我需要第二个选项卡VC作为中央VC,在导航栏的右侧有一个UIBarButtonItem
。当我点击UIBarButtonItem
我需要facebook类型的滑动视图出现。请让我知道如何整合这个。这应该在故事板中完成。
答案 0 :(得分:1)
您的第二个标签可以是对ECSlidingViewController
的引用。您的视图控制器关系看起来像这样:
UITabBarController's second tab -> ECSlidingViewController
ECSlidingViewController's topViewController -> UINavigationController
ECSlidingViewController's underRightViewController -> a view controller your users will see when the top view is anchored to the left
UINavigationController's rootViewController -> some view controller your users will see as the second tab
您可以在导航控制器上设置右侧栏按钮项目,将顶部视图锚定在左侧。