xcode 侧边导航栏(菜单)(iOS 6)就像 Facebook 应用程序 + 故事板
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14045085/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Side navigation bar (menu) (iOS 6) like in Facebook app + storyboards
提问by egor.zhdan
I want to create side menu like in Facebook iPhone app in iOS 6 using Xcode and Storyboards. How can I make it?
我想使用 Xcode 和 Storyboards 在 iOS 6 的 Facebook iPhone 应用程序中创建侧边菜单。我怎样才能做到?
Thanks.
谢谢。
采纳答案by Alexey Kozhevnikov
Get custom component like Inferis/ViewDeck and implement containment programmatically:
获取 Inferis/ViewDeck 等自定义组件并以编程方式实施遏制:
@interface YourViewController : IIViewDeckController
@end
implementation:
执行:
@implementation YourViewController
-(void)awakeFromNib
{
UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];
self.centerController = [storyboard instantiateViewControllerWithIdentifier:@"CenterViewController"];
self.leftController = [storyboard instantiateViewControllerWithIdentifier:@"LeftViewController"];
}
@end
回答by kcharwood
We wrote MMDrawerController to solve this problem, but I havent thought about using it in a storyboard (simply because storyboards aren't maintainable for large teams).
我们写了 MMDrawerController 来解决这个问题,但是我还没有想过在故事板中使用它(只是因为故事板对于大型团队来说是不可维护的)。
回答by Lukas
In case someone else would like to do something similar.. I've succeeded using ECSlidingView. It is already done using storyboards. There's also an example included.
如果其他人想做类似的事情..我已经成功地使用了 ECSlidingView。它已经使用故事板完成了。还有一个例子。
https://github.com/edgecase/ECSlidingViewController.git
https://github.com/edgecase/ECSlidingViewController.git
EDIT:
编辑:
Well after implementing this ECSlidingViewController i see that the navigation is slow, and strange. Switched to IIViewDeckController after all. Fast and easy, super!
在实现这个 ECSlidingViewController 之后,我发现导航很慢,而且很奇怪。毕竟切换到 IIViewDeckController。快速简便,超级棒!