I have this Objective-C Code :
- (IBAction)selectFileButtonAction:(id)sender { //create open panel... NSOpenPanel* openPanel = [NSOpenPanel openPanel];
For Swift 4 the check of the response should be
if response == .OK { ... }