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

ios18有bug #232

Open
JRJian opened this issue Oct 24, 2024 · 4 comments
Open

ios18有bug #232

JRJian opened this issue Oct 24, 2024 · 4 comments

Comments

@JRJian
Copy link

JRJian commented Oct 24, 2024

入口布局如果是Tabbarcontroller. 通过Tabbarcontroller进行sheetPresent会导致tabbar icon错位。同时点击空白区域会导致闪退

@AndrewSB
Copy link
Collaborator

can you share a reproducible example project please?

@JRJian
Copy link
Author

JRJian commented Oct 25, 2024

The animateIn method, when passed a view and a view controller that are instances of mainTabBarController, causes all tab bar items to align to the left after the sheet is displayed in iOS 18. Additionally, clicking on the empty area to the right of the tab bar results in a crash.

// CurrentVC is one of MainTabbarController viewcontrollers
    @objc func addButtonTapped() {
        // topVC is MainTabbarController
        guard let topVC = UIApplication.shared.topViewControllerForPopup() else { return }
        impactOccurredLightTrigger()
        let vc = MusicCreatePlayListController()
        var options = SheetOptions()
        options.useInlineMode = true
        options.useFullScreenMode = false
        let sheet = SheetViewController(
            controller: vc,
            sizes: [.fixed(getSafeBottomMargin()+215), .marginFromTop(getSafeTopMargin())],
            options: options)
        sheet.gripColor = UIColor.white.withAlphaComponent(0.5)
        sheet.gripSize = CGSize(width: 36, height: 5)
        sheet.animateIn(to: topVC.view, in: topVC)
    }

@JRJian
Copy link
Author

JRJian commented Oct 25, 2024

This #231 should be the same issue.

@JRJian
Copy link
Author

JRJian commented Oct 25, 2024

image This line of code is causing the issue. The parent is a UITabBarController, which effectively adds an additional child view controller, resulting in changes to the tab bar content. Please resolve this issue.

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

2 participants