Skip to content

Commit 4b5b549

Browse files
committed
解决按钮处于屏幕最底部是touchDown事件延迟
解决按钮处于屏幕最底部是touchDown事件延迟
1 parent 8a3c6c8 commit 4b5b549

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Example/.DS_Store

0 Bytes
Binary file not shown.

Example/SPAlertController/SPAlertController/SPAlertController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,16 +1707,16 @@ - (void)viewDidAppear:(BOOL)animated {
17071707

17081708
- (void)viewWillDisappear:(BOOL)animated {
17091709
[super viewWillDisappear:animated];
1710+
for(UIGestureRecognizer* gesture in self.view.window.gestureRecognizers){
1711+
gesture.delaysTouchesBegan = YES;
1712+
}
17101713
if ([self.delegate respondsToSelector:@selector(sp_alertControllerWillHide:)]) {
17111714
[self.delegate sp_alertControllerWillHide:self];
17121715
}
17131716
}
17141717

17151718
- (void)viewDidDisappear:(BOOL)animated {
17161719
[super viewDidDisappear:animated];
1717-
for(UIGestureRecognizer* gesture in self.view.window.gestureRecognizers){
1718-
gesture.delaysTouchesBegan = YES;
1719-
}
17201720
if ([self.delegate respondsToSelector:@selector(sp_alertControllerDidHide:)]) {
17211721
[self.delegate sp_alertControllerDidHide:self];
17221722
}

0 commit comments

Comments
 (0)