[iOS] Fixed search filter height

This commit is contained in:
Zoia Pribytkova 2019-08-05 17:16:29 +03:00 committed by Aleksey Belousov
parent 5ab87ab048
commit cf8ffbb582

View file

@ -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()
}
}