title: How to add text field to inputAccessoryView and make the textView first responder
body: <p>My code:</p>
  
  <pre><code>- (void)viewDidLoad {
  
      [super viewDidLoad];
  
      CGRect rectFake = CGRectZero;
  
      UITextField *fakeField = [[UITextField alloc] initWithFrame:rectFake];
  
      [self.view addSubview:fakeField];
  
      UIView *av = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 0.0, 39.0)];
  
      av.backgroundColor = [UIColor darkGrayColor];
  
      CGRect rect = CGRectMake(200.0, 4.0, 400.0, 31.0);
  
      UITextField *textField = [[UITextField alloc] initWithFrame:rect];
  
      textField.borderStyle = UITextBorderStyleRoundedRect;
  
      textField.font = [UIFont systemFontOfSize:24.0];
  
      textField.delegate = self;
  
      [av addSubview:textField];
  
      fakeField.inputAccessoryView = av;
  
      [fakeField becomeFirstResponder];
  
  }
  </code></pre>
  
  <p>I tried to add </p>
  
  <pre><code>[textField becomeFirstResponder] 
  </code></pre>
  
  <p>at the end, but it does no work. </p>
  
  <p>Another problem that delegate method to hide keyboard when ENTER is pressed does not work also.</p>
  
  <pre><code>- (BOOL) textFieldShouldReturn:(UITextField *)textField {
  
      [textField resignFirstResponder];
  
      return YES;
  }
  </code></pre>