iphone-softkeyboard

MFMailComposeViewController Keyboard Issue

拟墨画扇 提交于 2019-11-30 03:12:50
问题 How do i dismiss the keyboard without pressing the Send or Cancel button in MFMailComposeViewController?! Thanks for any help. 回答1: Can you try this. UIWindow* keyWindow = [[UIApplication sharedApplication] keyWindow]; UIView* firstResponder = [keyWindow performSelector:@selector(firstResponder)]; [firstResponder resignFirstResponder]; hope this helps.... 回答2: I experienced a similar problem: For some reason iOS does not dismiss the Keyboard of a MFMailComposeViewController when the

Keyboard hides TabBar

穿精又带淫゛_ 提交于 2019-11-29 09:16:43
问题 I am working in a TabBar app. In one view there is a UISearchBar and, when is pressed, the keyboard appears. The problem is that the keyboard hides the tabbar. Do you know how to solve it? 回答1: To my knowledge you cant move keyboard .. so try to use transformation to move the tab-bar above keyboard Taken from here Another link 回答2: It's been a while since this was asked, but for the sake of documentation, here it goes: First, subscribe to the NSNotificationCenter to receive the keyboard

PhoneGap Page scroll up after Keyboard appearance in iOS devices that makes the PhoneGap page corrupted

醉酒当歌 提交于 2019-11-29 04:40:10
I am trying to develop a chatting application using PhoneGap for iOS devices. The application has a header that shows the logged user, a footer where user can write his text message, and a list view placed in the body which will display messages. I updated to the latest version of JQueryMobile (1.3.0) but the issue still appearing inside the application. I have attached a snapshot shows how the layout becomes corrupted. ( http://i.stack.imgur.com/RsLfT.png ) I tried several solutions like making the page not scrollable (set UIWebViewBounce to false) and not scalable (user-scalable=no) and

iOS Keyboard Location and Orientation

眉间皱痕 提交于 2019-11-28 09:08:09
问题 I'm relatively new to iOS SDK, and I'm experiencing a very bizarre issue regarding the device keyboard location and orientation for an app I'm working on. The problem is that if the keyboard is open while the user multi-tasks or the app goes into background, after the user comes back to the app, the keyboard will be be displaced (with UIKeyboardWillChangeFrameNotification being raised), but in an incorrect orientation and location. Sometimes the keyboard shows up completely off the screen too

Programmatically show soft keyboard on iPhone in a PhoneGap application?

亡梦爱人 提交于 2019-11-28 03:50:41
I've been searching far and long, and to this moment, I did not come across a working solution for PhoneGap / Cordova applications that would show soft keyboard programmatically. Scenario: We have a PhoneGap application - a website created in jQuery Mobile - that at one point shows a dialog to the user. This dialog is also a web page and has one single INPUT text box where user should enter a code. Problem: When the code dialog is shown, the input box is focused using JavaScript . However, due to restrictions placed on iPhone's internal browser, the soft keyboard does not come up until the

Receive iPhone keyboard events

拈花ヽ惹草 提交于 2019-11-27 19:12:10
Is there anyway to trap all keyboard events across my application? I need to know if user is entering anything using keyboard across my application (Application has multiple views). I was able to capture touchEvents by subclassing UIWindow but unable to capture keyboard events. Use NSNotificationCenter [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(keyPressed:) name: UITextFieldTextDidChangeNotification object: nil]; [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(keyPressed:) name: UITextViewTextDidChangeNotification object: nil]; .....

PhoneGap Page scroll up after Keyboard appearance in iOS devices that makes the PhoneGap page corrupted

霸气de小男生 提交于 2019-11-27 18:41:15
问题 I am trying to develop a chatting application using PhoneGap for iOS devices. The application has a header that shows the logged user, a footer where user can write his text message, and a list view placed in the body which will display messages. I updated to the latest version of JQueryMobile (1.3.0) but the issue still appearing inside the application. I have attached a snapshot shows how the layout becomes corrupted. (http://i.stack.imgur.com/RsLfT.png) I tried several solutions like

how to hide the keyboard when empty area is touched on iphone

老子叫甜甜 提交于 2019-11-27 10:43:21
normally when you touch the text input area, the keyboard pops up and when you touch the empty area of screen, the keyboard disappeared. How to make that happen? just like what we experienced on iphone safari... Thank you HitScan Updated way (recommended): - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self.view endEditing:YES]; } This will end editing on all subviews and resign the first responder. Other way (enumerating over all text views): Here's a step by step for it: Add an IBAction to your view controller, such as - (IBAction)backgroundTouch:(id)sender In the

Receive iPhone keyboard events

我是研究僧i 提交于 2019-11-27 04:21:23
问题 Is there anyway to trap all keyboard events across my application? I need to know if user is entering anything using keyboard across my application (Application has multiple views). I was able to capture touchEvents by subclassing UIWindow but unable to capture keyboard events. 回答1: Use NSNotificationCenter [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(keyPressed:) name: UITextFieldTextDidChangeNotification object: nil]; [[NSNotificationCenter defaultCenter]

hiding keyboard ios [duplicate]

霸气de小男生 提交于 2019-11-27 03:20:30
This question already has an answer here: Dismiss keyboard on touch anywhere outside UITextField 8 answers I have a few text inputs and I can hide the keyboard whenever I touch the background, but only when I have been entering into the first text box name textField1. now this code should be simple but I just can't seem to get it. -(IBAction)backgroundTouched:(id)sender { [textField1 resignFirstResponder]; [buildLength resignFirstResponder]; [buildWidth resignFirstResponder]; [ridgeWidth resignFirstResponder]; [rafterWidth resignFirstResponder]; [hipWidth resignFirstResponder]; [eaveOverhang