Skip to content
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

Merged
merged 5 commits into from
Apr 2, 2015
Merged

Fix cell height issue #658

merged 5 commits into from
Apr 2, 2015

Conversation

jamonholmgren
Copy link
Owner

Attempt number 3. Fixes #655. @markrickert @kevinvangelder @ryanlntn .

@jamonholmgren
Copy link
Owner Author

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}"
Copy link
Contributor

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?

@markrickert
Copy link
Contributor

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
Copy link
Owner Author

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.

Copy link
Contributor

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.

jamonholmgren added a commit that referenced this pull request Apr 2, 2015
@jamonholmgren jamonholmgren merged commit 756bf0f into version-2.3 Apr 2, 2015
@jamonholmgren jamonholmgren deleted the bugfix/issue_655 branch April 2, 2015 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants