iphone - Thread 1: Programm received signal: "SIGABRT" -
im trying build easy application view swiching , uiwebview worked till wrote uiwebview
-(ibaction)pushbutton { termineviewcontroller *screen = [[termineviewcontroller alloc] initwithnibname:nil bundle:nil]; screen.modaltransitionstyle = uimodaltransitionstylecrossdissolve; [self presentmodalviewcontroller:screen animated:yes]; thread 1: program receved signal: "sigabrt" [screen release]; } -(ibaction)pushbutton2 { speiseplanviewcontroller *screen = [[speiseplanviewcontroller alloc] initwithnibname:nil bundle:nil]; screen.modaltransitionstyle = uimodaltransitionstylecrossdissolve; [self presentmodalviewcontroller:screen animated:yes]; [screen release]; // // termineviewcontroller.m // lhappv3 // // created joan on 03.07.11. // copyright 2011 __mycompanyname__. rights reserved. // #import "termineviewcontroller.h" @implementation termineviewcontroller -(ibaction)pushback { [self dismissmodalviewcontrolleranimated:yes]; } - (id)initwithnibname:(nsstring *)nibnameornil bundle:(nsbundle *)nibbundleornil { self = [super initwithnibname:nibnameornil bundle:nibbundleornil]; if (self) { // custom initialization } return self; } - (void)dealloc { [super dealloc]; } - (void)didreceivememorywarning { // releases view if doesn't have superview. [super didreceivememorywarning]; // release cached data, images, etc aren't in use. } #pragma mark - view lifecycle /* // implement viewdidload additional setup after loading view, typically nib. - (void)viewdidload { [super viewdidload]; } */ -(void)viewdidload { [super viewdidload]; [webview loadrequest:[nsurlrequest requestwithurl:[nsurl urlwithstring:@"http://www.landheim-schondorf.de/news/"]]]; [nstimer scheduledtimerwithtimeinterval:1.0 target:self selector:@selector(checkload) userinfo:nil repeats:yes]; [nstimer scheduledtimerwithtimeinterval:1.0 target:self selector:@selector(checknotload) userinfo:nil repeats:yes]; } -(void)checkload { if(webview.loading) { [active startanimating]; } } -(void)ckecknotload { if(!(webview.loading)) { [active stopanimating]; } } - (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation { // return yes supported orientations return (interfaceorientation == uiinterfaceorientationportrait); } @end // // termineviewcontroller.h // lhappv3 // // created joan on 03.07.11. // copyright 2011 __mycompanyname__. rights reserved. // #import <uikit/uikit.h> @interface termineviewcontroller : uiviewcontroller { iboutlet uiwebview *webview; iboutlet uiactivityindicatorview *active; } -(ibaction)pushback; @end
you not creating view.
-(void)viewdidload { [super viewdidload]; webview = [[uiwebview alloc] initwithframe:arect]; //<-------- [webview loadrequest:[nsurlrequest requestwithurl:[nsurl urlwithstring:@"http://www.landheim-schondorf.de/news/"]]]; [nstimer scheduledtimerwithtimeinterval:1.0 target:self selector:@selector(checkload) userinfo:nil repeats:yes]; [nstimer scheduledtimerwithtimeinterval:1.0 target:self selector:@selector(checknotload) userinfo:nil repeats:yes]; } additionally need release webview in dealloc. , should confortable properties.
edit
try catch bug of zombies: nszombieenabled
Comments
Post a Comment