NSArray,NSMutableArray,NSDictionary,NSMutableDictionary小结

来源:互联网 发布:云计算的简介 编辑:程序博客网 时间:2024/05/19 23:15

#表示返回值类型 :有参数

NSArray

Creating an Array(创建数组)

#instancetype

+ array

+ arrayWithArray:

+ arrayWithObject:

+ arrayWithObjects:

+ arrayWithObjects:count:

#id

+ ()arrayWithContentsOfFile:

Initializing an Array(初始化数组)

#instancetype

– init

– initWithArray:

– initWithArray:copyItems:

– initWithObjects:

– initWithObjects:count:

#id

– initWithContentsOfFile:

Querying an Array(查询数组)

#BOOL

– containsObject:

#NSInteger

– count

#void

– getObjects:range:

#id

– firstObject

– lastObject

#NSArray*

– objectAtIndex:

Finding Objects in an Array(找出数组中的对象)

#NSUIteger

– indexOfObject:

Comparing Arrays

#BOOL

– isEqualToArray:

Deriving New Arrays

#NSArray*

– arrayByAddingObject:

– subarrayWithRange:

NSMutableArray

Creating and Initializing a Mutable Array(创建和初始化可变数组)

#intancetype

+ arrayWithCapacity:

– initWithCapacity:

– init

Adding Objects(添加对象)

#void

– addObject:

– addObjectsFromArray:

– insertObject:atIndex:

– insertObjects:atIndexes:

Removing Objects(删除对象)

#void

– removeAllObjects

– removeLastObject

– removeObject:

– removeObject:inRange:

– removeObjectAtIndex:

– removeObjectsAtIndexes:

– removeObjectIdenticalTo:

– removeObjectIdenticalTo:inRange:

– removeObjectsInArray:

– removeObjectsInRange:

Replacing Objects(替换对象)

#void

– replaceObjectAtIndex:withObject:

– replaceObjectsAtIndexes:withObjects:

– setArray:

NSDictionary

Creating a Dictionary(创建字典)

#id

+ dictionaryWithContentsOfFile:

#instancetype

+ dictionary

+ dictionaryWithDictionary:

+ dictionaryWithObject:forKey:

+ dictionaryWithObjects:forKeys:

+ dictionaryWithObjects:forKeys:count:

+ dictionaryWithObjectsAndKeys:

Initializing an NSDictionary Instance(初始化字典实例)

#id

– initWithContentsOfFile:

#instancetype

– initWithDictionary:

– initWithDictionary:copyItems:

– initWithObjects:forKeys:

– initWithObjects:forKeys:count:

– initWithObjectsAndKeys:

– init

Counting Entries(计数条目)

#NSINteger

– count

Comparing Dictionaries(比较字典)

#BOOL

– isEqualToDictionary:

Accessing Keys and Values(访问键和值)

#NSArray

– allKeys

– allKeysForObject:

– allValues

Storing Dictionaries(存储字典)

#BOOL

– writeToFile:atomically:

NSMutableDictionary

Creating and Initializing a Mutable Dictionary(创建初始化可变字典)

#intancetype

+ dictionaryWithCapacity:

– initWithCapacity:

– init

#id

+ dictionaryWithSharedKeySet:

Adding Entries to a Mutable Dictionary(添加条目进可变字典)

#void

– setObject:forKey:

– setObject:forKeyedSubscript:

– setValue:forKey:

– addEntriesFromDictionary:

– setDictionary:

Removing Entries From a Mutable Dictionary(移除条目从字典)

#void

– removeObjectForKey:

– removeAllObjects

– removeObjectsForKeys:


0 0
原创粉丝点击