ボタンをクリックすると、以下のコードを使用しています
testViewController *myWindowController = [[testViewController alloc] initWithWindowNibName:@"RecordingsViewController"];
[myWindowController setDelegate:self];
activeModalWindow = [myWindowController window];
[NSApp beginSheet:[myWindowController window]
modalForWindow:[self window]
modalDelegate:self
didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
contextInfo:nil];
[NSApp runModalForWindow:[myWindowController window]];
[[myWindowController window] orderOut: self];
このtestViewControllerから、コードを使用してアラートを表示しています
NSString *theAlertMessage = [NSString stringWithFormat: @"Already added"];
NSRunAlertPanel(@"", theAlertMessage, @"OK", nil, nil);
ただし、このアラートの[OK]ボタンをクリックすると。アラートが画面に表示されたままです。助けてください!