Foundation Framework

NSObject

在iOS SDK里是所有对象的基类
实现了所有的內省introspection方法

主要的方法
  • - (NSString *)description是一个很重要的方法,它重写了 NSLog()里的%@ 例如:

    NSLog(@“array contents are %@”, myArray);

    如果重写了description, %@ 实际执行的是[myArray description]方法

  • - (id)copy;

  • - (id)mutableCopy;

NSArray

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

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

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

posted @ 2015-01-23 00:02  bao9107  阅读(146)  评论(0编辑  收藏  举报