iphone-softkeyboard

How to hide default keyboard

為{幸葍}努か 提交于 2019-12-04 13:50:38
问题 I have 5 UITextFields added on a form. One of the textfileds is for entering the date of birth. So when that particular textfield is touched instead of displaying the default keyboard, datepicker needs to be displayed. I tried the following: - (void)textFieldDidBeginEditing:(UITextField *)textField{ [textField resignFirstResponder]; [self showDatePicker];//this is my own function to display datepicker. } when this function is called the datepicker is displayed, along with the date picker the

How to hide default keyboard

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 08:48:40
I have 5 UITextFields added on a form. One of the textfileds is for entering the date of birth. So when that particular textfield is touched instead of displaying the default keyboard, datepicker needs to be displayed. I tried the following: - (void)textFieldDidBeginEditing:(UITextField *)textField{ [textField resignFirstResponder]; [self showDatePicker];//this is my own function to display datepicker. } when this function is called the datepicker is displayed, along with the date picker the default keyboard is also displayed and that hides the datepicker. I don't know how to get rid of the

How to hide keyboard - of - UITextView iPhone - by return Key [duplicate]

一世执手 提交于 2019-12-03 06:13:24
This question already has an answer here: How to dismiss keyboard for UITextView with return key? 33 answers In a UITextView, when we click on it, A keyboard appears, but when user press return key, (normally creates a new line in textView) keyboard should go down. How? Sagar R. Kothari Ok i have found the correct answer by the help of @jordan - link help. Implement following code to your view controller .m file & .h file add delegate -(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { if([text isEqualToString:@"\n"]) [textView

Hide keyboard in UIWebView

跟風遠走 提交于 2019-12-03 00:49:10
Is there a way to make a UIWebView dismiss all associated input controls, such as keyboards/pickers? Haven't tried it in a web view with a picker, but this definitely works to dismiss the keyboard: [theWebView endEditing:YES]; for (UIWindow *keyboardWindow in [[UIApplication sharedApplication] windows]) for (UIView *keyboard in [keyboardWindow subviews]) if([[keyboard description] hasPrefix:@"<UIFormAssistant"] == YES) { [keyboard removeFromSuperview]; } Dirty way but it works ;) 来源: https://stackoverflow.com/questions/3385368/hide-keyboard-in-uiwebview

UITextField with numbers and default keyboard

六眼飞鱼酱① 提交于 2019-12-01 17:36:58
Created a UITextField for "Postal Code/ZIP" field with a keyboardType of UIKeyboardTypeDefault. I would like to use the default keyboard but want the numbers & symbols to be shown by default as apposed to letters. Apple does this when you are entering addresses in the Contacts.app. Anyone know how to get this accomplished? You want the UIKeyboardTypeNumbersAndPunctuation keyboard type. And a code example of what executor21 said: UITextField* txt = [[UITextField alloc] init]; txt.keyboardType = UIKeyboardTypeNumbersAndPunctuation; 来源: https://stackoverflow.com/questions/2695167/uitextfield-with

UITextField with numbers and default keyboard

ε祈祈猫儿з 提交于 2019-12-01 16:24:17
问题 Created a UITextField for "Postal Code/ZIP" field with a keyboardType of UIKeyboardTypeDefault. I would like to use the default keyboard but want the numbers & symbols to be shown by default as apposed to letters. Apple does this when you are entering addresses in the Contacts.app. Anyone know how to get this accomplished? 回答1: You want the UIKeyboardTypeNumbersAndPunctuation keyboard type. 回答2: And a code example of what executor21 said: UITextField* txt = [[UITextField alloc] init]; txt

iPhone keyboard return key color

ε祈祈猫儿з 提交于 2019-12-01 09:16:25
Can we change the color of the iPhone keyboard return key color?? And does apple supports it?? If yes could you please help me out in changing it. There is no public API available for it. If you do with private API then your app will be get rejected in app store. 来源: https://stackoverflow.com/questions/5659421/iphone-keyboard-return-key-color

iPhone keyboard return key color

拜拜、爱过 提交于 2019-12-01 06:06:25
问题 Can we change the color of the iPhone keyboard return key color?? And does apple supports it?? If yes could you please help me out in changing it. 回答1: There is no public API available for it. If you do with private API then your app will be get rejected in app store. 来源: https://stackoverflow.com/questions/5659421/iphone-keyboard-return-key-color

How to hide the keyboard programmatically in iphone

倾然丶 夕夏残阳落幕 提交于 2019-11-30 22:47:55
问题 How to hide the keyboard programmatically in iphone? 回答1: Tell the UIResponder subclass that is currently first responder to resign its first responder status: [responder resignFirstResponder]; 回答2: [textFieldName resignFirstResponder]; 回答3: It's easy: ObjC [[[UIApplication sharedApplication] keyWindow] endEditing:YES]; Swift UIApplication.shared.keyWindow?.endEditing(true) take a look at UIView Class Reference for endEditing. Causes the view (or one of its embedded text fields) to resign the

MFMailComposeViewController Keyboard Issue

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 19:05:39
How do i dismiss the keyboard without pressing the Send or Cancel button in MFMailComposeViewController?! Thanks for any help. Can you try this. UIWindow* keyWindow = [[UIApplication sharedApplication] keyWindow]; UIView* firstResponder = [keyWindow performSelector:@selector(firstResponder)]; [firstResponder resignFirstResponder]; hope this helps.... I experienced a similar problem: For some reason iOS does not dismiss the Keyboard of a MFMailComposeViewController when the application enters background (the dismiss happens when the application becomes active again). However iOS dismisses the