Several common properties of string judgment and the preliminary thought of array application in simple project implementation Lan Yi education

Source: Internet
Author: User

Label.numberoflines can control the number of rows in it

if = 0 only enough space can be countless lines

if = 1 1 lines; if = 2 2 lines; analogy

UIbutton to set words and pictures by code

UIbutton *l1=[uibuttom alloc]initwithframe:cgrectmake ....

[L1 settitle:@ "111" for State:uicontrolstatenormal]; The button will show 111

[L1 setimage:[uiimage imagenamed:@ "..."] for stat:uicontrolstatenormal];

Determines whether a string contains a string

NSString *[email protected] "sfwefwe";

[L1 rangeofstring:@ "E"].length>0;

Greater than 0 contains no not included

[L1 hasprefix:@ "1"]; Judge if the first digit is 1.

[L1 hassuffix:@ "1"]; Judging the last one is not 1

Calculator project, first think of the number can use an array to load, and then subtraction these symbols can also use an array to load

Because the order of the numbers in the calculation and the position order of the calculated symbols can be used

To notice that the object in the Remove array continues to traverse causes an object that is not the object you want to issue

In a digital memory small project, the first random number can be recorded in an array because the array is entered sequentially.

So the second input number can be in order to compare the IF statement to determine if all equal to the conditions to output

Several common properties of string judgment and the preliminary thought of array application in simple project implementation Lan Yi education

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.