Oleshko Oleshko - 6 months ago 334
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

Is there any problems with:

UIApplication.sharedApplication().statusBarFrame.size.height

Make sure UIKit is imported

import UIKit