Collection of typical iPhone development quotations

Source: Internet
Author: User

IPhone is an extremely artistic platform. I believe you will have a lot of feelings during the development process and hope you can write them together. Therefore, this post will be maintained in the future.

 

If you have the same feelings as me, you can follow the post. It is best to briefly include Chinese and English :)

 

1: If the consistency of subclass behavior cannot be guaranteed, use the delegate

If the subclass cann' t keep with superclass, use delegate rather than inheritance.
 

 

2: uivew is displayed on the screen.

Everything you see on screen is uiview.
 

 

3: If you have high performance requirements, use interface build with caution.

If application's performance is important, be discreet for the interface build.
 

 

4: copy is created, retain is referenced

The copy operation is create a new one, but the retain operation is just a reference.
 

 

5: alloc requires release and convenient does not need release

Alloc method need corresponding release method, but convenient method not.
 

 

6. objects loaded into nsarray/nsmutablearray are not responsible for release.

The objects added to nsarray/nsmutablearray need not to be released.
 

 

7: iboutlet, ibaction opens the door for you to access objects in interface build

Iboutlet and ibaction open the door to access the objects in interface build.
 

 

8: uiapplicationdelegate is responsible for ApplicationsProgramAnd uiviewcontroller is responsible for the life cycle of the view.

Uiapplicationdelegate is responsible for the application life cycle, but uiviewcontroller for the uiview.
 

 

9: To ensure program robustness, implement the delegate lifecycle function as much as possible.

If you want to develop a robust application, implement the life cycle methods as more as possbile.
 

 

10: brother does not touch uievent, but the uiview of nsset.

What you touch on screen is not uievent but uiview
 

 

Think of this for the time being. You are welcome to continue adding... ^_^!

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/dongfengsun/archive/2009/11/25/4870650.aspx

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.