TabView names

Discussion in 'iOS Programming' started by alexpja, Oct 8, 2011.

  1. alexpja macrumors member

    Joined:
    Mar 22, 2010
    #1
    I've tried every possible thing on the Web but none work, since I don't have MainWindow.xib. How can I change the tab names in Xcode 4.2 (GM seed)?

    Attached is a picture from Xcode showing no tabs, the file list, and a pic from iOS Simulator showing the tabs.
     

    Attached Files:

  2. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    How and where are you creating the UITabBarController (or UITabBar) object that we see in the screenshot of the iPhone simulator?
     
  3. alexpja thread starter macrumors member

    Joined:
    Mar 22, 2010
    #3
    I selected Tabbed Application when creating a new project in Xcode. Should I restart the project using a normal function and add the TabBar normally?
     
  4. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    Look inside each of the initWithName:bundle: methods of the view controllers.
     
  5. alexpja thread starter macrumors member

    Joined:
    Mar 22, 2010
    #5
    I'm pretty sure I found it, that right? rofl, seems like it to me :3

    Edit: Worked! :D Thanks!!
     

    Attached Files:

  6. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #6
    Why do you use an NSLocalizedString? you can just do
    Code:
    self.title = @"Second";
    not sure which is "most" performant, and you wouldn't notice the difference. But still ;p
     
  7. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #7
    That would be just because the TabBar template uses NSLocalizedString, presuming that the tab bar items would need to localized.
     

Share This Page