uikeyboard

Adjust View For Keyboard When Switching UITextField?

大兔子大兔子 提交于 2020-01-06 08:09:27
问题 I have the ability for my view to slide up when the keyboard appears in my app so the text field can be seen and it worked just fine. However, because its based on keyboard notifications it only works when the keyboard appears. Meaning, I select a textfield, the keyboard appears and the view slides up accordingly, but if I then tap directly onto another textfield the view doesn't adjust because the keyboard is already present. Here is the code I am using, any help adapting this to work in a

Adjust View For Keyboard When Switching UITextField?

佐手、 提交于 2020-01-06 08:08:16
问题 I have the ability for my view to slide up when the keyboard appears in my app so the text field can be seen and it worked just fine. However, because its based on keyboard notifications it only works when the keyboard appears. Meaning, I select a textfield, the keyboard appears and the view slides up accordingly, but if I then tap directly onto another textfield the view doesn't adjust because the keyboard is already present. Here is the code I am using, any help adapting this to work in a

Xcode : Number pad with point for comma

房东的猫 提交于 2020-01-03 05:53:10
问题 I have a number pad with done button. But the user can only choose numbers without comma's. So i there a way to have a number pad with donebutton (wich I have) , integreted with punctation , or at least a point for the comma ? Thanks ! ;) 回答1: Your question implies that you're doing to be doing some formatted number. It would then seem like a safe assumption that you're going to be working with a fixed number of decimal places (as it is more common to see a formatted number with a fixed

How to detect keyboard type changes with the size, type, suggestion bar height of new keyboard type?

点点圈 提交于 2020-01-02 05:21:41
问题 Is there any way to detect keyboard types changes with the size, type and suggestion bar height, change like from English keyboard to Hindi which contains some kind of suggestion bar (see screenshot). Normal English Keyboard First Problem After changing to Hindi LIPI - When just I changed, everthing is fine because size of english and hindi keyboard is same, but after start typing Hindi Lipi suggestion cover the TextField Second Problem After changing to Emoji - Emoji keyboard hight little

How should I get my inputAccessoryView to resize when rotating device?

半城伤御伤魂 提交于 2020-01-02 02:40:47
问题 I'm attaching a UIToolbar to my UITextView as its inputAccessoryView in order to add a button to dismiss the keyboard. This works great and it looks correct when the device is in portrait mode. But I'm having trouble figuring out how to resize the toolbar to the lower height used for toolbars when the device is in landscape mode. I'm adding the toolbar in my text view's delegate's -textViewShouldBeginEditing: method: if (!textView.inputAccessoryView) { UIToolbar *keyboardBar = [[UIToolbar

UITextView resign first responder on 'Done'

笑着哭i 提交于 2019-12-31 21:32:47
问题 I have been searching around the web for about an hour now, and cannot find any code to help me with this. I have a UITextView that I need to resign first responder of when the user presses the 'Done' button on their keyboard. I have seen code floating around the internet like this: -(BOOL) textFieldShouldReturn:(UITextField *)textField { [textField resignFirstResponder]; return NO; } But that will not work for a UITextView . Simply put, How can I tell when the user presses the done button on

iOS7 Keyboard Return/Done/Search tint colour

旧时模样 提交于 2019-12-31 08:29:48
问题 With the new iOS7 UIView tint color it becomes pretty easy to theme an entire app quickly. It even changes the color of the text caret when editing UITextFields. However, the keyboard's bottom right 'dismiss' button (can be Done, Search, etc) is always blue. Is there any way to change this? It would look really nice if it matched the tint color of the rest of the app. 回答1: With a little hack maybe you can achieve the effect you are looking for. But it might not be able to pass the app review.

how to show the tabbar when keyboard appears in iphone

别等时光非礼了梦想. 提交于 2019-12-31 06:58:08
问题 hello all i am working in a tabbar based application where i need to show a keyboard , the keyboard appearing generally but I want my tabbar should be shown and on above of the tabbar only the keyboard should shown how this can be done.. thank you all 回答1: You can move the tabbar along with the keyboard like this: - (IBAction)textBoxEditing:(id)sender { CGRect frame = [[[self tabBarController] tabBar] frame]; frame.origin.y = 712; [UIView animateWithDuration:0.25f animations:^ { [[[self

UIKeyboardWillHide not triggered

随声附和 提交于 2019-12-31 03:22:27
问题 I read many post here about this topic, but I wasn't able to find an answer to my question, so, hope you won't be bored about another UIKeyboard post :-) In my view controller's implementation I added self as an observer for the two notifications UIKeyboardWillShowNotification and UIKeyboardWillHideNotification , passing the selectors keyboardWillShow: and keyboardWillHide: to handle to notifications. As I touch a UITextField , the keyboardWillShow: method is called but when I press a "Done"

How to change iOS device keyboard to specific language

北城以北 提交于 2019-12-31 02:58:19
问题 In iOS, the developer can get the current device language and locale. However, what if we want to set the keyboard to a specific language/locale, based on the users' preferences, when they are in different parts of our app? In my app, there are multiple languages, and I want the user to be presented with the Arabic keyboard, for example, when they are in the Arabic section, and the Russian keyboard, for example, when they are in the Russian section. How is it possible to pull this off? 回答1: