开发者

Is there anyway nested xib with another xib file?

What I want to do, I have a UIVie开发者_C百科w with UIToolbar via IB, and the UIToolbar is customized via IB, what I want to set is set the UIToolbar by xib file, not load from source?

is it possible?

Thanks.


  1. Create UIToolbar in UIView XIB-file.
  2. Change class of UIToolbar from UIToolbar to MyCustomToolbarSubclass(choose yours subclass) in IB.

It's important to have this MyCustomToolbarSubclass for your custom UIToolbar. And you have to declare parent as UIToolbar. Change Object, UIViewController or anything you choose as parent class when create new class for your UIToolbar.

Also there are too many solves any problems with custom toolbars. It helps me.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜