Obtener Ancho y Alto de pantalla / Get width and height from Main Screen

var bounds: CGRect = UIScreen.mainScreen().bounds var width:CGFloat = bounds.size.width var height:CGFloat = bounds.size.height

1 Response

Apple recommends using the CGRectGetWidth(CGRect rect) and Height functions for getting those values from a rect.

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.