iOS UINavigationController push/pop 横向横屏动画
iOS UINavigationController push/pop cross horizontal cover animation
推送的控制器越过电流控制器。
结果如下:
图片 0
实际上,我已经挂接到这个应用程序,它使用一个名为 MMUINavigationController 的子类,
我确定当前的操作是 "pushViewController:animated:",这是我上钩的界面。
Tweak.xm:
图片 1
警报视图:
图片 2
如何制作?
补充,标准动画:
图片 3
推送控制器的导航栏
图片 4
这是一种解决方案:
- 隐藏导航控制器的导航栏
- 将导航栏添加到导航控制器的根视图控制器
- 恢复导航控制器的滑动返回手势
对于最后一点,您可以添加平移手势识别器(建议)或简单地将导航控制器的 interactivePopGestureRecognizer 委托设置为 nil:
self.navigationController?.interactivePopGestureRecognizer?.delegate = nil;
但请参阅此讨论以了解其含义:No Swipe Back when hiding Navigation Bar in UINavigationController
编辑:
满足要求的工作解决方案:只需在 viewWillAppear
中设置 navigationBarHidden
就可以了。
我在这里设置了一个示例演示:https://github.com/ldantona/NavigationBarExample
编辑 2:
刚找到这个库,有什么帮助吗?
https://github.com/MoZhouqi/KMNavigationBarTransition
The library can capture the background style of the navigation bar in
the disappearing view controller when pushing, and when you pop back
to the view controller, the navigation bar will restore the previous
style, so you don't need to consider the background style after
popping. And you also don't need to consider it after pushing, because
it is the view controller to be pushed that needs to be considered.
希望对您有所帮助
推送的控制器越过电流控制器。
结果如下:
实际上,我已经挂接到这个应用程序,它使用一个名为 MMUINavigationController 的子类, 我确定当前的操作是 "pushViewController:animated:",这是我上钩的界面。
Tweak.xm:
警报视图:
如何制作?
补充,标准动画:
图片 3
推送控制器的导航栏
图片 4
这是一种解决方案:
- 隐藏导航控制器的导航栏
- 将导航栏添加到导航控制器的根视图控制器
- 恢复导航控制器的滑动返回手势
对于最后一点,您可以添加平移手势识别器(建议)或简单地将导航控制器的 interactivePopGestureRecognizer 委托设置为 nil:
self.navigationController?.interactivePopGestureRecognizer?.delegate = nil;
但请参阅此讨论以了解其含义:No Swipe Back when hiding Navigation Bar in UINavigationController
编辑:
满足要求的工作解决方案:只需在 viewWillAppear
中设置 navigationBarHidden
就可以了。
我在这里设置了一个示例演示:https://github.com/ldantona/NavigationBarExample
编辑 2:
刚找到这个库,有什么帮助吗? https://github.com/MoZhouqi/KMNavigationBarTransition
The library can capture the background style of the navigation bar in the disappearing view controller when pushing, and when you pop back to the view controller, the navigation bar will restore the previous style, so you don't need to consider the background style after popping. And you also don't need to consider it after pushing, because it is the view controller to be pushed that needs to be considered.
希望对您有所帮助