iphone-keypad

Textfields is hiding by the Keypad [duplicate]

给你一囗甜甜゛ 提交于 2019-12-25 02:53:20
问题 This question already has answers here : How can I make a UITextField move up when the keyboard is present - on starting to edit? (93 answers) Closed 5 years ago . I have made an app with a Registration form. When the Textfield in this form is selected it gets hidden by the soft keyboard. If i leave it as it is user can't see what he is entering while typing. 回答1: this is the old method ,but working fine for each time in your .h file @interface signupViewController : UIViewController {

Best settings for HTML <input type=“number”>, for mobile devices

落花浮王杯 提交于 2019-12-23 07:57:19
问题 I've been reading many other questions, like these[1][2][3] for example, but the problem still persists. I need to find the "cleanest" way to have a HTML input for mobile devices and which respects all these three rules: suitable mainly for numbers , integer or float shows the numeric keypad on mobile devices , on Chrome for Android and Safari for iOS, with no strange extra keys fully respects the HTML5 rules (tested by W3 validator) What have I tried? I've been across these solutions, which

How to change keyboard background color in iOS?

我怕爱的太早我们不能终老 提交于 2019-12-17 10:33:54
问题 I would like to know how to change the keyboard background color programmatically in iOS? The background is normally grey but I have already seen black background (behind letters). 回答1: For the dark background use: mytextfield.keyboardAppearance = UIKeyboardAppearanceAlert; Read to find more information about UITextInputTraits (use UIKeyboardAppearanceDark at iOS 7+). 回答2: To change it globally, you can use appearance proxy in AppDelegate... I've tested it in iOS 8, Swift: UITextField

How to get keyboard with Next, Previous and Done Button?

你。 提交于 2019-12-17 10:16:57
问题 I want to have a keyboard which has a Next,Previous and Done button on top of it. I have seen that in many apps. Especially where there are forms to be filled. I want to achieve something similar to above keyboard How can I get that? 回答1: You'll find the answer on this other post. I checked the iOS Library and the inputAccessoryView of a UITextField is exactly what you're looking for ! Hope this helps ! 回答2: I just created a class called BSKeyboardControls which makes it very easy to add the

resign keyboard in UITextField

和自甴很熟 提交于 2019-12-12 03:19:13
问题 I'm working with storyboards on iOS 5 and have a simple screen that has a UITextField on it. I want to dismiss the keyboard when the user hits "Return". I followed other suggestions such as having my controller implements the UITextFieldDelegate protocol and implements textFieldShouldReturn: as follows: - (BOOL)textFieldShouldReturn:(UITextField *)textField { [questionField resignFirstResponder]; return YES; } However I see that this method is never called. I have set the controller of my

How to turn off iPhone keypad for a specified input field on web page

坚强是说给别人听的谎言 提交于 2019-12-10 02:19:30
问题 I am using a monthpicker input (similar to jQuery UI datepicker) for a credit card expiration field. I need to suppress the iPhone keypad because it hides the month picker. I have tried setting the field to readonly and it is not an acceptable solution - in Safari iOS 5.1 readonly fields are skipped over in keyboard navigation (prev/next buttons on the keypad). Blurring the field is also not acceptable because it triggers validation (we are also using jQuery validation). Is there a way to

How to turn off iPhone keypad for a specified input field on web page

两盒软妹~` 提交于 2019-12-05 01:28:07
I am using a monthpicker input (similar to jQuery UI datepicker) for a credit card expiration field. I need to suppress the iPhone keypad because it hides the month picker. I have tried setting the field to readonly and it is not an acceptable solution - in Safari iOS 5.1 readonly fields are skipped over in keyboard navigation (prev/next buttons on the keypad). Blurring the field is also not acceptable because it triggers validation (we are also using jQuery validation). Is there a way to turn off the iPhone keyboard on a single field without setting it readonly or blurring it? I haven't come

Official way to use the new keyboard click sounds in iOS 10

夙愿已清 提交于 2019-12-04 08:34:02
问题 My app contains a custom control that copies the behaviour of the iOS standard keyboard. I can successfully play the system keyboard click sound with this code: UIDevice.current.playInputClick() On iOS 9 and below there is only one click sound and this call is all I need. On iOS 10, there are different click sounds for regular keys, for the backspace key and for other special keys. What is the official way to play these additional sounds? Do I have to use the alternative way from the linked

UITextField - Allow only numbers and punctuation input/keypad

萝らか妹 提交于 2019-11-30 07:25:29
I have tried the code below but that only allows for numbers on the keypad to be inputted. My app requires the keypad to use a period/full stop (for money transactions). The code I tried is: - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { NSCharacterSet *nonNumberSet = [[NSCharacterSet decimalDigitCharacterSet] invertedSet]; if ([string rangeOfCharacterFromSet:nonNumberSet].location != NSNotFound) { return NO; } return YES; } Thanks for any help. Kalpesh Try this Make a macro #define ACCEPTABLE_CHARACTERS @

UITextField - Allow only numbers and punctuation input/keypad

主宰稳场 提交于 2019-11-29 09:29:45
问题 I have tried the code below but that only allows for numbers on the keypad to be inputted. My app requires the keypad to use a period/full stop (for money transactions). The code I tried is: - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { NSCharacterSet *nonNumberSet = [[NSCharacterSet decimalDigitCharacterSet] invertedSet]; if ([string rangeOfCharacterFromSet:nonNumberSet].location != NSNotFound) { return NO; }