如何将类附加到主故事板中的视图 [英] how to attach a class to a view in the main story board

查看:27
本文介绍了如何将类附加到主故事板中的视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 XCode 4.2 的新手,我正在尝试找到一种方法将类(.h 和 .m 文件)附加到我的主 storyBoard 中的视图......我该怎么做?

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 ?

谢谢

推荐答案

如果是UIViewController的子类,可以在xcode的interface builder中赋值.打开 .xib,选择您的视图,打开属性并分配自定义类这是一个截图:http://i.stack.imgur.com/fl4up.jpg

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

这篇关于如何将类附加到主故事板中的视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆