ios - EXC_BAD_ACCESS (code 2) when calling 'presentViewController' -
i'm stumped here.
_vc = [[vlckitviewcontrolleriphone alloc]initwithnibname:@"vlckitviewcontrolleriphone" bundle:nil]; _vc.modalpresentationstyle = uimodalpresentationfullscreen; [self presentviewcontroller:_vc animated:yes completion:nil];
gives me exc_bad_access (code = 2, address = 0x0) when presentviewcontroller method called. view controller not nil. happens or without nib name. if comment out presentviewcontroller line, rest of code continues fine, including method calls made view controller itself. view controller running, can't see because it's not showing view.
i enabled nszombies , tried instruments running, it's not showing me anything. app quits , instruments stops without giving me information. know problem might be?
you can try this
if ([controller respondstoselector:@selector(setmodalpresentationstyle:)]) { [controller setmodalpresentationstyle:uimodalpresentationfullscreen]; } else { [controller setmodalpresentationstyle:uimodalpresentationformsheet]; }
Comments
Post a Comment