Foundation Framework

NSObject: 所有类的父类

      主要方法:

           1,-(NSString)description:Returns a string that describes the contents of the receiver. (required);返回自我描述;

           2,-(id)copy     无实现  需自己去实现

           3,-(id)mutableCopy  无实现  需自己去实现


NSArray   不可变数组

         description:

                      1,once you create NSArray object, you cannot add or remove objects;

                      2,all the objects in NSArray are held onto  strongly;

                      3,usually create NSArray by @[];

        methods:

               -(NSInteger )count   retuen the length of array;

              -(id)objectAtIndex:(NSInteger)index    return the object of array  at index;

             -sortedArrayByUsingSelector:(SEL)  selector     sorted(排序)


NSmutableArray

      the subclass of NSArray


NSNumber

       decription:

            1,include int float double  bool enum

            2,usually creaye by @();


NSValue


NSData


NSDictionary


NSMutableDictionary


NSUserDefaults

            是一种共享字典,when even applaction  launching or exiting,it is still keep work;

            create by [NSUSerDefaults standardUserDefaults];当我们需要存储我们的东西的时候需要同步一下调用[[NSUSerDefaults standardUserDefaults] synchronize]


   

你可能感兴趣的:(Foundation Framework)