mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Restricting long press for folders.
This commit is contained in:
parent
0f23391cbf
commit
1527cfbed2
1 changed files with 9 additions and 5 deletions
|
@ -163,6 +163,7 @@
|
|||
|
||||
UIImage *folderImage;
|
||||
int folderImageViewX = 10;
|
||||
BOOL allowLongPress = NO;
|
||||
|
||||
if (section == 0) {
|
||||
folderImage = [UIImage imageNamed:@"ak-icon-global.png"];
|
||||
|
@ -202,6 +203,7 @@
|
|||
} else {
|
||||
folderImageViewX = 7;
|
||||
}
|
||||
allowLongPress = YES;
|
||||
}
|
||||
[folderImage drawInRect:CGRectMake(folderImageViewX, 6, 20, 20)];
|
||||
|
||||
|
@ -213,11 +215,13 @@
|
|||
[self addSubview:customView];
|
||||
}
|
||||
|
||||
UILongPressGestureRecognizer *longpress = [[UILongPressGestureRecognizer alloc]
|
||||
initWithTarget:self action:@selector(handleLongPress:)];
|
||||
longpress.minimumPressDuration = 1.0;
|
||||
longpress.delegate = self;
|
||||
[self addGestureRecognizer:longpress];
|
||||
if (allowLongPress) {
|
||||
UILongPressGestureRecognizer *longpress = [[UILongPressGestureRecognizer alloc]
|
||||
initWithTarget:self action:@selector(handleLongPress:)];
|
||||
longpress.minimumPressDuration = 1.0;
|
||||
longpress.delegate = self;
|
||||
[self addGestureRecognizer:longpress];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleLongPress:(UILongPressGestureRecognizer *)gestureRecognizer {
|
||||
|
|
Loading…
Add table
Reference in a new issue