2013-05-17 46 views
0

請幫助。當我按下按鈕時,我希望數據多次打印到陣列並填充到表格中。我有表的代碼只需要textview或數組的幫助,或者我需要一本字典嗎?每次按下按鈕時打印到陣列Xcode:

- (IBAction爲)份額{

if (textdata.text.length > 0) 
{ 
    alert1 = [[UIAlertView alloc]initWithTitle:@"Testimony" message:@"Posted Succcessfully: God Bless You" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; 

    [alert1 show]; 


} 

其他 { 報警1 = [[UIAlertView中頁頭] initWithTitle:@ 「見證」 消息:@ 「請把你的證詞」 委託:無cancelButtonTitle:@」好的「otherButtonTitles:nil];

[alert1 show]; 

}

array = [[NSMutableArray alloc]initWithObjects:textdata.text, nil]; 

}

+0

打印數組是什麼意思。你有使用表來顯示數組的數據? –

回答

2

我的意思是,每次按了什麼在TextView的,你怎麼在實現代碼如下每次查看數據按鈕,按下按鈕。我建立的方式是,您只需按一下它,並保持現有數據的重疊。我希望每次按下按鈕時都會將數據保存並存儲在tableview中。