Here is the code I used for my application: let statusBarHeight: CGFloat = Īnd set the value in SceneDelegate: func scene( _ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene. I decided in my case that since there could possibly be different heights to take the largest of the heights for my code. I accessed the status bar heights like so: if let height = window. I'm not sure why there were two windows, but at least both had the same status bar heights. Both of the windows had equal, non-nil status bar heights. Could you please mention the status bar and navigation bar height of iPhone X. I then tried searching through the windows property on UIApplication.shared: for window in UIApplication. I would like to know exact height of top bar of iPhone X. I had the same problem as MMV (see their comment on Jordan H's answer), view.window?.windowScene?.statusBarManager?.statusBarFrame.height returned nil near the launch of my app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |