Open karthisiva opened 3 years ago
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() }
You can call updatePopupHeight(to: CGFloat) anywhere to update height of popup.
updatePopupHeight(to: CGFloat)
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() }