How to get device width and height?
Swift 4.2
let screenBounds = UIScreen.main.bounds
let width = screenBounds.width
let height = screenBounds.height
I haven't tried but it should be..
var bounds = UIScreen.main.bounds
var width = bounds.size.width
var height = bounds.size.height