我有一个带有IBOutlet的控制器如下:
@interface MyController : NSViewController <NSPopoverDelegate>
{
IBOutlet NSWindow *detachedWindow;
}
@property (retain, nonatomic) NSWindow *detachedWindow;
@end
我想在以下类中访问该出口(detachedWindow
):在基于视图的表视图中为单元视图添加此子类。
@interface HoverTableRowView : NSTableRowView<NSTableViewDelegate,NSPopoverDelegate> {
__weak MyController *_delegateObject;
}
@implementation HoverTableRowView
@synthesize delegateObject = _delegateObject;
- (void)awakeFromNib
{
NSLog(@"awake from nib is being called");
NSLog(@"detached window outlet is--%@",[[self delegateObject ]detachedWindow]);
}
@end
但detached window outlet is--
总是返回null
。如何在“HoverTableRowView”类中访问该插座?