How can one get the dimensions of the screen in iOS?
Currently, I use:
lCurrentWidth = self.view.frame.size.width;
lCurrentHeight = self.view.frame.size.height;
in viewWillAppear:
and willAnimateRotationToInterfaceOrientation:duration:
The first time I get the entire screen size. The second time i get the screen minus the nav bar.
转载于:https://stackoverflow.com/questions/5677716/how-to-get-the-screen-width-and-height-in-ios