我有這個代碼(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