Skip to content

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

Closed
@Rogue24

Description

@Rogue24
Contributor

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

Activity

csdwd

csdwd commented on Sep 20, 2017

@csdwd

Very good!👍

csdwd

csdwd commented on Sep 20, 2017

@csdwd

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

swift中添加改行代码

xd54622

xd54622 commented on Sep 22, 2017

@xd54622

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

Rogue24

Rogue24 commented on Sep 22, 2017

@Rogue24
ContributorAuthor

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

SanlinBlackball

SanlinBlackball commented on Sep 25, 2017

@SanlinBlackball

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

Rogue24

Rogue24 commented on Sep 25, 2017

@Rogue24
ContributorAuthor

可以,但是contentInset要设置正确

CoderMJLee

CoderMJLee commented on Sep 27, 2017

@CoderMJLee
Owner

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

Rogue24

Rogue24 commented on Sep 27, 2017

@Rogue24
ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @CoderMJLee@xd54622@Rogue24@csdwd@SanlinBlackball

        Issue actions

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