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

iphone14 pro灵动岛,MJRefresh闪退 #1575

Open
shandawy opened this issue Sep 26, 2022 · 4 comments
Open

iphone14 pro灵动岛,MJRefresh闪退 #1575

shandawy opened this issue Sep 26, 2022 · 4 comments
Labels

Comments

@shandawy
Copy link

描述bug

我使用了JXSegmentedView框架
override func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate {

    switch index {
    case 0:
        return NQPersonalQuestionListVC(actType: NQMyActType.Favorite.rawValue)
    case 1:
        return NQPersonalAnswerListVC(actType: NQMyActType.Favorite.rawValue)
    case 2:
        return NQPersonalEventListVC(vcType: .Forum, actType: NQMyActType.Favorite.rawValue)
    case 3:
        return NQPersonalEventListVC(vcType: .Webinar, actType: NQMyActType.Favorite.rawValue)
    default:
        return NQPersonalQuestionListVC(actType: NQMyActType.Favorite.rawValue)
    }
}

在NQPersonalQuestionListVC控制器里面,设置
tableView.contentInset = UIEdgeInsets(top: Configs.BaseDimensions.headerInSectionHeight, left: 0, bottom: 0, right: 0)
在iphone14 pro灵动岛,MJRefresh下拉刷新闪退,必现

但是如果设置
tableView.contentInsetAdjustmentBehavior = .never
tableView.contentInset = UIEdgeInsets(top: Configs.BaseDimensions.navigationBarAreaHeight + Configs.BaseDimensions.headerInSectionHeight, left: 0, bottom: safeAreaBottom, right: 0)
不会出现闪退

运行环境

  • iphone14 pro
  • iOS16
  • Xcode14
    1664175979795
    1664176027746
@shandawy shandawy added the bug label Sep 26, 2022
@wolfcon
Copy link
Collaborator

wolfcon commented Sep 26, 2022

方便传一个Demo上来吗?

@iAmNotTom
Copy link

iAmNotTom commented Sep 28, 2022

方便传一个Demo上来吗?
我也遇到类似的问题 并且定位到了原因
#1576

@iAmNotTom
Copy link

描述bug

我使用了JXSegmentedView框架 override func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate {

    switch index {
    case 0:
        return NQPersonalQuestionListVC(actType: NQMyActType.Favorite.rawValue)
    case 1:
        return NQPersonalAnswerListVC(actType: NQMyActType.Favorite.rawValue)
    case 2:
        return NQPersonalEventListVC(vcType: .Forum, actType: NQMyActType.Favorite.rawValue)
    case 3:
        return NQPersonalEventListVC(vcType: .Webinar, actType: NQMyActType.Favorite.rawValue)
    default:
        return NQPersonalQuestionListVC(actType: NQMyActType.Favorite.rawValue)
    }
}

在NQPersonalQuestionListVC控制器里面,设置 tableView.contentInset = UIEdgeInsets(top: Configs.BaseDimensions.headerInSectionHeight, left: 0, bottom: 0, right: 0) 在iphone14 pro灵动岛,MJRefresh下拉刷新闪退,必现

但是如果设置 tableView.contentInsetAdjustmentBehavior = .never tableView.contentInset = UIEdgeInsets(top: Configs.BaseDimensions.navigationBarAreaHeight + Configs.BaseDimensions.headerInSectionHeight, left: 0, bottom: safeAreaBottom, right: 0) 不会出现闪退

运行环境

  • iphone14 pro
  • iOS16
  • Xcode14
    1664175979795
    1664176027746

我也遇到类似的问题 并且定位到了原因
#1576

@iAmNotTom
Copy link

iAmNotTom commented Sep 30, 2022

方便传一个Demo上来吗?

Demo如下(使用非SceneDelegate方式启动App view.safeAreaInsets.top就会返回精度极高的值)
TestRefreshDemo.zip
in Xcode 14
@wolfcon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants