我面臨在nib文件中添加滑動導航的問題。 請幫我如何在ios文件中的ios中添加滑動導航
我有一個例子,但其故事板,我想它在筆尖使用這樣我就可以打開一個菜單形式左側
[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] action:@selector(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];
請檢查我的更新代碼 –
如果你完全改變你的問題,你應該創建一個新的問題。我的回答是關於你對故事板的問題 – seeya