Oleshko Oleshko - 1 year ago 693
iOS Question

Status bar height in swift

How to programmatically get status bar height in swift?
In objective-c it's just like
[UIApplication sharedApplication].statusBarFrame.size.height.

Answer Source

Is there any problems with:

UIApplication.sharedApplication().statusBarFrame.size.height

Make sure UIKit is imported

import UIKit