-
Notifications
You must be signed in to change notification settings - Fork 147
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
Fix cell height issue #658
Conversation
Travis... |
def tableView(table_view, heightForRowAtIndexPath: index_path) | ||
(self.promotion_table_data.cell(index_path: index_path)[:height] || table_view.rowHeight).to_f | ||
def tableView(_, heightForRowAtIndexPath: index_path) | ||
# mp "table: #{table_view.rowHeight} cell: #{self.promotion_table_data.cell(index_path: index_path)[:height].inspect}" |
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.
Remove this commented out print statement?
I'm not seeing what you actually fixed here... it looks like just a code cleanup with var name changes and two-liners -> one-liners. |
(self.promotion_table_data.cell(index_path: index_path)[:height] || table_view.rowHeight).to_f | ||
def tableView(_, heightForRowAtIndexPath: index_path) | ||
# mp "table: #{table_view.rowHeight} cell: #{self.promotion_table_data.cell(index_path: index_path)[:height].inspect}" | ||
(self.promotion_table_data.cell(index_path: index_path)[:height] || tableView.rowHeight).to_f |
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.
@markrickert The relevant change is that I'm referencing the built-in tableView
property rather than the passed-in table_view
var. The search creates another UITableView on top of our table view, which is problematic in that it doesn't contain the settings (rowHeight
in this case) that we need. I removed the local reference so we aren't tempted to use it.
This will all get re-written anyway when we update for iOS 8's new table searchable stuff. But it does work for now.
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.
AHA! I see it now. Good catch.
Attempt number 3. Fixes #655. @markrickert @kevinvangelder @ryanlntn .