你有没有办法拿走nsalert按钮的聚焦环。我的意思是:
这是我的代码:
[NSApp activateIgnoringOtherApps:YES];
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert addButtonWithTitle:@"Quit"];
[alert addButtonWithTitle:@"Cancel"];
[alert setMessageText:@"Warning!"];
[alert setInformativeText:@"How do you solve this question?"];
[alert setAlertStyle:NSWarningAlertStyle];
[alert beginSheetModalForWindow:nil modalDelegate:self didEndSelector:@selector(someMethodDidEnd:returnCode:contextInfo:) contextInfo:nil];
最佳答案
我想说你根本不应该这样做,这将违背苹果的指导方针。
关于objective-c - 如何获得焦点从NSAlert按钮?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13259823/