RESideMenu icon indicating copy to clipboard operation
RESideMenu copied to clipboard

viewWillAppear and viewDidAppear should be called on the menu view controller

Open alejandro-isaza opened this issue 9 years ago • 7 comments

When I call presentLeftMenuViewController I expect viewWillAppear: and viewDidAppear: to be called on the leftMenuViewController. Similarly with rightMenuViewContoller and on disappear. Currently the view appear methods are only called once when the app launches.

alejandro-isaza avatar Sep 05 '14 19:09 alejandro-isaza

:+1: Any news on that?

x2on avatar Oct 14 '14 15:10 x2on

@x2on: i just tested this on my install and it works properly. i dropped a last line in awakeFromNib: [self presentLeftMenuViewController]; and viewDidAppear was fired off on my left menu: 2014-10-16 17:22:14.466 myApp[3367:1675662] -[MyAppLeftMenuVC viewDidAppear:]

wdcurry avatar Oct 17 '14 00:10 wdcurry

When i call presentLeftMenuViewController from another view controller, only the first time viewDidAppear is called on my tests.

x2on avatar Oct 20 '14 17:10 x2on

I agree that viewDidAppear: and viewWillAppear: should be called when revealing the menus. In my testing, they are called once, and the one time they are called is not even a time where the menu is coming into view.

airdrummingfool avatar Mar 27 '15 01:03 airdrummingfool

Actually #227 doesn't cover all situations. If the menu is in front and you close it with gesture viewDidAppear from the contentViewController ist not called.

x2on avatar Apr 21 '15 13:04 x2on

@x2on: If you're referring to events not being called on the content view controller when the menu opens or closes, that was a conscious decision. My current understanding is that the content view controller never fully leaves the screen when the menus are activated, so in my opinion it doesn't actually "disappear" or "appear". That interpretation is certainly up for debate/correction :)

As an alternative, you can use the RESideMenuDelegate methods such as sideMenu:didHideMenuViewController: to track when the content view controller is shifted away or restored to the center.

airdrummingfool avatar Apr 21 '15 16:04 airdrummingfool

Ok now i get your purpose.

For me if the menu is shown the contentViewController is then disappeared, because you are focused on the menu and not you see only a small part of the contentViewController and can't interact with it.

I created the #236 to track if the contentViewController is changed for implementing the transition in the delegate.

x2on avatar Apr 23 '15 13:04 x2on