将新数组(addObjectFromArray
)添加到NSMutableOrederedSet
,如何检查NSMutableOrederset
是否已有项目/项目的现有副本且未发生重复?
代码:
Alamofire.request(.GET, jsonUrl).responseJSON(){
(_, _, JSON, _) in
if JSON != nil {
let imageInfos = (JSON!.valueForKey("image") as [NSDictionary]).map {
ImageInfo(id: $0["id"] as String, url: $0["url"] as String)
}
self.tableData.addObjectsFromArray(imageInfos)
<小时/> viewDidLoad()和handlePullToRefresh()
都相同