开发者

Custom control with properties in Interface Builder

开发者 https://www.devze.com 2023-03-12 05:39 出处:网络
I want to subclass UILabel and add some properties. Is it possible to make a custom control in Interface Builder and set this properties in it? Like text, fon开发者_开发知识库t etc.In previous versio

I want to subclass UILabel and add some properties. Is it possible to make a custom control in Interface Builder and set this properties in it? Like text, fon开发者_开发知识库t etc.


In previous versions, you could create a custom Interface Builder plugin (IBPlugin). This is not possible in Xcode 4 as IBPlugin support has been removed.

Update: Support is there (as of 4.1 and 4.2) for editing nibs/xibs containing custom objects provided by IBPlugins, but that's all. That is, custom objects appear as generic views/objects and you don't get the IB palette to edit them. This is incremental progress. In 4.0, you couldn't even open such nibs/xibs. File enhancement requests at bugreport.apple.com if you feel they should bring back full IBPlugin support.

0

精彩评论

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