Essentials of iOS Basics

Source: Internet
Author: User

Chapter II Fundamentals of Objective programming

1.objective-c is an object-oriented development language that was first based on the Smaltalk language.

The basic data type of 2.OC is divided into int type float type bool type double type, etc.

The 3.sel selector is implemented by a selector called selector.

SEL Variable name = @selector (method name);

SEL Variable name =nsselectorfromstring (string of method name)

NSString * Variable name =nsstringfromselector (sel parameter)

4. Private string constants declared in. m and. mm files

public string constants are declared in the. h file

5. String manipulation

Rangofstring find the location of substrings in a string

Substringtoindex intercept the start position to the position of the string

Substringfromindex the end of a string starting at the specified position

Substringwithrange A string of a specified length from the starting point

stringWithFormat formatted string equivalent to sprintf ()

Componentsseparatedbystring delimited string, delimited by a character

Cstringusingencoding the conversion of strings to characters

Isequaltostring comparison between strings, not by = comparison

6. Circular control Statements

For () {}

if () {} else{}

do {}while ()

while ()

Switch () {case1:break; ...}

Essentials of iOS Basics

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.