我的应用程序中有一个文本字段。我试图将任何输入到数组中的文本字段中,并将它显示在我的根视图控制器(这是一个表视图),单击按钮。从文本字段检索数据
该按钮的方法是如下:
-(IBAction)addNewCountry:(id)sender
{
[rootViewController.details addObject:nameField.text];
NSLog(@"Country name is %@", rootViewController.details);
[self.navigationController pushViewController:rootViewController animated:YES];
[rootViewController.tableView reloadData];
NSLog(@"new country added");
}
细节是在RootViewController的
但是,文本字段中的文本没有检索声明的阵列。有谁能告诉我我错过了什么?
如果你的答案按商定的刻度 – Marios
如果你有一个新的问题,问它作为一个新的问题,不要” t编辑旧的。我已经回滚你的编辑。 – jrturton