romaonthego / RESideMenu

iOS 7/8 style side menu with parallax effect.
MIT License
7.1k stars 1.35k forks source link

The method setContentViewController: animated: presents a graphic glitch when the new content controller has a clear (transparent) background #224

Open marcovanetti opened 9 years ago

marcovanetti commented 9 years ago

The problem is that the old controller to hide and the new one to show, during the close-menu animation, are overlapped. If the new controller has a transparent BG, when the old controller disappear the user notices an ugly glitch.

The solution is simple and effective: inside method setContentViewController

[UIView animateWithDuration:self.animationDuration animations:^{
            contentViewController.view.alpha = 1;
        } completion: ... ]

becomes

[UIView animateWithDuration:self.animationDuration animations:^{
            _contentViewController.view.alpha = 0;
            contentViewController.view.alpha = 1;
        } completion: ... ]