开发者

Is there anyway nested xib with another xib file?

开发者 https://www.devze.com 2023-02-06 22:42 出处:网络
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?

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

精彩评论

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