¡@

Home 

2014/10/15 ¤U¤È 10:12:29

iphone Programming Glossary: passingobjects

Enumerate NSArray using blocks to find and store all indexe's of all NSStrings in array

http://stackoverflow.com/questions/9386094/enumerate-nsarray-using-blocks-to-find-and-store-all-indexes-of-all-nsstrings-i

indexesOfObjectsPassingTest ^ id obj NSUInteger idx BOOL stop return NSObject obj isKindOfClass NSString class NSArray passingObjects arrayInLesson objectsAtIndexes stringLocations sectionHeadersAct LambdaSheet alloc initWithTitle @ Book 2 Lesson 1 sectionHeadersAct.. addButtonWithTitle @ D. E. F. G. Teach New Letters block ^ Do nothing yet sectionHeadersAct addButtonWithTitle passingObjects objectAtIndex 0 block ^ NSLog @ First wordDisplayed theIndexOfThisStringIn_arrayInLesson sectionHeadersAct addButtonWithTitle.. 0 block ^ NSLog @ First wordDisplayed theIndexOfThisStringIn_arrayInLesson sectionHeadersAct addButtonWithTitle passingObjects objectAtIndex 1 block ^ NSLog @ Second wordDisplayed theIndexOfThisStringIn_arrayInLesson sectionHeadersAct addButtonWithTitle..