My program works fine before installing xcode 7 and switches to ios 9.
now one of my views gives exc_bad_access (Code = 2, ...) :

turning on zombie mode and using the tool did not help, and debugging still shows the above errors without any useful description.
after adding some nslog and breakpoint i recognize "pushViewController" gives
mistake:
UIStoryboard *storyboard;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
storyboard = [UIStoryboard storyboardWithName:@"Ipad" bundle:nil];
}
else
{
storyboard = [UIStoryboard storyboardWithName:@"Iphone" bundle:nil];
}
AtestViewController *atvc = [storyboard instantiateViewControllerWithIdentifier:@"AVC"];
[self.navigationController pushViewController:atvc animated:YES];
nothing has changed in the code until i swtich to xcode 7 and ios 9 !!
as well as my other pushViewController in the program works well and
The encoding method is the same as above.
source
share