iPhone KVO between two classes
I have two classes in my app class A and Class B. Both class A and B are instances of UIViewController. Class A has a button that when pushed pushes class B onto the stack. Class B has a string that class A would like to observe and update it's interface with as needed. I've been able to use: [self addObserver:self forKeyPath:@"name" options:0 context:NULL]; in class B to view the changes to the string. When i try and use the following in class A viewWillAppear method: ClassB *b = [[ClassB alloc]init]; [b addObserver:self forKeyPath:@"name" options:0 context:NULL]; and add the method: (void