Я довольно новичок в разработке какао для Mac. В настоящее время я изо всех сил пытаюсь получить представление viewController, чтобы он отображался в виде содержимого NSBox. Соответствующий код выглядит так:ViewController вид не отображается в NSBox с какао Mac
// AccountsViewController.h. ManagingViewController is a custom subclass of NSViewController
// as of Cocoa Programming for Mac.
@interface AccountsViewController : ManagingViewController
{
LoginViewController *loginViewController;
}
@property (strong) IBOutlet NSBox *box;
// Implementation
@implementation AccountsViewController
@synthesize box;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Initialization code here.
// Should display the view in the contentView(!?!)
loginViewController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];
box.contentView = loginViewController.view;
}
return self;
}
В настоящее время ничего не отображается в contentView. Что делать, чтобы просмотреть viewControllers в поле?
Спасибо, что сработало. – Anders