mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-07 14:53:35 +00:00
Add canCancelAllTouchesInViews
This commit is contained in:
parent
e857463a93
commit
44e9a12b81
@ -45,6 +45,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
*/
|
*/
|
||||||
@property ASScrollDirection scrollableDirections;
|
@property ASScrollDirection scrollableDirections;
|
||||||
|
|
||||||
|
@property BOOL canCancelAllTouchesInViews;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@ -33,6 +33,13 @@
|
|||||||
return (ASScrollNode *)ASViewToDisplayNode(self);
|
return (ASScrollNode *)ASViewToDisplayNode(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)touchesShouldCancelInContentView:(UIView *)view {
|
||||||
|
if ([[self scrollNode] canCancelAllTouchesInViews]) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return [super touchesShouldCancelInContentView:view];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - _ASDisplayView behavior substitutions
|
#pragma mark - _ASDisplayView behavior substitutions
|
||||||
// Need these to drive interfaceState so we know when we are visible, if not nested in another range-managing element.
|
// Need these to drive interfaceState so we know when we are visible, if not nested in another range-managing element.
|
||||||
// Because our superclass is a true UIKit class, we cannot also subclass _ASDisplayView.
|
// Because our superclass is a true UIKit class, we cannot also subclass _ASDisplayView.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user