Solved

switching between tabs

Posted on 2011-09-16
1
349 Views
Last Modified: 2012-08-14
it there a way to switch through tab bar items?

I have an app using a tabbarcontroller and on one view there's a button.  When the user clicks the button, i want the next tab to become active just like the user clicked the next tab.
0
Comment
Question by:BTMExpert
1 Comment
 
LVL 4

Accepted Solution

by:
jacekmalinowski earned 500 total points
ID: 36712207
You can change selectedViewController property of UITabBarController.

"selectedViewController
The view controller associated with the currently selected tab item.

@property(nonatomic, assign) UIViewController *selectedViewController
Discussion
This view controller is the one whose custom view is currently displayed by the tab bar interface. The specified view controller must be in the viewControllers array. Assigning a new view controller to this property changes the currently displayed view and also selects an appropriate tab in the tab bar. Changing the view controller also updates the selectedIndex property accordingly. The default value of this property is nil."

More at:
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITabBarController_Class/Reference/Reference.html
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

CocoaPods is the best way to manage library dependencies in iOS and OS X projects. By using cocoa pods there is no need of downloading the code from github and copying to your project. There are plenty of open source libraries now available with C…
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question