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.