mirror of
https://github.com/danog/Telegram.git
synced 2024-11-30 04:29:15 +01:00
19 lines
412 B
Objective-C
19 lines
412 B
Objective-C
#import "TGButton.h"
|
|
|
|
@implementation TGButton
|
|
|
|
@synthesize touchInset = _touchInset;
|
|
|
|
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
|
{
|
|
if (self.hidden || self.alpha < FLT_EPSILON)
|
|
return nil;
|
|
|
|
if (CGRectContainsPoint(CGRectInset(self.bounds, -_touchInset.width, -_touchInset.height), point))
|
|
return self;
|
|
|
|
return [super hitTest:point withEvent:event];
|
|
}
|
|
|
|
@end
|