<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Storyboard on prometheus</title><link>https://new.halfrost.com/zh/categories/storyboard/</link><description>Recent content in Storyboard on prometheus</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><copyright>halfrost</copyright><lastBuildDate>Fri, 22 Jul 2016 05:13:00 +0000</lastBuildDate><atom:link href="https://new.halfrost.com/zh/categories/storyboard/index.xml" rel="self" type="application/rss+xml"/><item><title>关于 IB_DESIGNABLE / IBInspectable 的那些需要注意的事</title><link>https://new.halfrost.com/zh/ios_ib_designable_ibinspectable/</link><pubDate>Fri, 22 Jul 2016 05:13:00 +0000</pubDate><guid>https://new.halfrost.com/zh/ios_ib_designable_ibinspectable/</guid><description>前言 IB_DESIGNABLE / IBInspectable 这两个关键字是在WWDC 2014年&amp;quot;What&amp;rsquo;s New in Interface Builder&amp;quot;这个Session里面，用Swift讲过一个例子。也是随着Xcode 6 新加入的关键字。
这两个关键字是用在我们自定义View上的，目前暂时只能用在UIView的子类中所以系统自带的原生的那些控件使用这个关键字都没有效果。
Live RenderingYou 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 to Interface Builder (by setting the custom class of the view in the inspector pane), Interface Builder renders your view in the canvas.</description></item></channel></rss>