Lan Yi IOS variable action for loop Nstimer

Source: Internet
Author: User

May be due to night rest too late, combined with the two days of most of the course content for training camp learning content, class is always a bit sleepy;

Today's study content is as follows:

1. Variable scope Local variables global variables

2.bool   value 0 or 1    

3.if statement   else   else if

4.switchCase

5. Button plus Tag

6.for Cycle

7.NSTimer

In class, the calculator strengthens the application of the variable scope and the IF statement;

The cycle of color squares enhances the application of various for loops;

Every question the teacher will write down the steps to clear our mind for example the following calculator procedure:

Calculator steps:

1. Build the interface (a text input box a label   five buttons)

2. On the inside of the subtraction operator button, save the user-entered number with a global variable    and record the variable with a global int type subtraction Empty text input box

3. In the Equals button to the user input of the second number to be saved with a local variable, to determine whether the previously saved int value is the addition or subtraction or multiplication do the corresponding operation to obtain results

4. Display the results in the label

This helps us to later in the work of the organization of the large project into a number of small projects, and then solve the problem one after the other to help a lot of work.

Lan Yi IOS variable action for loop Nstimer

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.