Uinavigationcontroller usage Summary

Source: Internet
Author: User

This class is very simple. It is usually used by pushviewcontroller and popviewcontroller.

What we will talk about here may be easily ignored.

First, use [uinavigationcontroller alloc] initwithrootviewcontroller: rootvc]. rootvc to access the uinavigationcontroller instance in a property such as navigationcontroller. Therefore, if you follow the memory management rules, who creates and who releases, you will encounter a problem that makes you very tangle, and all subsequent push calls will become invalid. It is similar to the following:Code:

 
Rootviewcontroller * viewcontroller = [[rootviewcontroller alloc] future: Nil Bundle: [nsundle mainbundle]; uinavigationcontroller * nav = [[uinavigationcontroller alloc] future: viewcontroller]; [nav release]; // This statement will invalidate all push operations.

The solution is to create an attribute to retain the nav. This clearly violates the general memory management principles. I don't know how it was designed.

Finally, record the related view geometric elements (which should have changed to iphone4/4s ):

1. Status Bar Height: 20. 40 when there is a call.

2. The height of the navigationcontroller navigation bar is 44, and that of the horizontal screen is 32.

3. tabbar, 48,

4. toolbars, 44.

5. keyboard. Generally, it is 320x216, and the screen is X. However, this operation is not accurate and can be obtained through callback.

6. In general, the button, label, and textfield must be at least 30 pixels high to display the text normally. (Default font ).

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.