zhPopupController
zhPopupController copied to clipboard
zhPopupController dealloc.
UIView *v = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 屏幕宽 * 0.8, 213)]; self.zh_popupController = [[zhPopupController alloc] init]; self.zh_popupController.layoutType = zhPopupLayoutTypeLeft; self.zh_popupController.allowPan = YES ; [self.zh_popupController presentContentView:v];
无效打印 zhPopupController dealloc
并没有弹出自定义的视图
需要贴详细的代码看下
我是在一个view的回调block中调用方法 想让自定义的view弹出 具体代码就是 这个block调用的方法 UIView * v = [[UIView alloc] initWithFrame:CGRectMake(0,0,屏幕宽* 0.8,213)]; self.zh_popupController = [[zhPopupController alloc] init]; self.zh_popupController.layoutType = zhPopupLayoutTypeLeft; self.zh_popupController.allowPan = YES; [self.zh_popupController presentContentView:v]; 不过还没有弹出 就走dealloc方法了
TXAlertView *alert = [TXAlertView customAlertView]; alert.frame = CGRectMake(0, 0, ZPScreenW * 0.8, 213); alert.showAlertType = AlertTypeOpenStorage; self.alertView = alert; self.zh_popupController = [[zhPopupController alloc] init]; self.zh_popupController.layoutType = zhPopupLayoutTypeLeft; self.zh_popupController.allowPan = YES; [self.zh_popupController presentContentView:self.alertView];
我是使用xib创建这个view
普通按钮 presentContentView自定义的视图也没有效果 尝试了以前的SnailPopupController就可以
如果方便的话,可以做个类似的demo发下,我也很想知道这个问题,邮箱 [email protected],谢谢
我试着写demo并没有发现有问题,但是在我的项目中就有这个问题 视图创建了,但是并没有显示出来,只是一个单纯的按钮点击以后 ,想在首页弹出xib自定义的视图,然而并不是想象的那样........
可能是window获取失败造成的,将源码中的57至63行,改成下面这样试下呢
- (UIView *)applicationWindow {
return [[UIApplication sharedApplication] keyWindow];
}
按照上面的方法可以实现,因为我看到我的第一个widonw(windows.firstObject)并不是显示的window
好的,我会尽快更新,感谢分享问题
谢谢奉献者,^^
我也遇到这个问题了😳 ,期待新版本,感谢奉献者 😙
问题已解决,欢迎使用最新版本。