pkluz / PKRevealController

PKRevealController is a delightful view controller container for iOS, enabling you to present multiple controllers on top of one another.
Other
3.85k stars 659 forks source link

setFrontViewController deprecated, no replacement #244

Closed d370urn3ur closed 6 years ago

d370urn3ur commented 7 years ago

The documentation is incorrect for setFrontViewController:focusAfterChange:completion:. It says

Deprecated because unnecessary. Functionality can be reproduced by calling showViewController:animated:completion

However, showViewController: does not reproduce the functionality of setFrontViewController. setFront exchanges the front view controller with the new one passed in as the parameter, showViewController doesn't replace the front view controller, it just animates the opening / closing of the side views.

Why is setFrontViewController deprecated? I don't see any other method that can replace this critical functionality.

stuberm commented 6 years ago

Just set the front view controller before calling show.

revealViewController.frontViewController = viewController
revealViewController.show(viewController)