Disable UITextField keyboard?

The UITextField’s inputView property is nil by default, which means the standard keyboard gets displayed. If you assign it a custom input view, or just a dummy view then the keyboard will not appear, but the blinking cursor will still appear: UIView* dummyView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, 1)]; myTextField.inputView = dummyView; // Hide … Read more

how to hide the keyboard when empty area is touched on iphone

Updated way (recommended): – (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self.view endEditing:YES]; } This will end editing on all subviews and resign the first responder. Other way (enumerating over all text views): Here’s a step by step for it: Add an IBAction to your view controller, such as – (IBAction)backgroundTouch:(id)sender In the backgroundTouch action, you need … Read more

How to dismiss keyboard for UITextView with return key?

Figured I would post the snippet right here instead: Make sure you declare support for the UITextViewDelegate protocol. – (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { if([text isEqualToString:@”\n”]) { [textView resignFirstResponder]; return NO; } return YES; } Swift 4.0 update: func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { if text == … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)