1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-04 18:37:47 +01:00
Telegram/legacy/TelegraphKit/TGRTLScreenEdgePanGestureRecognizer.m

30 lines
899 B
Mathematica
Raw Normal View History

2015-10-01 18:19:52 +02:00
/*
* This is the source code of Telegram for iOS v. 1.1
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Peter Iakovlev, 2013.
*/
#import "TGRTLScreenEdgePanGestureRecognizer.h"
2016-02-25 01:03:51 +01:00
#import "TGModernConversationInputMicButton.h"
2015-10-01 18:19:52 +02:00
2016-02-25 01:03:51 +01:00
@implementation TGRTLScreenEdgePanGestureRecognizer
2015-10-01 18:19:52 +02:00
2016-02-25 01:03:51 +01:00
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
if (touch != nil) {
CGPoint location = [touch locationInView:self.view];
UIView *targetView = [self.view hitTest:location withEvent:event];
if ([targetView isKindOfClass:[TGModernConversationInputMicButton class]]) {
self.state = UIGestureRecognizerStateFailed;
return;
}
}
[super touchesBegan:touches withEvent:event];
2015-10-01 18:19:52 +02:00
}
@end