您当前的位置: 首页 >  xcode

Xcode8.1中@IBDesignable以及@IBInspectable不能自动刷新的解决办法

发布时间:2016-11-06 13:31:30 ,浏览量:0

Xcode中的@IBDesignable和@IBInspectable关键字出来也有一段时间了,目的是当用户改变View属性时InterfaceBuilder的界面里可以得到即时刷新反馈.

这无疑对于App界面的调整带来很多方便.不过网上很多童鞋都会抱怨使用时会出现或多或少的问题,不要着急,就让本猫带领大家来看看到底该怎么使用这两个关键字. ;)

官方对这两个关键字(属性)是这么说的:

"Live Rendering
You can use two different attributes—@IBDesignable and @IBInspectable—to enable live, interactive custom view design in Interface Builder. When you create a custom view that inherits from the UIView class or the NSView class, you can add the @IBDesignable attribute just before the class declaration. After you add the custom view 
关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    107766博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0483s