Recently upgrade to macOS Sierra version 10.12, Xcode version 8.2.1
The following code works on OS Sierra but with a warning message. It works on the previous OS El Capitan 10.11 without warning message.
Anyone can advise how to get rip of this warning message?
warning: <NSRemoteView: 0x618000123200> determined it was necessary to configure <NSVBOpenPanel: 0x102e816d0> to support remote view vibrancy
my code is below:
@IBAction func btnChooseFile(_ sender: Any)
{
let dialog = NSOpenPanel()
dialog.title = "Choose a project file"
dialog.showsResizeIndicator = true
dialog.showsHiddenFiles = false
dialog.canChooseDirectories = false
dialog.canCreateDirectories = false
dialog.allowsMultipleSelection = false
dialog.allowedFileTypes = ["txt"]
if (dialog.runModal() == NSModalResponseOK) {
let result = dialog.url // Pathname of the file
if (result != nil) {
let path = result!.path
txtProject.stringValue = path
}else{
// Display error message
}
} else {
return
}
}