Peek and Pop with preview item actions (viewDidDisappear called twice)

268 views Asked by At

on iOS 9 with peek and pop implementation why viewDidDisappear method is called twice in this case ?

for exemple i peek the view controller, then I see all preview actions of the view controller without using actions , then when a pop the view controller, the view controller dismissed.

viewController 1 -------> viewController 2

step 1. PEEK viewController 2

step 2. see all previewActionItems (whithout using it )

step 3. POP TO viewController 2

method called :

  1. previewingContext(previewingContext: UIViewControllerPreviewing, viewControllerForLocation location: CGPoint) VIEW CONTROLLER 1

  2. viewDidDisappear(animated : Bool) view controller 2

  3. previewingContext(previewingContext: UIViewControllerPreviewing, commitViewController viewControllerToCommit: UIViewController) viewController 1

  4. viewDidDisappear(animated : Bool) view controller 2 ( why this method is called twice in this case? )

0

There are 0 answers