CGRect bounds = [[UIScreen mainScreen] applicationFrame]; CGFloat width = bounds.size.width; CGFloat height = bounds.size.height;