I'm using latest version Material library for Swift (2.16.0). And in my project I have NavigationDrawer controller with ToolBarController as root view controller. Then I try to present modally SearchBarController, motion animation worked perfectly
let searchController = AppStoryboard.Tree.viewController(viewControllerClass: SearchViewController.self)
let searchBarController = SearchBarController(rootViewController: searchController)
searchBarController.isMotionEnabled = true
searchBarController.motionTransitionType = .autoReverse(presenting: .fade)
toolbarController?.present(searchBarController, animated: true)
But in log I see messages:
Unbalanced calls to begin/end appearance transitions for <Material.SearchBarController: 0x7f8db554bde0>.
Unbalanced calls to begin/end appearance transitions for <NavigationDrawerController: 0x7f8db680b000>.
I know, that Motion library have transition(to: <UIViewController>)
method. But this method does not work for me, because it replaces the rootViewController
This has been fixed in CosmicMind/Motion #42 and released in
Motion 1.4.3
which is shipped withMaterial 2.16.3