zoukankan      html  css  js  c++  java
  • KVC

     赋值

    // 能修改私有成员变量
    
    - (void)setValue:(id)value forKey:(NSString *)key;
    
    - (void)setValue:(id)value forKeyPath:(NSString *)keyPath;
    
    - (void)setValuesForKeysWithDictionary:(NSDictionary *)keyedValues;

    取值

    // 能取得私有成员变量的值
    
    - (id)valueForKey:(NSString *)key;
    
    - (id)valueForKeyPath:(NSString *)keyPath;
    
    - (NSDictionary *)dictionaryWithValuesForKeys:(NSArray *)keys;

    KVC最重要的作用就是修改私有变量。

  • 相关阅读:
    eclipse c++
    smb
    osx mount nfs/smb
    0927用的
    0926 隐藏地址栏
    0921笔记
    生成文件并下载
    在线图标
    react redux
    electron
  • 原文地址:https://www.cnblogs.com/wwjwb/p/12650489.html
Copyright © 2011-2022 走看看