我有这个代码(XCode 4,使用故事板和ARC),它从数组(rArray)获取数据并将其放置在它最初来自的文本字段中(我想编辑数据)。数组(rArray)中包含有效数据,但文本域中没有任何数据。我究竟做错了什么?如何将数据导入文本框进行编辑?
SingletonListOfReadings *rShareInstance = [SingletonListOfReadings sharedInstance];
rArray *ra = [rShareInstance.listOfReadings objectAtIndex: indexPath.row]; // get an rArray object out of listOfReadings
// place data back into textfields
EnterDataViewController *edvc = [[EnterDataViewController alloc] init];
edvc.txtSTA1.text = ra.rSTA;
edvc.txtBS.text = ra.rBS;
edvc.txtFS.text = ra.rFS;
edvc.txtDesc.text = ra.rDesc;
[self.navigationController pushViewController:edvc animated:YES];
我把它们设置为属性,并且ra.rxx的值仍然没有进入strTxt字段。我在Storyboard和ARC中使用XCode4。 – SpokaneDude 2012-04-26 16:35:40
确保它们被定义为.H中的字符串,并带有属性,然后在M.中合成它们,然后在 - (void)viewDidAppear:(BOOL)动画 do:textUIElement.text = stringName; – chewy 2012-04-27 07:51:47