iOS 遍历NSDictionary

作者: iCloudEnd | 来源:发表于2015-03-23 17:58 被阅读181次

但算写个通用的删除数据库通用纪录,所以需要遍历整个参数。预想的函数如下

-(void)deleteWithDic:(NSString *) tableName dic:(NSDictionary *) oneDic

{

NSString *sql =;

[self.database executeSql:sql];

}

所以需要遍历dic,下面就是demo

NSMutableDictionary * oneDic=[NSMutableDictionary dictionary];

[oneDic setObject:@"1" forKey:@"ipPk"];

[oneDic setObject:@"2" forKey:@"groupPK"];

NSLog(@"%@",oneDic.allKeys);

相关文章

网友评论

    本文标题:iOS 遍历NSDictionary

    本文链接:https://www.haomeiwen.com/subject/yergxttx.html