iphone - Click a tab of tabbarController programmatically -


i have 2 tab buttons nib files....

on pressing button on tab1, want want show tab 2's view (not click on tabbar button2). mean, want click second tabbar button programmatically.

how can this, possible?

you'll have create function in it:

[self.tabbarcontroller setselectedindex:1]; 

so eg:

- (void)selectnexttabbarview:(id)selector {   [self.tabbarcontroller setselectedindex:1]; } 

and on button need:

[mybutton addtarget:self action:@selector(selectnexttabbarview:) forcontrolevents:uicontroleventtouchupinside]; 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -