kitasuke / PagingMenuController

Paging view controller with customizable menu in Swift
MIT License
2.49k stars 448 forks source link

ViewWillApper() of selected view controller is not calling properly. #227

Closed thihaaung6245 closed 8 years ago

thihaaung6245 commented 8 years ago

Please add these code in PagingMenuControllerDemo2 in each controller

override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
        print("VC 1")
}

You will see that ViewWillAppear is not called.

Another bug is the same on PagingMenuControllerDemo1.It called viewWillAppear().But,show me different view controller name.See the screenshot.

paging error

This bug is urgent to fix because to those who are working with UITableView resizable at iOS 8,they need to call

 tableView.estimatedRowHeight = 100
 tableView.rowHeight = UITableViewAutomaticDimension
override func viewWillAppear(animated: Bool) {
        tableView.reloadData()
    }

which was one the bug of resizing tableview problem at iOS 8.So,if we cant call this method using your paging menu controller,it will not resize when view appear.

Any Help Please?

kitasuke commented 8 years ago

I'll investigate and fix this issue as soon as possible.

thihaaung6245 commented 8 years ago

Issue still not fixed yet?I wonder what's taking you so long.Please help.Please fix this quick.

Thanks.

kitasuke commented 8 years ago

This is my side project. I don't guarantee quick fixes all the time. If you have some issues, your pull request is welcomed.

Why don't you use delegate methods instead?

func willMoveToPageMenuController(menuController: UIViewController, previousMenuController: UIViewController) {
}

func didMoveToPageMenuController(menuController: UIViewController, previousMenuController: UIViewController) {
}
kitasuke commented 8 years ago

Please use delegate methods above instead for now. I'll let you know when it's fully supported.

thihaaung6245 commented 8 years ago

It is still not fixed yet.Why did you close this issue.And besides,I am still waiting for your fixes.

Here is my app and its on the App Store : https://itunes.apple.com/us/app/telenor-myanmar-self-care-app/id952597596?mt=8

which I used your library for Internet Packages.Thanks to you,but,I really need it fixed for iOS 8

kitasuke commented 8 years ago

This library couldn't support calling viewWillAppear in child view controller at this moment. Please use delegate methods instead. willMoveToPageMenuController is equal to viewWillAppear, so I believe that there is no big difference for now.

kitasuke commented 8 years ago

It's some technical restrictions caused by this library's view mechanism. If it really matters to your project, I strongly recommend to use other similar library to solve it.