Skip to content

Commit 7811fec

Browse files
authored
Merge pull request 12207480#1 from raozhizhen/raozhizhen-patch-1
修复了一个 bug,在添加毛玻璃背景的时候,背景的点击事件失效
2 parents f811f1b + 7e94f61 commit 7811fec

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)