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

1
2
var bounds: CGRect = UIScreen.mainScreen().bounds
var width:CGFloat = bounds.size.width
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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.