zoukankan      html  css  js  c++  java
  • Dictionary

    • 对象 转换成 整型、浮点型。 intValue、floatValue

    • cellDic[@"preFillValue"floatValue]
      cellDic[@"unactivated"intValue]

    [_citiesData valueForKeyPath:@"name"];

    KVC(setValueForKeysWithDictionary:)效率不高,用李明杰老师的setValues:

     //遍历字典中的所有键值对

    • [dic enumerateKeysAndObjectsUsingBlock:^(id  _Nonnull key, id  _Nonnull obj, BOOL * _Nonnull stop) {

              

          }];

     

    字典里不能放基本数据类型,如果要放int,加@(int的变量名)

    @"raduis":@5000 // 如果是常量,不用写小括号了 ;如果是变量,需要加@() 

    在OC中,所有的集合是不能放结构体的。所谓的集合,形如@{},里面不能放结构体,只能放对象。如果要放结构体,必须对结构体包装,用[NSValue valueWith..]

  • 相关阅读:
    CAP.dll of dotnetcore
    GRPC 高性能 RPC 框架, 服务间通讯
    REST Client
    ERP Export
    ERP Update DataSource
    knockout js
    面试题目总结
    JavaScript Objiects and Prototypes
    PLS-00172: string literal too long
    字符串连接性能
  • 原文地址:https://www.cnblogs.com/dengchaojie/p/4743384.html
Copyright © 2011-2022 走看看