Reputation: 79
This might have been posted before and believe me we tried searching and tried the solutions but it didn't help solving our problem (I will list what we found here on StackOverflow).
AppDelegate will vcMain and a button will launch vcClientMain. vcClientMain is a AMSlideMenuMainViewController and should have the left and right slide menus.
AppDelegate:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
vcMain *mainView = [[vcMain alloc] initWithNibName:@"vcMain" bundle:nil];
self.window.rootViewController = mainView;
[self.window makeKeyAndVisible];
return YES;
}
vcMain client button clicked:
- (IBAction)btnClientClicked:(id)sender {
vcClientMain *mainView = [[vcClientMain alloc] initWithNibName:@"vcClientMain" bundle:nil];
[self presentViewController:mainView animated:true completion:nil];
}
The prefix.pch file contains the code below which we copied from withoutstoryboad sampl of AMSSlideMenu (included it on both the actual project and the pods project)
#import <Availability.h>
#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#endif
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
#define AMSlideMenuWithoutStoryboards
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
We are receiving this error when the Client button is clicked
2018-01-14 03:44:17.102821+0800 Travellogger[5275:1112453] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver () has no segue with identifier 'rightMenu'' *** First throw call stack: ( 0 CoreFoundation 0x00000001064a312b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010a957f41 objc_exception_throw + 48 2 UIKit 0x000000010822e3d0 -[UIViewController shouldPerformSegueWithIdentifier:sender:] + 0 3 Travellogger 0x00000001060a36f7 -[AMSlideMenuMainViewController setup] + 1063 4 Travellogger 0x00000001060a09a3 -[AMSlideMenuMainViewController viewDidLoad] + 387 5 Travellogger 0x000000010609e7d3 -[vcClientMain viewDidLoad] + 275 6 UIKit 0x000000010822b46c -[UIViewController loadViewIfRequired] + 1235 7 UIKit 0x000000010822b8b9 -[UIViewController view] + 27 8 UIKit 0x0000000108cc4441 -[_UIFullscreenPresentationController _setPresentedViewController:] + 89 9 UIKit 0x00000001081f82a3 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 133 10 UIKit 0x000000010823eb67 -[UIViewController _presentViewController:withAnimationController:completion:] + 3808 11 UIKit 0x00000001082419a9 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 99 12 UIKit 0x0000000108242079 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 532 13 UIKit 0x0000000108241908 -[UIViewController _presentViewController:animated:completion:] + 181 14 UIKit 0x0000000108241c67 -[UIViewController presentViewController:animated:completion:] + 159 15 Travellogger 0x000000010609b8f8 -[vcMain btnClientClicked:] + 120 16 UIKit 0x0000000108084972 -[UIApplication sendAction:to:from:forEvent:] + 83 17 UIKit 0x0000000108203c3c -[UIControl sendAction:to:forEvent:] + 67 18 UIKit 0x0000000108203f59 -[UIControl _sendActionsForEvents:withEvent:] + 450 19 UIKit 0x0000000108202981 -[UIControl touchesBegan:withEvent:] + 282 20 UIKit 0x00000001080fa562 -[UIWindow _sendTouchesForEvent:] + 2130 21 UIKit 0x00000001080fbf2a -[UIWindow sendEvent:] + 4124 22 UIKit 0x000000010809f365 -[UIApplication sendEvent:] + 352 23 UIKit 0x00000001089eba1d __dispatchPreprocessedEventFromEventQueue + 2809 24 UIKit 0x00000001089ee672 __handleEventQueueInternal + 5957 25 CoreFoundation 0x0000000106446101 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 26 CoreFoundation 0x00000001064e5f71 __CFRunLoopDoSource0 + 81 27 CoreFoundation 0x000000010642aa19 __CFRunLoopDoSources0 + 185 28 CoreFoundation 0x0000000106429fff __CFRunLoopRun + 1279 29 CoreFoundation 0x0000000106429889 CFRunLoopRunSpecific + 409 30 GraphicsServices 0x000000010dfee9c6 GSEventRunModal + 62 31 UIKit 0x00000001080835d6 UIApplicationMain + 159 32 Travellogger 0x000000010609e69f main + 111 33 libdyld.dylib 0x000000010b721d81 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException
iOS AMSlideMenu Receiver () has no segue with identifier 'rightMenu''
AMSlideMenu crash: Receiver () has no segue with identifier 'rightMenu'
Upvotes: 2
Views: 79
Reputation: 1754
This is a very easy to integrate and smooth slide menu
https://github.com/beingbarath/BMSlideMenu
Integration of SWRevealViewController. Hope this helps :)
Upvotes: 0