I have three UITextFields inside of a UITableView (3 separate rows). The first two are standard UITextFields which require text input but the third requires a data entry and is associated with a UIDatePicker.
Problem Statement:
When the screen loads, the third text field automatically begins editing and pops up the date picker. This is annoying. I just want the screen to wait for the user to begin input before doing anything. Please find below my viewDidLoad code. Your help / insight is much appreciated
- (void)viewDidLoad
{
[super viewDidLoad];
[scrollView setContentSize:CGSizeMake(320, 910)];
expirationDatePicker.hidden = YES;
expirationDatePicker.date = [NSDate date];
[expirationDatePicker addTarget:self
action:@selector(changeDateValue:)
forControlEvents:UIControlEventValueChanged];
[self configureView];
}
- (void)configureView
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsPath = [paths objectAtIndex:0]; //Get the docs directory
NSString *filePath = [documentsPath stringByAppendingPathComponent:[self.detailItem cardName]];
filePath = [filePath stringByAppendingPathExtension:@".png"];
NSData *pngData = [NSData dataWithContentsOfFile:filePath];
imgPickerButton.imageView.image = [UIImage imageWithData:pngData];
}
Attached is the screenshot taken immediately after the screen loads. You can see that the third text field has entered editing mode.

Ok – found the problem. In my tableviews I have custom UITableViewCells and in those custom cells, I for some reason had this method –
This was causing the textfield in the individual tableviewcells to automatically enter editing mode. Once I deleted this piece of code, it stopped doing that.