2016-12-06 5 views
0

DeviceNotFound私のAppDelegateクラスにウィンドウがあります。presentViewControllerAsheetはウィンドウのように見える

class AppDelegate: NSObject, NSApplicationDelegate { 
    let deviceNotFoundWindowController = NSStoryboard(name: "Main", bundle:nil).instantiateController(withIdentifier: "DeviceNotFoundWindowController") as! DeviceNotFoundWindowController 

    func test() { 
     if let loadDataVc = NSStoryboard(name: "Main", bundle:nil).instantiateController(withIdentifier: "LoadDataViewController") as? LoadDataViewController 
     { 
      self.deviceNotFoundWindowController.contentViewController!.presentViewControllerAsSheet(loadDataVc) 
     } 
    } 
} 

私はそれが窓のように表示され、シートなどの別のViewControllerを表示するtest関数を呼び出します。私のDeviceNotFoundウィンドウはブロックされません。私はそれを移動することができます。

enter image description here

答えて

0

ああ、見つかった問題を。私の最初のwindow controller != deviceNotFoundWindowControllerはペン先から手に入るので。

関連する問題