Solved

switching between tabs

Posted on 2011-09-16
1
348 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Preface   In the first 100 days of the Macintosh release in January 1984, Apple sold 72,000 of the computers. Relatively cheap, easy-to-use personal computer with a graphical operating system. I've never seen this model. I did see this one:   …
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.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now