摘要: KVC KVC的全称是Key-Value Coding,俗称"键值编码",可以通过一个key来访问某个属性 常用的API: - (void)setValue:(id)value forKeyPath:(NSString *)keyPath; - (void)setValue:(id)value fo 阅读全文
posted @ 2020-11-23 23:33 木子沉雨 阅读(181) 评论(0) 推荐(0) 编辑
摘要: KVO KVO的全称是Key-Value Observing,俗称"键值监听",一般用于监听某个对象属性值的改变 KVO代码实现 #import "ViewController.h" #import <objc/runtime.h> @interface LBPerson : NSObject @p 阅读全文
posted @ 2020-11-23 22:40 木子沉雨 阅读(220) 评论(0) 推荐(0) 编辑