1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-02 17:38:07 +01:00
Telegram/Telegraph/TGDialogListTitleContainer.m

32 lines
720 B
Mathematica
Raw Normal View History

2015-10-01 18:19:52 +02:00
#import "TGDialogListTitleContainer.h"
@implementation TGDialogListTitleContainer
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self != nil)
{
[self addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGesture:)]];
}
return self;
}
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)__unused event
{
if (CGRectContainsPoint(CGRectInset(self.bounds, -70.0f, -44.0f), point))
return self;
return nil;
}
- (void)tapGesture:(UITapGestureRecognizer *)recognizer
{
if (recognizer.state == UIGestureRecognizerStateEnded)
{
if (_tappped)
_tappped();
}
}
@end