最近遇到H5界面里的textField和textView在點(diǎn)擊第二次的時(shí)候崩潰的問題,但是原生的卻沒有問題,打開僵尸斷點(diǎn)打印如下錯(cuò)誤信息。
Cannot form weak reference to instance (0x1534ad840) of class UICompatibilityInputViewController. It is possible that this object was over-released, or is in the process of deallocation.
原因:
UICompatibilityInputViewController是UIViewController的子類,我在UIViewController的category中重寫的dealloc方法,導(dǎo)致UICompatibilityInputViewController過度釋放而崩潰
解決辦法:
去掉category中的dealloc方法(使用方法交換后仍然會(huì)過度釋放)。