We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
界面结构是UITabBarController->UINavigationController->UITableViewController
如果push一个viewController再pop回UITableViewController, UITableViewController里的contentoffset发生了变化(和push前不一致,tableview上移了)。
测试设备:iPhone SE, iOS 11.2.6
修改源码:
注释掉以下方法的内容: -(void)km_adjustScrollViewContentInsetAdjustmentBehavior() -(void)km_restoreScrollViewContentInsetAdjustmentBehaviorIfNeeded()
或者: 在 -(void)km_adjustScrollViewContentInsetAdjustmentBehavior()方法中的scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; 后面重新设置修改前的contentoffset
以上两种修改都可以解决我的问题。
请教下为什么在viewWillAppear中 设置scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; 然后在viewDidAppear设置回原先的值?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
界面结构是UITabBarController->UINavigationController->UITableViewController
如果push一个viewController再pop回UITableViewController, UITableViewController里的contentoffset发生了变化(和push前不一致,tableview上移了)。
测试设备:iPhone SE, iOS 11.2.6
修改源码:
注释掉以下方法的内容:
-(void)km_adjustScrollViewContentInsetAdjustmentBehavior()
-(void)km_restoreScrollViewContentInsetAdjustmentBehaviorIfNeeded()
或者:
在 -(void)km_adjustScrollViewContentInsetAdjustmentBehavior()方法中的scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
后面重新设置修改前的contentoffset
以上两种修改都可以解决我的问题。
请教下为什么在viewWillAppear中
设置scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
然后在viewDidAppear设置回原先的值?
The text was updated successfully, but these errors were encountered: