objective c - ios - app crash when click on a button on a child view from nib -
hi developing ios app , come on unusual problem. have main viewcontroller have buttons when clicked open view connected nib file , nib file contain button close it, problem whenever click button app crash no reason or log.
this how open nib file:
browserviewcontroller *browservc = [[browserviewcontroller alloc] initwithnibname:@"browser" bundle:[nsbundle mainbundle]]; nsurl *url = [nsurl urlwithstring:urlstring]; nsurlrequest *request = [nsurlrequest requestwithurl:url]; browservc.view.frame = cgrectmake(0,490,320,381); [uiview animatewithduration:0.3 delay:0.0 options: uiviewanimationoptioncurveeasein animations:^{ browservc.view.frame = cgrectmake(0, 187, 320, 460); [self.view addsubview:browservc.view]; [browservc.webview loadrequest:request]; } completion:^(bool finished){ }]; and want close it:
- (ibaction)closewebview:(id)sender { nslog(@"closed!"); } when app crash receive this:
(lldb) thanks.
if app runs in simulator, seek reset simulator , clean build , run app again.
ios objective-c iphone
No comments:
Post a Comment