iphone - IOS - Switch to alternate ViewController Programatically -


i reasonably new ios below screenshot of app structure -

enter image description here

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

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -