【问题标题】:View content of NSMutableDictionary查看 NSMutableDictionary 的内容
【发布时间】:2010-08-06 13:55:48
【问题描述】:

如何查看NSMutableDictionary的内容?

【问题讨论】:

    标签: objective-c nsmutabledictionary


    【解决方案1】:

    在控制台打印内容:

    NSLog(@"%@", [yourDict description]);
    

    遍历字典元素:

    for (id key in [yourDict allKeys]){
       id obj = [yourDict objectForKey: key];
       // Do something with them
    }
    

    【讨论】:

      【解决方案2】:
      NSLog(@"yourMutableDictionary - %@",yourMutableDictionary);
      

      【讨论】:

        猜你喜欢
        • 2011-09-06
        • 1970-01-01
        • 2017-12-20
        • 2012-04-08
        • 1970-01-01
        • 2018-01-11
        • 2015-09-16
        • 2013-04-08
        • 1970-01-01
        相关资源
        最近更新 更多