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
Post a Comment