Skip to content

Commit 7e94f61

Browse files
authored
修复一个 bug,在添加毛玻璃背景的时候,背景的点击事件失效
1 parent f811f1b commit 7e94f61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

TYAlertControllerDemo/TYAlertController/TYAlertController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ - (void)setBackgroundView:(UIView *)backgroundView
191191
- (void)addSingleTapGesture
192192
{
193193
self.view.userInteractionEnabled = YES;
194-
194+
_backgroundView.userInteractionEnabled = YES;
195+
195196
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTap:)];
196197
singleTap.enabled = _backgoundTapDismissEnable;
197198

0 commit comments

Comments
 (0)