uikeyboard

iPad keyboard dimensions

╄→尐↘猪︶ㄣ 提交于 2019-12-17 23:11:53
问题 I have found the iPhone's keyboard bounds in the apple documentation, but I can't find the iPad's keyboard bounds. Could you please help me? 回答1: The entire answer in code looks like this. First you need to register for the notifications: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name:UIKeyboardDidShowNotification object:nil]; and there are more here. Note that you'll need to get rid of them, too (use removeObserver ). Then you need a method

Custom Keyboard: inputView: how to change the Keyboard size?

笑着哭i 提交于 2019-12-17 22:55:17
问题 I implemented the textfield with a custom keyboard with the "setInputView" function. But i have a problem: my keyboard frame is not a standard iphone keybord frame. The question is: How can i change the size of my custom keyboard? I know some functions like: UIKeyboardFrameBeginUserInfoKey, ..etc. Please Note: The iPhone keyboard frame is = 0,264,320,216 My custom keyboard frame is = 0,0,320,460 Hoping for your kind collaboration, Best regards... P 回答1: It turns out that the default behaviour

Making the view slide up to make room for the keyboard?

假如想象 提交于 2019-12-17 19:52:29
问题 I just started learning to program iPhone apps and I can't seem to figure out how to make the view slide out of the way when the keyboard appears (so you can still see the text field you're typing in). How is it done? 回答1: If it is OK visually, the easiest is to move the entire self.view.frame and then move it back down when finished. static const CGFloat KEYBOARD_ANIMATION_DURATION = 0.3f; - (void) animateForToNewYPosition:(int)newYPosition { // move for kdb if (self.view.frame.origin.y ==

iOS: How to access the `UIKeyboard`?

≯℡__Kan透↙ 提交于 2019-12-17 16:29:08
问题 I want to get a pointer reference to UIKeyboard *keyboard to the keyboard on screen so that I can add a transparent subview to it, covering it completely, to achieve the effect of disabling the UIKeyboard without hiding it. In doing this, can I assume that there's only one UIKeyboard on the screen at a time? I.e., is it a singleton? Where's the method [UIKeyboard sharedInstance] . Brownie points if you implement that method via a category. Or, even more brownie points if you convince me why

display soft keyboard (iPad) when is connected a bluetooth input device

限于喜欢 提交于 2019-12-17 15:59:12
问题 I'm really bangin' my head because I can't find the way to show the soft keyboard when there's a bluetooth input device connected to the iPad. I made some search on the web and this is the result: a question on stackoverflow with a very short answer How can I detect if an external keyboard is present on an iPad? an application developed by erica sadun for the cydia env http://www.tuaw.com/2010/06/02/hacksugar-bringing-back-the-on-screen-keyboard/ Erica said that the trick is to answer to the

Creating a custom UIKeyBoard for iPhone

跟風遠走 提交于 2019-12-17 10:46:53
问题 If anyone has the app GymBuddy, then they will know what I am talking about. They seem to use the stock Number Pad keyboard but have added a "." button in the lower left as well as a bar across the top to switch to alpha characters. Does anyone know how to do this? Do I make a new view like the keyboard and pull it up and have the buttons correspond to the textField for input? I can't seem to find any information on customizing a keyboard or creating your own. Thanks 回答1: I have done this.

How do you dismiss the keyboard when editing a UITextField

拟墨画扇 提交于 2019-12-17 03:45:58
问题 I know that I need to tell my UITextField to resign first responder when I want to dismis the keyboard, but I'm not sure how to know when the user has pressed the "Done" key on the keyboard. Is there a notification I can watch for? 回答1: I set the delegate of the UITextField to my ViewController class. In that class I implemented this method as following: - (BOOL)textFieldShouldReturn:(UITextField *)textField { [textField resignFirstResponder]; return NO; } 回答2: If you connect the DidEndOnExit

Move view with keyboard using Swift

烈酒焚心 提交于 2019-12-16 22:06:34
问题 I have an app that has a text field on the lower half of the view. This means that when I go to type in the text field the keyboard covers the textfield. How would I go about moving the view upwards while typing so I can see what i'm typing and then moving it back down to its original place when the keyboard disappears? I've looked everywhere but all the solutions appear to be in Obj-C which I can't quite convert just yet. Any help would be greatly appreciated. 回答1: Here is a solution,

iOS8 Custom Keyboard: Detect which app is using keyboard

早过忘川 提交于 2019-12-14 02:36:39
问题 I made a custom iOS8 keyboard but I need to detect which app is using the keyboard. f.e. I need to know if its Whatsapp or just normal Messages to handle a different logic. I haven't found any related question on this. And frankly I don't think this is possible, or even allowed by Apple. The closest other Q/A I could find was this. 来源: https://stackoverflow.com/questions/27125299/ios8-custom-keyboard-detect-which-app-is-using-keyboard

Is it possible to update something in the UI while performing synchronous calls or other operations?

ぐ巨炮叔叔 提交于 2019-12-13 21:01:02
问题 At several points in my project, I need to perform some synchronous web service calls or read from CoreData. It may take a couple seconds to preform these operations, so I created a LoadingView class that is a subclass of UIView that has a simple message and a UIActivityIndicatorView . For normal UIButton s, I just [myLoadingView setHidden:NO] on the Touch Down event, and [myLoadingView setHidden:YES] on the Touch Up Inside event. This all works exactly how I want. The problem is I cannot