Force iOS numeric keyboard with custom / currency pattern

For now, JavaScript is the only solution. Here’s the simplest way to do it (using jQuery): HTML <input type=”text”> JavaScript $(‘input[type=”text”]’).on(‘touchstart’, function() { $(this).attr(‘type’, ‘number’); }); $(‘input[type=”text”]’).on(‘keydown blur’, function() { $(this).attr(‘type’, ‘text’); }); The idea is simple. The input starts off and ends up with type=”text”, but it briefly becomes type=”number” on the touchstart event. … Read more

How to mimic Keyboard animation on iOS 7 to add “Done” button to numeric keyboard?

In iOS 7, the keyboard uses a new, undocumented animation curve. While some have noted that using an undocumented value for the animation option works, I prefer to use the following: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:[notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]]; [UIView setAnimationCurve:[notification.userInfo[UIKeyboardAnimationCurveUserInfoKey] unsignedIntegerValue]]; [UIView setAnimationBeginsFromCurrentState:YES]; // work [UIView commitAnimations]; While block based animations are the recommendation, the animation … Read more

How to check the “Allow Full Access” is enabled in iOS 8?

UPDATE 08/23/2017 for iOS 10 compatibility: func isOpenAccessGranted() -> Bool{ UIPasteboard.general.string = “CHECK” return UIPasteboard.general.hasStrings } iOS 8: -(BOOL)isOpenAccessGranted{ return [UIPasteboard generalPasteboard]; } Please note that the simulator will always tell you that you have Full Access so for this to work properly you need to run it from a device.

Go vs. return button in iOS keyboard for HTML input forms

Update 2020/2021 As Cameron Cobb pointed out, Safari Mobile supports the new HTML attribute enterkeyhint since version 13.7 ~ Sept. 2020 (https://caniuse.com/mdn-html_global_attributes_enterkeyhint). The following values are possible (https://mixable.blog/ux-improvements-enterkeyhint-to-define-action-label-for-the-keyboard-of-mobile-devices/): <input enterkeyhint=”enter”> <input enterkeyhint=”done”> <input enterkeyhint=”go”> <input enterkeyhint=”next”> <input enterkeyhint=”previous”> <input enterkeyhint=”search”> <input enterkeyhint=”send”> Original Answer Aha… The ‘Go’ button is only shown, if the <input> tag … Read more