Basic setter methods and basic setter Methods

Source: Internet
Author: User

Basic setter methods and basic setter Methods

It is important that we observe MVC when writing code, especially when it comes to cell.

For cell replication, you must write and use the model in the cell to manage the data so that the scalability is enhanced and the adjustment is clearer.

The setter method is used for self.. when syntax is used, call the setter method. Some things can be managed in the setter method. For example, if I write a method and need to call it when I change the value of an object, we can use the setter of the object. method to call this method

The setter method can be called when the external point syntax is used.

_ ServiceIndexstarView. tapInt = 3;

// For example, the setter method is called when the vertex syntax is called.

-(Void) setTapInt :( int) tapInt

{

[Self lightStarWithNumber: tapInt];

}

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.