(IBAction)connectButtonTouched:(id)sender {
BOOL typeOFAction;
// Determine which Boat Connect Button was touched.
CGPoint buttonPosition = [sender convertPoint:CGPointZero toView:self.boatsAndDevicesTable];
NSIndexPath *indexPath = [self.boatsAndDevicesTable indexPathForRowAtPoint:buttonPosition]
NSLog(@"sender - %@", sender);
NSLog(@"sender - %@", ((UIButton *)sender).layer);
NSLog(@"button position - %f - %f", buttonPosition.x, buttonPosition.y);
NSLog(@"Index Path Section - %ld", (long)indexPath.section);
BoatWithStatus *boatForConnectButton = [self.boatsWithStatus objectAtIndex:indexPath.section-1];
The value returned from "convertPoint toView:" is not consistent.
Sometimes it matches the section/row and sometimes it doesn't.
I have tried different button actions (touch up, touch down) but the results are the same.