In Objective-C we can get device width and height by using following code :
CGRect sizeRect = [UIScreen mainScreen].applicationFrame float width = sizeRect.
I haven't tried but it should be..
var bounds = UIScreen.main.bounds var width = bounds.size.width var height = bounds.size.height