Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

milktooth

macrumors member
Original poster
Oct 30, 2009
32
0
I'm writing a simple tab bar based application.

I have my separate views set up. In one view, there is a button. When the user hits this button, I want the app to show the view for a random tab.

But how do I change the current tab view? What message do I send, and where do I send it to?
 
Tab Based Apps usually set up all that for you.... (At least the first 2 windows) Just look back at how those windows are made and copy it into each new view you create... Its not exactly hard.....
 
Sorry, I wasn't clear.

I want to change the selected tab from one tab to another.
 
Sorry, I wasn't clear.

I want to change the selected tab from one tab to another.

Oh ok, i understand now.. You need to set up two Tab Bars (one I'm guessing you created the App with (Tab Based Application) and now you want to make another inside a View you create) There is loads of files and tutorials on the net about making a Tab Bar... Google it, i would be amazed if you can't find what you need...
 
Erm... so I have to set up another tab bar?

What I want to happen is this:

Tab 1 is selected. There is a button. When the user presses the button, it selects tab 0.

Why do I need to set up another tab bar?
 
...I eventually figured it out. I needed to put a method in my AppDelegate and message that.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.