objective c - OS X Storyboard Segue dismissController -



objective c - OS X Storyboard Segue dismissController -

i user os x storyboard , have created segue viewcontroller style sheet.

inside sheet view button close it. connected button dismisscontroller ibaction.

if run function dismisscontroller without user interaction viewcontroller gone sheet not go away.

does 1 know how dismiss viewcontroller correctly within sheet ?

here short illustration i'am trying. function viewcontroller within sheet.

override func viewdidappear() { allow chooessourcedirectorydialog: nsopenpanel = nsopenpanel() chooessourcedirectorydialog.canchoosedirectories = true chooessourcedirectorydialog.canchoosefiles = false if chooessourcedirectorydialog.runmodal() == nsokbutton { // stuff selected directory } else { // here close sheet self.dismisscontroller(nil) } }

thanks help

a sheet view "view", hence should utilize

self.dismissviewcontroller(#the controller name#)

instead of

self.dismisscontroller(nil)

dismisscontroller used dismiss multiple controllers.

objective-c osx swift storyboard segue

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -