Lan Yi iOS Training Log 4 calculator implementation and learning experience

Source: Internet
Author: User

Today the teacher took us to realize a simple calculator, benefited greatly.

Just like every project, no matter the size, I first think of the teacher said that sentence, you have to put a good outline in the brain, think well step by step what to do, if the feeling is not clear enough to write down the notebook first.

1. Add button, color, font size 47

2. Add label, font size 80, color

3. Associate Input Button

4.label Global, take out the number above the button,
NSString *numberstring=[sender titleforstate:
UIControlStateNormal]
5. Set a text initial null value
6. Associating subtraction whataction
7. Empty the label display
8. Tag for button identification
9. Declare and record subtraction what, record the first number
10. Association =
11. Take the second number out
12. Judging subtraction
13. Display results
14. Modify empty Order
15. Association c key, function

Feel that doing a project to consider a lot, very test people's logical thinking ability, I think if a person programmed to do well, then his thinking ability must be great.

Lan Yi iOS Training Log 4 calculator implementation and learning experience

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.