问题描述
我有一个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-请参见 Objective C示例的文档.
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.
这篇关于Xcode6:具有Objective-C的IBDesignable和IBInspectable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!