uikeyboard

Get keyboard size on iOS 8 not working with external keyboard

萝らか妹 提交于 2019-12-02 00:24:14
问题 Been looking at several SO post now, but none seem to help me. Just want a UITableView s bottom constraint to be set so that the keyboard never is on top of the tableview. Seems impossible in iOS 8. It work when using normal soft keyboard, but when removing it in simulator or using real hardware keyboard, it still thinks there is a soft keyboard. The code: var currentKeyboardHeight:CGFloat = 0.0 override public func viewDidLoad() { super.viewDidLoad() NSNotificationCenter.defaultCenter()

Detect if UIKeyBoard is Showing [duplicate]

╄→尐↘猪︶ㄣ 提交于 2019-12-01 23:01:16
This question already has an answer here: How can I programmatically check whether a keyboard is present in iOS app? 20 answers I'd like to detect whether or not the keyboard is showing. I've found a few other posts that traverse the subviews of UIWindow to find the keyboard, but if that is the only way then I'll figure out something else. I suppose I could also observe the UIKeyboard notifications, but I'm guessing there is a cleaner solution out there. I am not sure what's "dirty" in observing UIKeyboard notifications but it definitely beats traversing UIWindow hierarchy. 来源: https:/

Get keyboard size on iOS 8 not working with external keyboard

天涯浪子 提交于 2019-12-01 22:09:35
Been looking at several SO post now, but none seem to help me. Just want a UITableView s bottom constraint to be set so that the keyboard never is on top of the tableview. Seems impossible in iOS 8. It work when using normal soft keyboard, but when removing it in simulator or using real hardware keyboard, it still thinks there is a soft keyboard. The code: var currentKeyboardHeight:CGFloat = 0.0 override public func viewDidLoad() { super.viewDidLoad() NSNotificationCenter.defaultCenter().addObserver(self, selector: "keyboardWillShow:", name: UIKeyboardWillShowNotification, object: nil)

How can I create UIKeyboard with done button on top right corner?

强颜欢笑 提交于 2019-12-01 21:41:49
I need to show UIKeyboard with done button on top right corner ..please look into attached image..any help would be appreciated. This might help you. please check it out BSKeyboardControls Create a UIToolbar keep two bar buttons in that. Initially Hide that toolbar. Show the toolbar on the textfield didBeginEditing delegate of textfield and hide the toolbar in didEndEditing delegate of textfield EDIT: As prashant said BSKeyboard offers what i said. See the look and feel of it here http://www.cocoacontrols.com/platforms/ios/controls/bskeyboardcontrols You should set inputAccessoryView propery

Animate UIView Up With Keyboard [duplicate]

眉间皱痕 提交于 2019-12-01 18:11:34
问题 This question already has answers here : Keeping object on top of keyboard in the event of becomeFirstResponder or resignFirstResponder? (4 answers) Closed 5 years ago . I have a requirement to add chat functionality into an upcoming project. In the meantime I have been trying to implement what I expected to be the simple matter of having a UIView at the bottom of the screen which has a UITextView inside, which will animate up with the keyboard when the user taps on the UITextView. I have it

how to detect when the iOS default keyboard type switches from text to numbers

隐身守侯 提交于 2019-12-01 15:15:38
There are many posts about notifying the user when the keyboard type changes from things like the numberpad to default. This question is about knowing about when the user actually clicks on the [123] or the [ABC] button on the default keypad.. basically I want to know when this screen changes to this screen trying this: -(void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText { NSLog(@"::::::: this is text field type %d", searchBar.keyboardType); naturally always give me back 0 which is the default key type.. since it's assuming both are of the same keyboard type. I ran

iOS hide default keyboard and open custom keyboard

半城伤御伤魂 提交于 2019-12-01 14:46:02
I have an UITextview , when user taps on UITextview i need to hide the default keyboard. For that i have done, [myTextView setEditable: NO]; So the keyboard is not shown, here i have created an Custom View with UIButton , i need to show this UIView when the user taps on UITextView , for that i have done, textViewDidBeginEditing{ //Here i have added UIView as subview } But this method is not working because of, [myTextView setEditable: NO]; and i need to close the UIView when user clicks the close button inside the UIView You should be using resignFirstResponder instead of setting the

how to detect when the iOS default keyboard type switches from text to numbers

夙愿已清 提交于 2019-12-01 14:16:31
问题 There are many posts about notifying the user when the keyboard type changes from things like the numberpad to default. This question is about knowing about when the user actually clicks on the [123] or the [ABC] button on the default keypad.. basically I want to know when this screen changes to this screen trying this: -(void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText { NSLog(@"::::::: this is text field type %d", searchBar.keyboardType); naturally always give me

iOS hide default keyboard and open custom keyboard

孤街醉人 提交于 2019-12-01 13:46:18
问题 I have an UITextview , when user taps on UITextview i need to hide the default keyboard. For that i have done, [myTextView setEditable: NO]; So the keyboard is not shown, here i have created an Custom View with UIButton , i need to show this UIView when the user taps on UITextView , for that i have done, textViewDidBeginEditing{ //Here i have added UIView as subview } But this method is not working because of, [myTextView setEditable: NO]; and i need to close the UIView when user clicks the

How can I change the language of the displayed UIKeyboard from within my iPhone app?

﹥>﹥吖頭↗ 提交于 2019-12-01 12:05:36
Within my iPhone application, I'd like to change the language of the displayed UIKeyboard. How can I do this? From the iPhone Application Programming Guide : Depending on the needs of your program and the user’s preferred language, the system might display one of several different keyboards. Although your application cannot control the user’s preferred language (and thus the keyboard’s input method), it can control attributes of the keyboard that indicate its intended use, such as the configuration of any special keys and its behaviors. [...] To facilitate the language preferences of different