0
votes

please help.When I press the button I want the data to print to the array multiple times and populate in the table. I have the code for the table just need help with the textview or array or do i need a dictionary?

-(IBAction)share{

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

    [alert1 show];


}

else { alert1 = [[UIAlertView alloc]initWithTitle:@"Testimony" message:@"Please Post your Testimony" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];

[alert1 show];

}

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

}

1
what do you mean by print the array. Do you have used table to showing data of array? - Ajay Chaudhary

1 Answers

2
votes

I meant, each time you press the button for whats in the textview, how do you view the data in the tableview each time you press the button. The way I have it set up is that you press it once and it keeps overlapping the existing data. I want the data to be saved and stored in the tableview each time i press the button.