坑:-[NSNull rangeOfCharacterFromSet:]: unrecognized selector sent to instance
原因是change[NSKeyValueChangeNewKey]的值是NSNull,所以需要做下面的判断。
// 监听baoDanModel的变化
[self.baoDanModel addObserver:self forKeyPath:@"bankAccNo" options:(NSKeyValueObservingOptionNew) context:nil];
[self.baoDanModel addObserver:self forKeyPath:@"bankBranch" options:(NSKeyValueObservingOptionNew) context:nil];
[self.baoDanModel addObserver:self forKeyPath:@"payBankId" options:(NSKeyValueObservingOptionNew) context:nil];