forked from organicmaps/organicmaps
[iOS] Fixed search filter height
This commit is contained in:
parent
5ab87ab048
commit
cf8ffbb582
1 changed files with 5 additions and 3 deletions
|
@ -15,9 +15,11 @@ final class FilterCollectionHolderCell: MWMTableViewCell {
|
|||
private func layout() {
|
||||
collectionView.setNeedsLayout()
|
||||
collectionView.layoutIfNeeded()
|
||||
if collectionViewHeight.constant != collectionView.contentSize.height {
|
||||
collectionViewHeight.constant = collectionView.contentSize.height
|
||||
frame.size.height = collectionViewHeight.constant
|
||||
if abs(collectionViewHeight.constant - collectionView.contentSize.height) > 2.0 {
|
||||
let newHeight = collectionView.contentSize.height
|
||||
collectionViewHeight.constant = newHeight
|
||||
frame.size.height = newHeight
|
||||
tableView?.reloadData()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue