关于注册了通知/监听 必须注销

An instance 0x15618e00 of class UITextView was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here’s the current observation info:

<NSKeyValueObservationInfo 0x159b3b70> (

<NSKeyValueObservance 0x159b3b30: Observer: 0x14c68c00, Key path: contentSize, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x159cab50>

)

我对UITextView进行了监听,却没有注销

注册了,一定要注销。还要判断是否存在,存在才注销,不存在不能对其进行没有的操作(有的本身没有判断是否存在的,,可用一个变量去做判断,eg:bool,int)

放弃等于又一次可以选择的机会。

关于注册了通知/监听 必须注销

相关文章:

你感兴趣的文章:

标签云: