Objective c 选择要在启动时打开的默认窗口
我正在开发一个MacOS X(Objective-C/Cocoa)应用程序,其基本工作方式如下: 首先打开一个窗口,请求用户的用户名/密码。如果凭据有效,将显示主应用程序 以下是我打开凭证窗口的步骤:Objective c 选择要在启动时打开的默认窗口,objective-c,cocoa,Objective C,Cocoa,我正在开发一个MacOS X(Objective-C/Cocoa)应用程序,其基本工作方式如下: 首先打开一个窗口,请求用户的用户名/密码。如果凭据有效,将显示主应用程序 以下是我打开凭证窗口的步骤: @implementation BetaseriesDesktopAppDelegate - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { authWindow = [[Authenticat
@implementation BetaseriesDesktopAppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
authWindow = [[AuthenticateWindow alloc] init];
[authWindow makeKeyAndOrderFront:nil];
[authWindow becomeFirstResponder];
}
- (void)login:(id)sender
{
NSLog(@"Login");
User *user = [[User alloc] init];
}
@end
问题是,主窗口如果在应用程序启动时也打开。它如何防止它这样做?它是必须在Interface Builder中设置的属性,还是必须在我的
ApplicationIDFinishLaunching
方法中设置?还有什么吗?在Interface Builder中,选择窗口。在“窗口属性信息”窗格中,取消选择“启动时可见”选项