//单例方法 访问 //通知名字
[[NSNotificationCenter defaultCenter] postNotificationName:@"TOBTV" object:self];
//接受中心
[[NSNotificationCenter defaultCenter]addObserver:self
selector:@selector(goTOBTV)
name:@"TOBTV"
object:nil];
//注册监听
//注册
[self addObserver:self forKeyPath:@"name" options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld context:nil];
监听代理方法
//监听
/*
-(void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context
{
NSLog(@"change=%@",change);
NSLog(@"keypath %@",keyPath);
}