About frame and coordinate points of view in iOS7 Navigationcontroller

Source: Internet
Author: User

Doing the project today finds a strange problem;

Under the iOS7,

The Viewframe of Navigationcontroller is

{{0, 0}, {320, 568}}

Navigation does not occupy a position, this is clear.

But is the y-coordinate calculation for the sub-view above the Mao view starting from 64?

For example, I set a child view with a Y coordinate of 0, which starts loading from below the navigation bar.

This means that the navigation bar occupies the position of this view.

Keep looking:

found that the height of the iOS7 view is 568 screen size of 568;

However: the starting y-coordinate of the view is 64. Pit Daddy. In this case, the view will have a portion of the window outside and the display is incomplete.

This causes the time at the bottom of the sub-view to be calculated to always be the wrong height.

This is for Mao. For fur. For Mao. Hang Daddy.

Finally, there is no way to accept this reality.

Calculates the time of the last child view minus 64 of the height.

[Self loadstarviewwithframe:cgrectmake (0, [self nextViewFrameY:m_ListView.frame], self.view.frame.size.height- [Self NextViewFrameY:m_ListView.frame]-((iOS7)? 64:0)];

About frame and coordinate points of view in iOS7 Navigationcontroller

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.