首页 > 编程语言 > 详细

swift之xib关联UIView

时间:2015-02-11 15:55:07      阅读:550      评论:0      收藏:0      [点我收藏+]

有点坑爹,设置file owner 不行,搞了一早上,来说下怎么关联吧

自定义UIView要重写

required init(coder aDecoder: NSCoder) {

        super.init(coder: aDecoder)

    }

xib里面,不能设置file owner,要设置View的custom class 指定自定义的UIView文件名  

然后outlet xib的控件到自定义UIView类中即可

swift之xib关联UIView

原文:http://www.cnblogs.com/helloandroid/p/4286101.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!