Ios screen, Status Bar (statusbar), program window size acquisition and screen rotation size changes

Source: Internet
Author: User

Ios screen, Status Bar (statusbar), program window size acquisition and screen rotation size changes
App size, remove the status bar CGRect r = [UIScreen mainScreen]. applicationFrame; this size will not change the width and height as the screen rotates, but after the screen rotates, it will automatically modify the width and height to lose the status bar height. Portrait screen (4-inch): x = 0, y = 20, width = 320, height = 548 horizontal screen (4-inch): x = 0, y = 0, width = 300, height = 568 screen size CGRect rx = [UIScreen mainScreen]. bounds; (4-inch) rx = x = 0, y = 0, width = 320, height = 568 fixed size, unchanged status bar size CGRect rect; rect = [[UIApplication sharedApplication] statusBarFrame]; always vertically. Portrait screen (4-inch): x = 0, y = 0, width = 320, height = 20 horizontal screen (4-inch): x = 300, y = 0, width = 20, height = 568 method for obtaining screen resolution in iphone CGRect rect = [[UIScreen mainScreen] bounds]; CGSize size = rect. size; CGFloat width = size. width; CGFloat height = size. height; in addition, pay attention to the minimum touch area when designing the UI. There are two arguments: 44*44. It seems to be from sdk 64*64. It is from standford handouts.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.