snail-z / zhPopupController

Help you pop up custom views easily. and support pop-up animation, layout position, mask effect and gesture interaction etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zhPopupLayoutTypeCenter 这个属性只会弹出来一次,第二次就出不来了

gleeeli opened this issue · comments

只能弹出来一次 不知道你们遇到这个问题没

同问

加上 self.zh_popupController.layoutType 的设置就可以了。。。不知道为啥。。没仔细看

commented

上面回复不能完全解决问题,需要设置 self.zh_popupController.slideStyle = zhPopupSlideStyleFade; 属性才行,self.zh_popupController.layoutType 属性默认就是Center 故不需要再次设置。

commented
void (^dismissCallback)(void) = ^() {

        //Jerry: 下面这句话会造成从center弹出后,第二次点击maskView不能再弹出contentView的问题,注销掉,暂时不知道作者意图。

        //_slideStyle = [objc_getAssociatedObject(self, @selector(fadeDismiss)) integerValue];

        [self removeSubviews];
        
        _isPresenting = NO;
        _popupView.transform = CGAffineTransformIdentity;
        if (nil != self.didDismiss) {
            self.didDismiss(self);
        } else {
            if ([self.delegate respondsToSelector:@selector(popupControllerDidDismiss:)]) {
                [self.delegate popupControllerDidDismiss:self];
            }
        }
    };

原因就是alpha 0 问题。上面这位仁兄,可以解决问题。