iphone - IOS - Switch to alternate ViewController Programatically -
i reasonably new ios below screenshot of app structure -
there various tableviewcontroller / uiviewcontrollers connect tab bar controller - pretty standard guess.
the colourful shot homepage - users able click on 1 of 4 tabs , navigate 1 of other pages - though i'm struggling on how to programatically.
i have attached buttons ib-actions , have given screesn storyboard id's.
the following code far -
- (ibaction)btncult:(id)sender { uiviewcontroller *vc = [self.storyboard instantiateviewcontrollerwithidentifier:@"culture"]; [self presentviewcontroller:vc animated:yes completion:nil]; }
this nothing - can give me tips on i'm going wrong?
try add ibaction:
[self.tabbarcontroller setselectedindex:0];
it should takes first tab, changing index change tabs(views)
Comments
Post a Comment