I am developing an application where I need to take text input from a user using a sectional view of a table. I never used a table view to input text input from a user. Please take a look at the image to understand the test.

I tried this in-place text editing in a UITableViewCell?
but it doesn’t fill what I wanted.
when I use the following code, I get output that is not like the previous image.
UITextField *txtField=[[UITextField alloc]initWithFrame:CGRectMake(45, 0, cell.frame.size.width, cell.frame.size.height)];
txtField.autoresizingMask=UIViewAutoresizingFlexibleHeight;
txtField.autoresizesSubviews=YES;
[txtField setBorderStyle:UITextBorderStyleRoundedRect];
[txtField setPlaceholder:@"Type Data Here"];
if (cell == nil)
{
cell.accessoryType = UITableViewCellAccessoryNone;
}
[cell addSubview:txtField];

see answer to questions 3 and 5.
Thank.
source
share