Now my question is, how do I set the text of lbl1 with the value of textFieldA?
lbl1 is on my view.
Kind Regards
What you're doing is a bad idea. A view controller's view hierarchy should be treaded as private. Rather than observing the labels' text value, set up string properties in the other view controller that get installed in the label field. Then observe those properties rather the labels themselves.
I don't usually try to decode the dictionary of info that comes in from a KVO notification. Instead, I just use an if statement to figure out which key changed, and then get the new value of the property directly. it's simpler.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
So if I understand you right, then I have to set my label fields to strings in the other view and then read the strings with KVO?
Yes.
Only a view controller should read or write data to its views. A view controller's public interface should provide a way to set values that get displayed to that view controller's on-screen interface. Properties are a really easy way to transfer string settings for labels into a view controller.
Just add a line in your view controller's viewWillAppear method that copies the string value from the property into the label's text property:
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.