坑:-[NSNull rangeOfCharacterFromSet:]: unrecognized selector sent to instancespa
緣由是change[NSKeyValueChangeNewKey]的值是NSNull,因此須要作下面的判斷。3d
// 監聽baoDanModel的變化server
[self.baoDanModel addObserver:self forKeyPath:@"bankAccNo" options:(NSKeyValueObservingOptionNew) context:nil];blog
[self.baoDanModel addObserver:self forKeyPath:@"bankBranch" options:(NSKeyValueObservingOptionNew) context:nil];io
[self.baoDanModel addObserver:self forKeyPath:@"payBankId" options:(NSKeyValueObservingOptionNew) context:nil];class