FittedSheets icon indicating copy to clipboard operation
FittedSheets copied to clipboard

ios18有bug

Open JRJian opened this issue 1 year ago • 4 comments

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

JRJian avatar Oct 24 '24 10:10 JRJian

can you share a reproducible example project please?

AndrewSB avatar Oct 24 '24 17:10 AndrewSB

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 avatar Oct 25 '24 01:10 JRJian

This #231 should be the same issue.

JRJian avatar Oct 25 '24 01:10 JRJian

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.

JRJian avatar Oct 25 '24 02:10 JRJian