开发者

How can I make a custom class be displayed in MainWindow.xib?

I created a custom class that inherits from UIView and I want to display an instance on the screen. However, when I try to link the outlet from the App Delegate to the object I dragged onto the screen (which is that custom class I created) the link cannot be created.

W开发者_高级运维hat am I missing?


You should add a generic view in your window inside IB, and then, select this new view (let's call it myView) and go to the identity inspector (cmd+4) and write the class name of myView in the Class box inside the inspector. You may be able to link the iboutlet with your view now.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜