开发者

Xcode4: Where change tabbar-properties in xcode4-interfacebuilder

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

Xcode4: Where change tabbar-properties in xcode4-interfacebuilder

cheers endo

EDIT: The only solution I found is to copy an existing Item and change t开发者_运维知识库he properties, but i'm still interested in a solution since this is just a workarround.


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.

    Xcode4: Where change tabbar-properties in xcode4-interfacebuilder

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

    Xcode4: Where change tabbar-properties in xcode4-interfacebuilder

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

    Xcode4: Where change tabbar-properties in xcode4-interfacebuilder

  • 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.

    Xcode4: Where change tabbar-properties in xcode4-interfacebuilder

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

Xcode4: Where change tabbar-properties in xcode4-interfacebuilder

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).

Xcode4: Where change tabbar-properties in xcode4-interfacebuilder


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜