New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-9973]iOS: Fix TableView's longpress event. #2597
Conversation
} | ||
} | ||
NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys: | ||
NUMBOOL(NO),@"detail", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should include section
data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section responds to a longpress on a tableView that is outside the section bounds (Like the tableView header or footer). So the section
piece was left out of the event.
From the docs for indexPathForRowAtPoint:
An index path representing the row and section associated with point or nil if the point is out of the bounds of any row.
Observed behavior is that when the point belongs to sectionHeader or Footer it returns a false indexPath belonging to a row. Also observed that when the point belongs to the header of the first section indexPath
is nil. The first special case is handled in the next block. The second special case is handled in the block above. The event generated here is for when indexPath is truly nil and does not correspond to a section or row.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that makes sense.
Code reviewed, please address comments. |
Code reviewed, APPROVED |
Functional tested, iPhone Sim 5.1. APPROVED |
[TIMOB-9973]iOS: Fix TableView's longpress event.
That pull request made complex tableviews a lot slower! |
Test is in JIRA
Basically unless you click a row the row,rowData properties must be nil.
If you click a section header or footer section should not be nil but row and rowData must be nil.
If you click outside the section bounds section,row,rowData must be nil