how to attach a class to a view in the main story board

笑着哭i 提交于 2019-12-12 03:04:35

问题


I am new to XCode 4.2 , and I am trying to find a way to attach a class (.h and .m files) to a view in my main storyBoard ... how can I do that ?

Thanks


回答1:


if it's a subclass of UIViewController, you can assign in interface builder in xcode. Open the .xib, select your view, open the properties and assign a custom class Here is a screenshot : http://i.stack.imgur.com/fl4up.jpg



来源:https://stackoverflow.com/questions/8855526/how-to-attach-a-class-to-a-view-in-the-main-story-board

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!