I have a tableview cell
. There's a button
and a label
in it. When the user clicks on the button, i want to popup an message box where the user will be able to type some text and submit. At that instance (When the user type the text and submits) the text typed by the user should be displayed on the UILabel
(In that particular cell
) of that cell. How can i do this ?
cell.cellButton.tag = indexPath.row;
[cell.cellButton addTarget:self action:@selector(cellButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
-(void)cellButtonClicked: (id)sender {
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"alert" message:@"Enter your text" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok"];
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
[alert show];
}
Note: This is how each cell looks like
QUestions :
1.) How to populate the label in the Cell with the text ? (Please consider that i already have the text with me)