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

Make the tests pass #585

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ final class SelectCurrencyViewController: UIViewController, MessageBannerViewCon

self.tableView.tableHeaderView = headerContainerView
self.headerView.widthAnchor.constraint(equalTo: self.tableView.widthAnchor).isActive = true
self.tableView.ksr_sizeHeaderFooterViewsToFit()

self.viewModel.inputs.viewDidLoad()
}

override func viewDidLayoutSubviews() {
Copy link
Contributor Author

@dusi dusi Feb 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shamefully stole this from https://useyourloaf.com/blog/variable-height-table-view-header and it seems to pass the tests 😄

super.viewDidLayoutSubviews()

self.tableView.ksr_sizeHeaderFooterViewsToFit()
}

override func bindStyles() {
super.bindStyles()

Expand All @@ -55,8 +60,6 @@ final class SelectCurrencyViewController: UIViewController, MessageBannerViewCon
\(Strings.A_successfully_funded_project_will_collect_your_pledge_in_its_native_currency())
"""
}

self.tableView.ksr_sizeHeaderFooterViewsToFit()
}

// MARK: - Subviews
Expand Down