As the warning hints, you can access the statusBarManager which has a statusBarFrame property. This is defined on your UIWindow‘s windowScene.
let height = view.window?.windowScene?.statusBarManager?.statusBarFrame.height ?? 0
As the warning hints, you can access the statusBarManager which has a statusBarFrame property. This is defined on your UIWindow‘s windowScene.
let height = view.window?.windowScene?.statusBarManager?.statusBarFrame.height ?? 0