objective-c - ios 关于弹出的视图把最顶部的导航栏都遮盖掉 且能滑动返回
PHP中文网
PHP中文网 2017-04-18 09:06:41
0
2
699

如题 遮盖掉
一般我能想到的只有3中方式

  1. 直接用一个全屏view加到window上面。

  2. 模态出一个controller。

  3. 当前controller addChildViewController也可以。

但是这些都无法满足滑动返回,因为都不是加在当前的view上所以无法在当前视图实现滑动返回,有没有人知道这种该如何实现?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
Ty80

I have solved it. Let me talk about it here. You can first set the transparency of the navigation bar to 0 in viewWillAppear and set the transparency of the navigation bar to 1 in viewWillDisappear. The height and width of the view will be full screen. This will solve the problem

巴扎黑

Just hide the navigationBar

Call in viewWillAppear

[self.navigationController setNavigationBarHidden:YES animated:YES];

But there is a problem with sliding back at this time
Call in viewDidLoad

self.navigationController.interactivePopGestureRecognizer.delegate = (id<UIGestureRecognizerDelegate>)self;

Just add a return button yourself

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template