0
私は基本的にこのように動作するMacOS X(Objective-C/Cocoa)アプリケーションで作業しています: まずウィンドウが開き、ユーザーのユーザー名/パスワードを要求します。資格情報が有効な場合は、メインアプリケーションが表示されます。起動時に開くデフォルトのウィンドウを選択します
これは私が私の資格ウィンドウを開くために何をすべきかです:
@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で設定する必要があるプロパティですか、またはapplicationDidFinishLaunching
メソッドでそれを行う必要がありますか?他に何か?