Skip to main content

Posts

Showing posts with the label tableview

Why does my AlertView takes 3 clicks on cancel button to close?

NOTE: I still don't have an answer to this: I implemented a UIAlertView that displays a tableView to make a selection and return to the underlying view controller. The alert view pops up fine, displays all the data and when I click the cancel button it does not respond, then I click it again and it moves position by quarter of an inch, then when I click it for the third time, the alertView finally disappears. What would cause this type of behavior? This is the code: -(void)handleLongPress:(UILongPressGestureRecognizer *)gestureRecognizer { CGPoint p = [gestureRecognizer locationInView:self.tableView]; NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:p]; if (indexPath == nil){ NSLog(@"long press on table view but not on a row"); } else { NSLog(@"long press on table view at row %d", indexPath.row); selectedQuote = [self.quotes objectAtIndex:indexPath.row]; NSLog(@" subject title = %@", selectedQuote.title)