Post

Replies

Boosts

Views

Activity

Reply to convertPoint returning wrong data in tableview
Here are the logs.... Also note that is requires at least 4 sections before the problem exists. It his case, the button touched was in Section 1. 2022-04-28 17:08:27.113602-0400 CMonster[19263:907393] sender - <UIButton: 0x149e44370; frame = (300 10; 100 40); clipsToBounds = YES; opaque = NO; autoresize = LM+BM; layer = <CALayer: 0x2836fa8c0>> 2022-04-28 17:08:27.114013-0400 CMonster[19263:907393] sender - <CALayer: 0x2836fa8c0> 2022-04-28 17:08:27.114162-0400 CMonster[19263:907393] button position - 300.000000 - 190.000000 2022-04-28 17:08:27.114301-0400 CMonster[19263:907393] Index Path Section - 4 2022-04-28 17:08:27.114430-0400 CMonster[19263:907393] Index Path Row - 0 Returned to the same screen and touched the same button in Section 1. 2022-04-28 17:10:06.797661-0400 CMonster[19263:907393] sender - <UIButton: 0x149e57850; frame = (300 10; 100 40); clipsToBounds = YES; opaque = NO; autoresize = LM+BM; layer = <CALayer: 0x2836f5280>> 2022-04-28 17:10:06.797981-0400 CMonster[19263:907393] sender - <CALayer: 0x2836f5280> 2022-04-28 17:10:06.798119-0400 CMonster[19263:907393] button position - 300.000000 - 10.000000 2022-04-28 17:10:06.798264-0400 CMonster[19263:907393] Index Path Section - 1 2022-04-28 17:10:06.798407-0400 CMonster[19263:907393] Index Path Row - 0
Topic: App & System Services SubTopic: General Tags:
Apr ’22
Reply to convertPoint returning wrong data in tableview
(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.
Topic: App & System Services SubTopic: General Tags:
Apr ’22