如何在 iOS 中获得屏幕的宽度和高度?

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

查看全部
csdnceshi80
胖鸭
2011/04/15 13:46
  • uikit
  • screen
  • ios
  • cocoa
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

0个回复