从另一个角度来看,objective-c更新数据

| 我在我的应用中使用了基于导航的视图控制器。用户可以单击导航中的按钮以打开新视图,从中可以从几个不同的选项中进行选择。我想发生的是,当用户返回到原始视图时,应用程序将在第二个视图中选择的选项保存到原始视图中的对象中。 我已经尝试了一些方法,但是没有一个起作用。 我尝试在原始视图控制器中创建一个对象,将其变成属性:
@property (nonatomic, retain) NSString *testing;
然后在第二个视图控制器中,当用户选择一个选项时,用如下所示更新它:
if (!oVC)
    oVC = [[OriginalViewController alloc] init];

oVC.testing = object;
我无法正常工作。有人可以指出我正确的方向吗?这将不胜感激。     
已邀请:
        使用NSUserDefaults 一堂课:
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]
[prefs setInteger:1 forKey:@\"integerKey\"];
在另一堂课中:
 NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
 NSInteger myInt = [prefs integerForKey:@\"integerKey\"];

//Now myInt has the value 1.
在此处检查文档! 您还可以具有NSNotification并传递NSDictionary类型:
NSDictionary *info = [NSDictionary dictionaryWithObject:@\"Brad Pitt\" forKey:@\"User Name\"];


[[NSNotificationCenter defaultCenter] postNotificationName:@\"UserNameNotification\" object:self userInfo:info];
然后,您可以添加观察者并为相应的Selector编写方法。     

要回复问题请先登录注册