devxoul / UITextView-Placeholder

A missing placeholder for UITextView
MIT License
1.48k stars 259 forks source link

modify the KVO function #36

Open dourgulf opened 7 years ago

dourgulf commented 7 years ago

The original KVO use runtime to hook UITextView’s dealloc method and release. This method maybe cause a problem: When this category was compile into a dynamic framework, and was used in other project which also reference this category. In that case, the runtime hook two times, and result is KVO not removed. This case can be reproduce in demo project: compile “UITextView+Placeholder.m” file in demo project and framework both.

devxoul commented 7 years ago

@dourgulf, thanks for your work. I'll take a look this soon :+1:

dourgulf commented 7 years ago

nice, you are still focus on this project:)