ipad - UIButton not working in second time (objective-C) -
i have button in first screen loading little game here code:
- (ibaction)playbuttonpressed:(id)sender { [self startgamewithconfig:[rootviewcontroller singleplayergameconfig]]; nslog(@"play again"); }
and within of game page have button first screen when used button can playbuttonpressed not working more, print nslog button it's not loading game more
here homecoming button:
- (ibaction)return:(id)sender { rootviewcontroller *b = [[rootviewcontroller alloc] init]; [self presentmodalviewcontroller:b animated:yes]; }
would please help me implementation
thanks in advance!
and here startgamingwithconfig
- (void) startgamewithconfig:(gameconfig *)config { // fade in loading screen hide load time [_loadingview sethidden:no]; [_loadingview setalpha:0.0f]; [uiview animatewithduration:0.2f delay:0.0f options:uiviewanimationoptioncurvelinear animations:^{ [_loadingview setalpha:0.0f]; } completion:^(bool finished){ cardsviewctrl* newcontroller = [[cardsviewctrl alloc] init]; newcontroller.gameconfig = config; appdelegate *delegate = (appdelegate *)[[uiapplication sharedapplication] delegate]; [delegate.navcontroller pushfadeinviewcontroller:newcontroller animated:yes]; }]; }
instead of using presentmodelviewcontroller use:navigationcontroller
- (ibaction)retour:(id)sender { rootviewcontroller *b = [[rootviewcontroller alloc] init]; [self.navigationcontroller pushviewcontroller:b animated:yes]; }
objective-c ipad uiviewcontroller uibutton presentmodalviewcontrolle
No comments:
Post a Comment