如何在Interface Builder(Xcode)中显示属性

时间:2013-02-12 22:28:26

标签: objective-c xcode interface-builder

我创建了一个协议CustomComponentDataSource,用于将数据传递到CustomComponent

@protocol CustomComponentDataSource <NSObject>
- (NSUInteger)numberOfBlocksInView:(CustomComponent *)customComponent;
...
@end

@interface CustomComponent : NSView
...
@property id <CustomComponentDataSource> dataSource;
...
@end

是否可以使此dataSource属性可见并准备在XCode Interface Bulder中链接?

enter image description here

1 个答案:

答案 0 :(得分:2)

将其声明为IBOutlet

@property IBOutlet id <CustomComponentDataSource> dataSource;