背景视图无法消失
LixinQian opened this issue · 1 comments
LixinQian commented
@interface ViewController ()
@Property (nonatomic, strong) zhPopupController *popupVC;
@EnD
@implementation ViewController
-
(IBAction)click1:(id)sender {//按钮的点击事件
UIView *popView = [[UIView alloc]initWithFrame:CGRectMake(100, 100, [UIScreen mainScreen].bounds.size.width, 216)];
[self.popupVC.zh_popupController presentContentView:popView];
} -
(zhPopupController *)popupVC {
if (!_popupVC) {
_popupVC = [zhPopupController popupControllerWithMaskType:zhPopupMaskTypeWhite];
_popupVC.zh_popupController.layoutType = zhPopupLayoutTypeBottom;
_popupVC.zh_popupController.allowPan = YES;
}
return _popupVC;
}
@EnD
点击后,popView不见了,但是背景图没有消失
snail-z commented
首先popupVC这样初始化
_popupVC = [zhPopupController popupControllerWithMaskType:zhPopupMaskTypeWhite];
_popupVC.layoutType = zhPopupLayoutTypeBottom;
_popupVC.allowPan = YES;
[self.popupVC.zh_popupController presentContentView:popView]; // 然后 修改这行代码
这段代码改成下面这样
[self.popupVC presentContentView:popView];
你试下,如果还有问题,请及时反馈 谢谢