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

关于iOS11 上下拉刷新无法返回的问题,不关MJRefresh的事,解答 #956

Closed
Rogue24 opened this issue Sep 20, 2017 · 8 comments

Comments

@Rogue24
Copy link
Contributor

Rogue24 commented Sep 20, 2017

iOS11弃用了automaticallyAdjustsScrollViewInsets属性,新增contentInsetAdjustmentBehavior来替代它,不想系统帮我们自动设置边距则要在iOS11中加上这句 scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;

@csdwd
Copy link

csdwd commented Sep 20, 2017

Very good!👍

@csdwd
Copy link

csdwd commented Sep 20, 2017

if #available(iOS 11.0, *) { collectionView.contentInsetAdjustmentBehavior = .never } else { // Fallback on earlier versions }

swift中添加改行代码

@xd54622
Copy link

xd54622 commented Sep 22, 2017

这样改的话,导航栏就要挡住tableview了。而设置contentInset的话,虽然可以解决遮挡问题,但是iPhone X的导航栏高度又不一样,又要根据机型来设置不同的contenInset,感觉不是很合理。

@Rogue24
Copy link
Contributor Author

Rogue24 commented Sep 22, 2017

iPhoneX 就是苹果告诉我们状态栏和tabbar高度不要写死,要动态获取

@SanlinBlackball
Copy link

那是不是不能设置tableView为self.view.bounds

@Rogue24
Copy link
Contributor Author

Rogue24 commented Sep 25, 2017

可以,但是contentInset要设置正确

@CoderMJLee
Copy link
Owner

@Rogue24 谢谢你的热心。
我也尝试让MJRefresh兼容iOS11了,大家可以试试版本3.1.13。近几个月身体抱恙,所以未及时更新,Sorry

@Rogue24
Copy link
Contributor Author

Rogue24 commented Sep 27, 2017 via email

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

5 participants