matghazaryan / AMSlideMenu2

Sliding Menu for iOS (Left and Right menus). Multiple storyboards and XIBs support.
MIT License
1.2k stars 194 forks source link

App crashed when sending a web request in AMSlideMenuLeftTableViewController #107

Closed ibigbug closed 9 years ago

ibigbug commented 10 years ago

I have a controller that inherits AMSlideMenuLeftTableViewController like this:


@interface YWMainTableViewController : AMSlideMenuLeftTableViewController <UITableViewDataSource, UITableViewDelegate, NSURLConnectionDelegate>

When sending a web requset:


- (void) loadInitDatas
{
    NSString *ROOT_URL = @"http://baidu.com";
    NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:ROOT_URL]];
    NSURLConnection *conn = [NSURLConnection connectionWithRequest:req delegate:self];

    if (!conn) {
        NSLog(@"Request failed");
    }
}

Then run it in the simulator and crashed:

2014-08-31 01:21:51.957 FuckVoca[34977:60b] *\ Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<MainViewController: 0x8c4ef30>) has no segue with identifier 'rightMenu''

Could u plz help me find out if there was anything I did wrong ?

arturdev commented 10 years ago

Read the ReadMe and make sure that you connected your MainVC to your YWMainTableViewController with segue properly.

ibigbug commented 10 years ago

Thanks for help :) I think I did it right. In my app, these is only leftMenu and no rightMenu needed. Something curious is that if I add initial datas in loadInitDatas manually without web request, everything gonna be OK. If use web request, app crashed :(

l0gg3r commented 10 years ago

@ibigbug can you provide stacktrace? you can set an exception breakpoint and find caller of the segue.