I have been looking long for a solution how to pass the value from one class to another. Basically I create a NSString via @property in a Settings class, which is displayed modally. I then set the NSString to a certain value depending on the settings chosen, and I want to have the value shown also in a class where the settings are supposed to make change. I also declare a string via @property in the second class, and I use the code
myController *controller = [[myController alloc] init];
secondClassString = controller.firstClassString
If I NSLog the string, it shows (null) in the second class...
Any ideas how to make it pass the value? Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…