I would like to know exact height of top bar of iPhone X. Could you please mention the status bar and navigation bar height of iPhone X. Please help me.
If you're using a uiwindow and you need to know the top bar height you can use this:
guard let keyWindow = UIApplication.shared.keyWindow else { return } let navBarHeight = keyWindow.safeAreaInsets.top print("navBarHeight:" , navBarHeight)
I got the idea from @Paolo's answer