嵌入式弹窗视图点击问题
2020-04-30 本文已影响0人
丶王无情


页面实现后开始发现popView cell点击不了,后面通过- (UIView*)hitTest:(CGPoint)pointwithEvent:(UIEvent*)event;方法改变了sectionView子视图点击事件传递响应完成popview的点击响应, 但后面发现点击下面tableCell代理方法 和cell按钮都无法响应点击事件,也就是遇到了sectionView上的popView和tableCell点击只能其一能响应点击事件的问题,
通过思考问题还是在- (UIView*)hitTest:(CGPoint)pointwithEvent:(UIEvent*)event;方法问题上,就是一开始没有考虑到写在sectionView里的方法会影响到控制器table的点击事件
解决方法:布尔变量保存popView展开状态 修改方法返回不同view响应事件
