I'd like to make something like this NSAlert
:
As you can see, the 'return' button is the second one. How can I do this?
Here's an example of the code that I use to create my NSAlert
, but the first button gets the focus:
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:@"Are you sure you want to disconnect?"];
[alert addButtonWithTitle:@"Disconnect"];
[alert addButtonWithTitle:@"Cancel"];
[alert runModal];
I want to focus the "Cancel" button. Any ideas? Thanks!