title: Setting textfield text does not work
body: <p>Beginner programmer trying to understand why I cannot accomplish this simple task. I know it is most likely a very simple solution but hoping that someone will explain the WHY.</p>
  
  <p>I have a screen where users can input emails into a textfield. The idea is that if upon entering the e-mail, if it is not already in the stored emails, it will prompt the user to enter the new email/contact into the store. Since I check if the e-mail is valid BEFORE popping up the screen for contact creation, I'd like to take the text entered and put it directly into the "Email" field on the new contact creation page and not allow editing. I've tried numerous methods but CANNOT get the email to show up in the text field. Can someone explain why this is?</p>
  
  <p>Code from initial VC where users enter their emails. If the email does not exist in the store, this code creating the contact creator page is fired:</p>
  
  <pre><code>//I created this custom initializer since setting the text field (as I did below) would not work
  ContactCreationViewController *contactCreationVC = [[ContactCreationViewController alloc] initWithEmail:trimmedText];
  contactCreationVC.delegate = self;
  
  //initially I tried setting the text here but it did not work, I now understand why
  //[contactCreationVC.emailField setText:@"asdsadasd"];
  
  [contactCreationVC setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
  [contactCreationVC setModalPresentationStyle:UIModalPresentationOverCurrentContext];
  
  [self presentViewController:contactCreationVC animated:YES completion:nil];
  </code></pre>
  
  <p>This is the code for the actual ContactCreatorVC:</p>
  
  <pre><code>-(instancetype) initWithEmail:(NSString*)email{
      self = [super init];
  
      //tried setting email here which works as I check with breakpoints
      [self setEmail:email];
  
      //self.email = email here when I check
      return self;
  }
  
  ....
  
  - (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
  switch (indexPath.row) {
  
  ....
  
      case 3: {
          ContactCreationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:contactCreationCellIdentifier];
          cell.titleLabel.text = @"E-Mail";
          cell.userEntryTextfield.tag = 3;
          cell.userEntryTextfield.delegate = self;
          cell.userEntryTextfield.keyboardType = UIKeyboardTypeEmailAddress;
  
  //I try setting the email here but self.email = nil (don't understand why)
          cell.userEntryTextfield.text = [NSString stringWithFormat:@"%@", self.email];
          cell.userEntryTextfield.userInteractionEnabled = NO;
          cell.userEntryTextfield.autocapitalizationType = UITextAutocapitalizationTypeNone;
          self.emailField = cell.userEntryTextfield;
          return cell;
      }
  
  .....
  
  }
  </code></pre>
  
  <p>I feel stupid for even asking such a simple question but I clearly am not understanding what is going on behind the scenes cause I've tried everything. Can anyone explain what is going on and suggest the ideal solution from a best practice standpoint?</p>
  
  <p>EDIT: I guess my question could be more concise...it basically boils down to: why when I set self.email in the init does it not stick when I access self.email in the cellForRow method (it becomes nil)?</p>
  
  <p>(the textfield is in a cell in a tableview)</p>