iphone - Putting a back button inside of a Modal view pushed by another modal view -
check this, im pushing modal view inside of modal view. but, im trying put button inside of modal view, without luck.
what im doing wrong?
thanks!
cadastroviewcontroller *addcontroller = [[cadastroviewcontroller alloc] initwithnibname:@"cadastroviewcontroller" bundle:nil]; // wrap view nicely in navigation controller uinavigationcontroller *navigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:addcontroller]; // can set style of stuff before show navigationcontroller.navigationbar.barstyle = uibarstyleblackopaque; navigationcontroller.navigationitem.leftbarbuttonitem = [[uibarbuttonitem alloc] initwithtitle:@"ok" style:uibarbuttonitemstylebordered target:self action:@selector(buy)]; // , want present view in modal fashion nice , animated [self presentmodalviewcontroller:navigationcontroller animated:yes]; // make sure release stuff [navigationcontroller release]; [addcontroller release];
it seems me, problem here:
[self presentmodalviewcontroller: navigationcontroller animated:yes];
instead try this:
[self presentmodalviewcontroller: addcontroller animated:yes];
Comments
Post a Comment