在 nib 文件中添加幻灯片导航时遇到问题。
请帮帮我
我有一个例子,但它是用于 Storyboard的,我希望它在 nib 中使用,这样我就可以在左侧打开一个菜单表单
[SlideNavigationController sharedInstance].rightMenu = rightMenu;
[SlideNavigationController sharedInstance].menuRevealAnimationDuration = .18;
// Creating a custom bar button for right menu
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
[button setImage:[UIImage imageNamed"gear"] forState:UIControlStateNormal];
[button addTarget:[SlideNavigationController sharedInstance] actionselector(toggleRightMenu) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
[SlideNavigationController sharedInstance].rightBarButtonItem = rightBarButtonItem;
SlideNavigationController *nav = [[SlideNavigationController alloc] initWithRootViewController:viewCon];
nav.navigationBarHidden=YES;
self.window.rootViewController=nav;
[self.window makeKeyAndVisible];
Best Answer-推荐答案 strong>
我发现这是一个非常简洁的 nib 解决方案,我正在将它用于我自己的项目。你可以检查一下:
https://maniacdev.com/2013/08/open-source-component-for-making-a-nice-ios-7-control-center-style-animated-side-bar-menu
关于ios - 如何在 nib 文件中的 ios 中添加幻灯片导航,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/31353910/
|