NSArray,NSMutableArray,NSDictionary,NSMutableDictionary小结

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

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
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值