Foundation Framework

NSObject

在iOS SDK裏是全部對象的基類
實現了全部的內省introspection方法code

主要的方法
  • - (NSString *)description是一個很重要的方法,它重寫了 NSLog()裏的%@ 例如:component

    NSLog(@「array contents are %@」, myArray);orm

    若是重寫了description, %@ 實際執行的是[myArray description]方法
  • - (id)copy;
  • - (id)mutableCopy;對象

NSArray

主要的方法
  • - (NSUInteger)count;
  • - (id)objectAtIndex:(NSUInteger)index;
  • - (id)lastObject;
  • - (id)firstObject;
用的比較少的方法
  • - (NSArray *)sortedArrayUsingSelector:(SEL)aSelector;ip

  • - (void)makeObjectsPerformSelector:(SEL)aSelector withObject:(id)selectorArgument;it

  • - (NSString *)componentsJoinedByString:(NSString *)separator;io

相關文章
相關標籤/搜索