hello every one
i have table view with one cell,and i make on this cell a UITextView that the user can write what he want,this is the code inside the cellForRow:
static NSString *CellIdentifier = @"Cell";
UITextView *text;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
text = [[UITextView alloc]initWithFrame:CGRectMake(1, 5, 200, 140)];
text.tag = 1;
UIView *statusView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 300, 150)];
statusView.tag = 0;
[statusView addSubview:text];
[cell.contentView addSubview:statusView];
}
else {
text = (UITextView *)[[cell.contentView viewWithTag:0] viewWithTag:1];
}
i want to make a save button and i want to know how i can take the text from this UITextView from another method in the class.
thx
Use
UIButtonto create the button and set a action (method) for that will be called when you click on button.