loadCibName:困难

时间:2011-08-25 11:00:52

标签: objective-c cocoa

我加载一个xib执行此操作:

[contentViews addObject:[[HMUISettingsViewController alloc] initWithNibName:"SettingsView" bundle:nil]];

在SettingsView.xib文件中,所有者是HMUISettingsViewController。 HMUISettingsViewController的一个出口是calendarTableView,但问题是:如果我尝试访问它,它总是不存在。这是HMUISettingsViewController类的摘录:

- (void)awakeFromNib
{   
    // Set delegate for resizing
    [mainSplitView setDelegate:self];
}

- (void)splitView:(NSSplitView)sender resizeSubviewsWithOldSize:(NSSize)oldSize
{
    var calendarTableFrame = [calendarTableView frame]; // Doesn't work!
}

1 个答案:

答案 0 :(得分:1)

您是否已将插座绑定到xib文件中的实际日历表视图?