PDA

View Full Version : Interface Builder - iPhone SDK




ksavorate
Aug 9, 2008, 12:42 PM
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
Aug 9, 2008, 12:57 PM
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
Aug 9, 2008, 01:29 PM
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
Aug 9, 2008, 01:50 PM
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.

ksavorate
Aug 9, 2008, 03:10 PM
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!

Jeremy1026
Aug 9, 2008, 04:29 PM
Nice date you picked in the screenshot of IB in screenshot 2 :-P

ksavorate
Aug 10, 2008, 12:00 AM
Nice date you picked in the screenshot of IB in screenshot 2 :-P

What do you mean? What's special about October 26?

Jeremy1026
Aug 10, 2008, 03:47 PM
What do you mean? What's special about October 26?

Its my birthday, and the reason that my online name is Jeremy1026 and my development 'company' is 1026 Development