Xcode6:具有Objective-C的IBDesignable和IBInspectable

问题描述:

我有一个Objective-C UI组件,我希望使用Xcode 6在Interface Builder中对其进行检查.Swift具有@IBDesignable@IBInspectable声明属性.它们在Objective-C中也可用吗?他们如何使用?

I have an Objective-C UI component that I'd like to make inspectable in Interface Builder with Xcode 6. Swift has the @IBDesignable and @IBInspectable declaration attributes. Are they available also in Objective-C? How are they used?

等效项是IB_DESIGNABLE和IBInspectable-请参见

The equivalents are IB_DESIGNABLE and IBInspectable—see the documentation for Objective C examples.

此外,今年的WWDC视频"Interface Builder中的新增功能"在Swift中也有其示例,但演示者还提到了与Objective C等效的内容.

Also, this year's WWDC video "What's New in Interface Builder" has its examples in Swift, but the presenter also mentions the Objective C equivalents in passing.