view raw
Oleshko Oleshko - 10 months ago 483
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