Interface Builder - iPhone SDK

Discussion in 'iOS Programming' started by ksavorate, Aug 9, 2008.

  1. ksavorate macrumors newbie

    ksavorate

    Joined:
    May 16, 2008
    #1
    Hello,
    I am trying to build an app, so that when you click on one tab (at the bottom) you see one thing, and then when you click on the next tab, you see another thing.

    When I start building from a Tab Bar Application, there is this annoying thing called 'First View' and whenever I drag an object over from the library, it automatically centers the object and I can't move it.
    When I try and drag another object over, it takes the place of the one that I had dragged the first time. The only good thing about the Tab Bar Application is that the tabs actually work: when I click on one tab, it shows one view and when I click on another tab, it shows another view.

    When I start building from a Window Based Application and drag the Tab Bar from the Library, the tabs don't seem to work as separate tabs. When I click on both the tabs, they display the same thing.

    How do I solve this?
    I am a beginner developer so please use easy-to-understand language.

    Thanks!
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    There are two XIB files in the tab bar application. Each tab displays one or the other XIB files.

    Which objects is it that you are trying to place? Some of them are special objects. You should be able to layout standard UI elements correctly as long as you put them in the correct view.
     
  3. ksavorate thread starter macrumors newbie

    ksavorate

    Joined:
    May 16, 2008
    #3
    Just standard objects from the Library, for example a button or a slider.
    whenever i drag one on, it automatically goes to the center and I can't move it.
     
  4. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    Ah, you need to open the window element that will actually display the elements. Dragging it to the view itself does not work. I have attached some screenshots.

    Double click on the "Window" element shown in the second picture. Drag the UI elements to the window it opens (shown in the first picture).

    The same applies when you want to add stuff to the second tab view, just open the second XIB file and instead of opening the "Window" element open the "View" element. It sounds like you should read through the Interface Builder manual a little bit to get a bit more comfortable with the way it works.
     

    Attached Files:

  5. ksavorate thread starter macrumors newbie

    ksavorate

    Joined:
    May 16, 2008
    #5
    Hello,
    I did what you said but this is what happened (described in the screenshots)

    SCREENSHOT 1: Here is the first page.
    SCREENSHOT 2: Here is the second page.
    SCREENSHOT 3: When I open the first page in the iPhone Simulator, the words first view come up and I am unable to use the slider.
    SCREENSHOT 4: This page works fine in the simulator.

    Thanks for all your help!
     

    Attached Files:

  6. Jeremy1026 macrumors 68020

    Jeremy1026

    Joined:
    Nov 3, 2007
    #6
    Nice date you picked in the screenshot of IB in screenshot 2 :p
     
  7. ksavorate thread starter macrumors newbie

    ksavorate

    Joined:
    May 16, 2008
    #7
    What do you mean? What's special about October 26?
     
  8. Jeremy1026 macrumors 68020

    Jeremy1026

    Joined:
    Nov 3, 2007
    #8
    Its my birthday, and the reason that my online name is Jeremy1026 and my development 'company' is 1026 Development
     

Share This Page