2

我正在为 Swift (2.16.0) 使用最新版本的材料库。在我的项目中,我有以 ToolBarController 作为根视图控制器的 NavigationDrawer 控制器。然后我尝试以模态方式呈现 SearchBarController,运动动画效果很好

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)

但在日志中我看到消息:

Unbalanced calls to begin/end appearance transitions for <Material.SearchBarController: 0x7f8db554bde0>.
Unbalanced calls to begin/end appearance transitions for <NavigationDrawerController: 0x7f8db680b000>.

我知道,那个 Motion 库有transition(to: <UIViewController>)方法。但是这种方法对我不起作用,因为它取代了rootViewController

4

1 回答 1

0

这已在CosmicMind/Motion #42Motion 1.4.3中修复并发布Material 2.16.3

于 2018-07-27T08:57:59.557 回答