ios - Segue not executing -
i having brain block. after combing database @ loss why segue not executing. took me long enough figure out how reset nsuserdefaults. when did, figured work fine. after all, have set many segues in app. now, 1 nothing.
func isappalreadylaunchedonce()->bool{ let defaults = nsuserdefaults.standarduserdefaults() if let isappalreadylaunchedonce = defaults.stringforkey("isappalreadylaunchedonce"){ println("app launched") return true }else{ defaults.setbool(true, forkey: "isappalreadylaunchedonce") println("app launched first time") performseguewithidentifier("showeula", sender: self) return false } }
the log shows "app launched first time" text expect segue execute. however, noting happens. please help. thank you.
try dispatch_async on main_queue. call function in viewwillappear.
func segue() { dispatch_async(dispatch_get_main_queue(),{ self.performseguewithidentifier("showeula", sender: nil) }) }
Comments
Post a Comment