-
Notifications
You must be signed in to change notification settings - Fork 152
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
More changes! (features + performance + general improvements) #127
Conversation
…identally press on something goes down 500x
…sed for row backgrounds while making sense as a name
The docs for [UITableViewDelegate tableView:willSelectRowAtIndexPath:] say that you may “return nil if you don’t want the row selected”. That makes sense, and given that KKGridView mimics the UITableView interface, it’s nice to have the option to cancel the selection by returning nil, too.
The docs for [UITableViewDelegate tableView:willSelectRowAtIndexPath:] say that the “method is not called until users touch a row and then lift their finger”. This makes sense, otherwise the callback is triggered twice for each selection (once for touch down, once for touch up).
…ntil the property is either accessed, or the cell is pressed. Don't add selected background as a subview until pressed at all.
Thanks for all your hard work! |
Not a problem; thank you for making this in the first place! |
There's a new issue with deletion… In the demo, try pressing the delete button, and then trying to scroll; all the cells in the first section start spinning around and freaking out. I may have messed this up in some of my in-between changes, but I just wanted to see if you had any insight into this before I went looking. |
Unsure. It works fine if the section goes offscreen, and comes back on screen. I can look into it a bit. Also, unrelated, but, -_respondToBoundsChange calls -reloadData, and -setNeedsLayout, and -reloadData also calls -setNeedsLayout. |
Thanks. I think @kolinkrewinkel is now looking into the issue I mentioned (#129). As for the multiple calls to |
This change set is rather big, and I'll be happy to break it up into a few smaller pull requests if desired. I think I managed to avoid using any tabs, so, the formatting should be good. And, of course, everything works fine in my testing, however, no one's perfect, and I may have missed things.
(Specifically: I do not have multiple selection enabled, and do my own custom highlighting/selection states in KKGridViewCell subclasses, so bugs may lie there.).
Anyway, please do let me know if there's anything else that needs changing with anything in this pull request, and without further ado, what was actually changed:
New
KKGridView
Misc changes:
KKGridViewSectionInfo
KKGridView
Performance-related changes:
KKGridView
KKGridViewCell
KKGridViewUpdateStack