Oleshko Oleshko - 5 months ago 265
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