How to start moving after the long tap detect? long tap detect with uilongpressgesturerecognizer. My code:
`- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
flMoveRow = NO;
[self setEditing:YES animated:YES];
[listView reloadData];
}
- (void)longTapGesture:(UILongPressGestureRecognizer *)sender{
if((sender.state != UIGestureRecognizerStateEnded)&&(!flMoveRow)){
NSLog(@"==longTapGesture:");
flMoveRow = YES;
[listView beginUpdates];
NSArray *indexPaths = [[NSArray alloc] initWithObjects:indexPath, nil];
[listView reloadRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone];
[listView endUpdates];
sender.enabled = NO;
return;
}
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath{
NSLog(@"==canMoveRowAtIndexPath:%i -- %d", indexPath.row, (int)flMoveRow);
return flMoveRow;}`
break touch. Thanks.
There is a control available on cocoacontrols.com which mimics the Clear app. It is still being worked on apparently but when I downloaded it, it was still very impressive. You could either incorporate it fully in your app or use it as a starting point in your own research.
link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With