iPhone 14 pro with dynamic island status bar issue

Hi

Can anyone help me out with this extra white space showing in dynamic island iPhones?

Any help is much appreciated.

Thanks.

Replies

Facing the same issue. There is this space between the status bar and the safe area in iPhone 14 Pro and Pro max. I believe there is a fix required in OS itself. If anyone has any fix for this please do help. As a temporary solution, I am just moving the view under the white patch up by 10 units or so...

  • if #available(iOS 13.0, *) {     let window = UIApplication.shared.windows.first     let topPadding = window?.safeAreaInsets.top     let statusBar = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: topPadding ?? 0.0))     statusBar.backgroundColor = UIColor(named: "AppPrimaryColor")     UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.addSubview(statusBar) }

Add a Comment

Hi,

Facing the same issue on iPhone 14 Pro & 14 Pro Max. I created a demo project and the issue is clear.

Temporary solution: just moving the view under.

Hi Guys,

I got a permanent solution for this.

if #available(iOS 13.0, *) {

        let window = UIApplication.shared.windows.first

        let topPadding = window?.safeAreaInsets.top

        let statusBar = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: topPadding ?? 0.0))

        statusBar.backgroundColor = UIColor(named: "AppPrimaryColor")

        UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.addSubview(statusBar)

}

I'm also facing the same problem ,need the code in objective c