ios - Using Storyboard Segues with Segmented Control -


i have segmented control i'm using switch between 3 view controllers. first tableview embedded in navigation controller segmented control in navigation controller. have 2 custom segues in storyboard (with animations coming left , right). in "main" controller class - middle of segmented control - use code

- (ibaction)indexchanged:(id)sender {     if ([sender selectedsegmentindex] == 0) {         [self performseguewithidentifier:@"leftsegue" sender:self];     }     else if ([sender selectedsegmentindex] == 1){     }     else {         [self performseguewithidentifier:@"rightsegue" sender:self];     } } 

this works great 2 controllers. when view controllers put on screen, can still move between far left , right controllers, going main controllers crashing under each attempt i've tried. think has me not understanding either self i'm sending performseguewithidentifier message or self i'm passing sender:.

example: if in else if ([sender selectedsegmentindex] == 1){} create new segue, unique identifier coming either of 2 new controllers, application crashes saying "receiver has no segue identifier" when spelled correctly. receiver in example?

edit: i've added current storyboard pictures here. top 2 custom segues, , middle 2 modal , push, specific requirements.

edit2: using methods self.navigationcontroller.viewcontrollers[0] finds correct view, doesn't allow me switch initial controller- redraws loses navigation bar.

in xcode, add "exception breakpoint" in "breakpoint navigator" view. launch app, , try reduce crash. xcode should stops on instruction causing crash. when you're stopped, try type po self in debug area, classes receiver, might understand what's happening...


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -