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

ksavorate

macrumors newbie
Original poster
May 16, 2008
29
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!
 

Cromulent

macrumors 604
Oct 2, 2006
6,802
1,096
The Land of Hope and Glory
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.
 

ksavorate

macrumors newbie
Original poster
May 16, 2008
29
1
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.
 

Cromulent

macrumors 604
Oct 2, 2006
6,802
1,096
The Land of Hope and Glory
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.

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.
 

Attachments

  • pic1.jpg
    pic1.jpg
    9.1 KB · Views: 1,032
  • pic2.jpg
    pic2.jpg
    2.6 KB · Views: 76

ksavorate

macrumors newbie
Original poster
May 16, 2008
29
1
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!
 

Attachments

  • Picture 2.png
    Picture 2.png
    160.9 KB · Views: 76
  • Picture 3.png
    Picture 3.png
    178.5 KB · Views: 76
  • Picture 4.png
    Picture 4.png
    142.3 KB · Views: 96
  • Picture 5.png
    Picture 5.png
    177.2 KB · Views: 78
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.