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

How to change dynamic height based array data? #37

Open
karthisiva opened this issue Jan 8, 2021 · 1 comment
Open

How to change dynamic height based array data? #37

karthisiva opened this issue Jan 8, 2021 · 1 comment

Comments

@karthisiva
Copy link

karthisiva commented Jan 8, 2021

I want to reload the height after data comes from server without loosing animation effect. its jerking if call this line

(self.presentationController as? BottomPopupPresentationController)?.containerViewWillLayoutSubviews()

fileprivate func adjustListHeight()-> CGFloat{ let height = UIScreen.main.bounds.size.height * 50 / 100 // if self.dataArray.count == 0{ // // return height // }else{ // if dataArray.count > 10{ // let height = UIScreen.main.bounds.size.height * 50 / 100 // return height // }else{ // return CGFloat(((dataArray.count + 1) * 44) + 70) // } // } return height } override var popupHeight: CGFloat{ return adjustListHeight() }

@guneshasancan
Copy link

You can call updatePopupHeight(to: CGFloat) anywhere to update height of popup.

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

No branches or pull requests

2 participants