title: I can not hide keyboard by pressing return key
body: <p>I have tried this:</p>
  
  <p>In <code>.h</code> file :</p>
  
  <pre><code>    @interface TouchLabelViewController : UIViewController&lt;UITextFieldDelegate&gt;
  @property (strong, nonatomic) IBOutlet UITextField *aTextField;        
  -(IBAction)hideKeyboard:(id)sender;
  </code></pre>
  
  <p>In <code>.m</code> File :</p>
  
  <pre><code>-(IBAction)hideKeyboard:(id)sender{
      [(UITextField*)sender resignFirstResponder];
  }
  </code></pre>
  
  <p>And also tried this.</p>
  
  <p>In <code>.h</code> file :</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      aTextField.delegate = self;
  }
  @property (strong, nonatomic) IBOutlet UITextField *aTextField;
  -(BOOL) textFieldShouldReturn:(UITextField *)textField;
  </code></pre>
  
  <p>In <code>.m</code> file:</p>
  
  <pre><code>-(BOOL) textFieldShouldReturn:(UITextField *)textField{
  
      [aTextField resignFirstResponder];
      return YES;
  }
  </code></pre>
  
  <p>But still whenever I touch return key it does not hide keyboard.</p>