Question

xcode 4 has a directly included interface builder, anyhow i want to change items of a tabbarcontroller. my subjects are: rearrange, add new, change type of view e.g. nagvigation

Here is what i want (Screenshot from InterfaceBuilder V3.2) in Xcode4 beta

Screenshot from InterfaceBuilder V3.2

cheers endo

EDIT: The only solution I found is to copy an existing Item and change the properties, but i'm still interested in a solution since this is just a workarround.

Was it helpful?

Solution

I realize this question is a little old, but this might help:

To change the type of an object:

  • From within Xcode 4, open your .xib file. If the interface builder object viewer isn't expanded, make it so by dragging it's right boarder out, or clicking that little 'play' button at the bottom. enter image description here

  • Expand the Tab Bar Controller object to see it's children, and select the object you wish to change enter image description here

  • Then choose it's Class type from the right panel, Identity Inspector. (To display the Identity Inspector, go menu: View > Utilities > Identity Inspector).

    enter image description here

  • You can open and close that right panel using the buttons on the top right of Xcode. You can get to the various utilities by clicking the utility buttons, or through View > Utilities. enter image description here

To add more tabs to the Tab Bar Controller, drag a new controller from the objects menu (in the lower right panel).

enter image description here

To rearrange tabs in the Tab Bar Controller, drag and drop them in the interface builder object viewer (this will change their position in the actual tab bar too).

enter image description here

OTHER TIPS

i was looking for the same thing, but could not find it. I stumbled upon this:

http://www.jennandlucien.net/lucien/2011/03/13/xcode-4-tip-on-changing-a-tab-to-a-different-type-of-controller/

Hopefully it will help someone.

There isn't an equivalent in Xcode 4's Interface Builder. That's why I wrote the above blog post. The easiest way I've found to do replicate that user interface in Xcode 4 is:

  • delete the view controller you want to change the type of
  • drag in the new type of view controller
  • set things back up the way they were before

It's a bit of a pain, but doesn't take too long.

I solved the problem by doing the following things

  • Drag and drop a Tab Bar Controller(delete if there is any view already there, otherwise IB won't allow you to place a tab bar controller on another view).

  • Add the other tab bars by Drag an drop a 'View Controller' from the right bottom of the Xcode window under name Objects, this will create a view controller and a tab bar item in your view.

  • And make sure to place it on the Tab Bar.

  • the interface builder automatically arrange the tab bars.

  • Select each tab bar and goto attribute inspector and change the title and nib file name.

Thanks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top