i have 2 vc, , b, when present b formsheet type, method viewwilldisappear in not called. when in b, , press a, viewwillappear not called. how make viewwillappear in called? i've seen somewhere, din't find answer.
in b set:
protocol callbackviewwillappeardelegate: class { func callbackviewwillappear(controller: userrightroletableviewcontroller) } and delegate variable:
weak var callbackviewwillappeardelegate: callbackviewwillappeardelegate? and in button:
@ibaction func backtouserrightbuttonaction(sender: anyobject) { callbackviewwillappeardelegate?.callbackviewwillappear(self) dismissviewcontrolleranimated(true, completion: nil) } in import protocol , set protocol function:
func callbackviewwillappear(controller: userrightroletableviewcontroller) { viewwillappear(true) }
the method viewwilldisappear not called controller because stays on view hierarchy.
Comments
Post a Comment