Lan Yi iOS Practice Games 2

Source: Internet
Author: User
Learned yesterday, the method of collision judgment, and learn the new usage of nstimer, today I practice doing a game of bricks, the game realized from the left and right on the three walls, there are 15 bricks, a small ball, a baffle, through the small ball hit the wall and the baffle to achieve the ball. But do not realize after the disappearance of the bricks, can only do a good job of the last created bricks have disappeared after the effect of the crash, this afternoon to review some of the knowledge learned

Property @property attribute Concept OC language has, C language does not, Self calls the method of the current object, and the object method is tuned with the object name of the instance . The access property in the class is a point, and the access method is with a space. basic data types, such as int,float,double, are stored in the stack memory when they declare negative values. Global variables are not initialized by default is 0 and nil, local variables are not initialized by default is a random class method can not declare only implementation, but can not only declare, if the free declaration will be an error, understand that there is a person said that they can do something, But he can't do it specifically. If a method is only implemented then it is private and can only be called by itself, and this method only knows for itself. If introduced in another. m file, it cannot be used because his own method is not declared. Not known in other documents.

Lan Yi iOS Practice Games 2

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.