iOS组件化
2018-11-29 本文已影响18人
liboxiang
https://wereadteam.github.io/2016/03/19/iOS-Component/
总结: 不能直接去调用组件的方法,因为这样会产生依赖,那我就要通过其他方法去调用,也就是通过 字符串->方法 的映射去调用。runtime 接口的 className + selectorName -> IMP 是一种,注册表的 key -> block 是一种,而前一种是 OC 自带的特性,后一种需要内存维持一份注册表
CTMediator工作方式

当B原本存在的时候,个人认为的一种解决方式
