if you tell an objective c object to removeObservers: for a key path and that key path has not been registered, it cracks the sads. like -
'Cannot remove an observer for the key path "theKeyPath" from because it is not registered as an observer.'
is there a way to determine if an object has a registered observer, so i can do this
if (object has observer){
remove observer
}
else{
go on my merry way
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…