Lan Yi Education September 8 record

Source: Internet
Author: User

Today is September 8, another practice day. I got up very late today, some slack. Maybe a little bit more about the rest of the day, people get a little lazy. And like back to the former lazy look. Perhaps the recent computer watching too much of the total feeling the eyes are very astringent. Lazy people are always more things, for themselves to find a variety of excuses.

But try to solve the problem by yourself. Force yourself to keep trying. It was not until late this afternoon that I began to enter the state. reviewed the array and string of the days before the teacher. The more you review, the more you find that you forget more. Hopefully, over time, I won't be able to keep up.


Finally, the following part of the review is recorded:

Determine if an object is contained in an array

if ([Names containsobject:@ " Zhao Liu "]) {

NSLog (@ " contains Zhao Liu ");

}Else NSLog(@ " does not contain ");

Convenience arrays

Nsarray *stringarray=[nsarray arraywithobjects:@ "One", @ "one", @ "three", nil];

Method 1

for (int i=0;i<stringarray.count;i++) {

NSString *n =[stringarray objectatindex:i];


}

Method 2 ( Use when you don't need to use the position in the array)

For(nsstring *n in Stringarray) {


}



Lan Yi Education September 8 record

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.