系统的KVO存在很多问题,例如重复添加导致的多次回调,以及重复移除或忘记移除导致的崩溃。所以我基于Runtime写了套自定义的KVO,调用方式和原生的一样,并提供了block方式的回调,使代码更紧凑。
写的比较简单,可能会有一些其他bug。仅供技术交流,项目中尽量不要使用。如果要使用的话,推荐使用Facebook的KVOController。
This project forked from developererenliu/easykvo
自己实现系统KVO,简单易用,不会像原生KVO那样“矫情”很容易导致Crash,而且提供了block方式的回调
系统的KVO存在很多问题,例如重复添加导致的多次回调,以及重复移除或忘记移除导致的崩溃。所以我基于Runtime写了套自定义的KVO,调用方式和原生的一样,并提供了block方式的回调,使代码更紧凑。
写的比较简单,可能会有一些其他bug。仅供技术交流,项目中尽量不要使用。如果要使用的话,推荐使用Facebook的KVOController。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.