-
Notifications
You must be signed in to change notification settings - Fork 142
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
About contentOffset of UITableView #113
Comments
@wjling, very strange your issue... what happens if in your viewcontroller's viewWillAppear you force a layout (setNeedsLayout(), layoutIfNeeded())? Also, if you could share me a sample or your app, I could have a look. You can write me directly using my public email if you prefer. |
Hi @wjling, we have found your issue, this will be fixed today. Thanks for reporting it! |
Hi @lucdion, I had read about your message and would like to provide a demo. But I forgot it after some busy work. So sorry about that. Glad to hear you have found the issue and help to make PinLayout better |
Your issue has been fixed in the 1.5.8 release. |
A small problem. I have a
let myTableView: UITableView
in aUIViewController
. I layout the tableView inviewWillLayoutSubviews()
with codeself.myTableView.pin.top().left().right().bottom().marginTop(self.headBarsHeight + 44).marginBottom(self.bottomBarHeight)
. The controller is a childController of a tabBarController. I setmyTableView.contentInset.top = 15
and reload the tableView after I init the viewController and tableView.contentOffset.y == -15. When I switch tab to the controller andviewWillLayoutSubviews()
is called, then I found myTableView.contentOffset.y became 0(I don't want this, I want to keep its offset). If I set myTableView.frame instead of using PinLayout, its contentOffset remains -15.The text was updated successfully, but these errors were encountered: