Tab Bar App -- how do I switch views?

Discussion in 'iOS Programming' started by milktooth, Jan 17, 2010.

  1. milktooth macrumors member

    Joined:
    Oct 30, 2009
    #1
    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?
     
  2. iLoveDeveloping macrumors 6502

    Joined:
    Sep 24, 2009
    Location:
    Ireland
    #2
    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.....
     
  3. milktooth thread starter macrumors member

    Joined:
    Oct 30, 2009
    #3
    Sorry, I wasn't clear.

    I want to change the selected tab from one tab to another.
     
  4. iLoveDeveloping macrumors 6502

    Joined:
    Sep 24, 2009
    Location:
    Ireland
    #4
    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...
     
  5. milktooth thread starter macrumors member

    Joined:
    Oct 30, 2009
    #5
    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?
     
  6. milktooth thread starter macrumors member

    Joined:
    Oct 30, 2009
    #6
    ...I eventually figured it out. I needed to put a method in my AppDelegate and message that.
     

Share This Page