Skip to content

Commit

Permalink
Remove manually called viewWillAppear() and viewDidAppear() because i…
Browse files Browse the repository at this point in the history
…t causes problems like issue PageMenu#71

They are called automatically when the viewController.view is added to the viewController hierarchy.
  • Loading branch information
mitsuyoshi-yamazaki committed Jul 27, 2015
1 parent 0078bb6 commit 00ede0c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Classes/CAPSPageMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,7 @@ public class CAPSPageMenu: UIViewController, UIScrollViewDelegate, UIGestureReco
for controller in controllerArray {
if index == 0.0 {
// Add first two controllers to scrollview and as child view controller
controller.viewWillAppear(true)
addPageAtIndex(0)
controller.viewDidAppear(true)
}

// Set up menu item for menu scroll view
Expand Down Expand Up @@ -835,7 +833,7 @@ public class CAPSPageMenu: UIViewController, UIScrollViewDelegate, UIGestureReco
oldVC.willMoveToParentViewController(nil)

oldVC.view.removeFromSuperview()
oldVC.removeFromParentViewController()
oldVC.removeFromParentViewController()
}


Expand Down

0 comments on commit 00ede0c

Please sign in to comment.