Open dppeak opened 10 years ago
Hi Dave, I can not tell for sure whether this is an issue on an older version. Can you reproduce this issue on the provided examples with the latest iOS?
Thanks,
Was there ever a resolution to this? I'm experiencing the same problem. The problem occurs when you call setRightViewController while the right view controller is /not/ revealed. The specific scenario is:
Note calling setRightViewController before the SWRevealViewController has actually been displayed on the screen seems to work fine.
This is with SWRevealViewController 2.3.0 on iPad running iOS 8 (tested up to 8.3). There are no storyboards or xib's, the user interface is entirely created in code. I only use SWRevealViewController on iPad, so I don't know if the same is true on iPhone.
Hello jbhelm,
I just updated the class to v2.4.0. The class now removes the internal views from the view hierarchy when the rear or right views are concealed. This provides a different behaviour for calling the appearance methods. Please can you check whether it works as you expect now?
John
John --
Thank you for the /very/ quick response! I've downloaded 2.4.0 and a quick initial test shows that this version does indeed fix the issue, viewWillAppear/viewDidAppear are only called when the view is actually revealed.
Thank you!
Josh
I'm working on an app that only shows the rightViewController when the user has logged in. It uses storyboard to set the sw_rear, sw_front, and sw_right appropriately. Then in the viewDidLoad of the front controller I have the following code:
The problem is that as soon as I set rightViewController, the viewDidLoad, viewWillAppear, and viewDidAppear methods for the rightViewController are executed even though the right view is not yet revealed. Furthermore, when the user actually pans (or clicks right menu button) to display the right view, the viewWillAppear and viewDidAppear methods do not get called. This only happens the first time after setting the rightViewController.
We are supporting iOS 6 in this app, so we are using version 1.1.3 of the library.
Thanks, Dave