performSegueWithIdentifier

Hi,


I have a crash in my app when try to do a performSegueWithIdentifier in iOS 9, somebody know if it is a bug or if I need to change code, this is my code, that works pretty well in iOS 8.+


- (void) do_segue: (NSString*) segue_name

{


BOOL is_picker_open = [self get_global_bool_data:@"is_picker_open"];

BOOL doing_segue = [self get_global_bool_data:@"doing_segue"];

if(doing_segue)

{

Log(@"Error doing segue because doing segue before...");

return;

}

if(is_picker_open)

{

Log(@"Error doing segue because picker is open...");

return;

}

[self doing_segue_to:segue_name];

if(loading_segue == NO || [self.title is_equal_to_string:@"xxxx"]){

loading_segue = YES;

[[volume_scanner sharedManager:nil] disable_for_one_second];

execute_main_thread(^{

begin_ignoring_events();

@try {

[self performSegueWithIdentifier:segue_name sender:self];

}

@catch (NSException *exception) {

loading_segue = NO;

Log(@"segue exception catched: [%@] on class %@",exception, NSStringFromClass([self class]));

}

});

check_point(string_with_format(@"Segue to '%@' from [%@]", segue_name, NSStringFromClass([self class])));

}

}



and this is the console log.



Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not perform segue with identifier 'xxxxxx'. A segue must either have a performHandler or it must override -perform.

How is that segue defined? It sounds like UIKit thinks it's a custom segue, but there's no class specified to implement the custom perform.

Make sure that in your storyboard the segue type is not set to custom. If you set it to custom you'll need to provide your own custom segue class.

performSegueWithIdentifier
 
 
Q