uikeyboard

Is there a simple replacement for MonoTouch.UIKit.UIKeyboard.BoundsFromNotification?

陌路散爱 提交于 2019-12-10 16:18:16
问题 MonoTouch.UIKit.UIKeyboard.BoundsFromNotification(MonoTouch.Foundation.NSNotificaton)] was deprecated in iOS 3.2. Is there a simple replacement method/snippet I can use? 回答1: New methods were added in iOS 3.2 to replace the deprecated one. Look at UIKeyboard documentation for FrameBeginFromNotification and FrameEndsFromNotification . There's a stackoverflow question that shows how to update your code at How to get UIKeyboard size with Apple iPhone SDK it's in Objective C but should be easy to

iOS Keyboard notifications triggered unnecessarily upon showing the alertviews on iOS8.3

孤街醉人 提交于 2019-12-10 14:14:07
问题 We are observing unusual behaviour with respect to Keyboard willshow & will hide notification on iOS 8.3. The viewcontroler (listenig to keyboard notifications) has a textfiled and upon clicking and upon tapping the submit button, the method first resigns the first responder from textfield, and shows an alert to inform warning. Everything works fine, it dismisses the keyboard and shows up the alert as expected. (calls the UIKeyboardWillHideNotification method too). However, on 8.3, after

How to add a UIToolbar on top of UIKeyboard using MonoTouch?

痞子三分冷 提交于 2019-12-10 11:32:20
问题 I follow the example in Obj-C at Custom iPhone Keyboard for finding the UIKeyboard in the Windows SubViews, however, I don't know how to do this using MonoTouch. I don't know what the "description" is. If it is a property of UIView I cannot access it from MonoTouch??? Can someone please provide an example of finding the UIKeyboard as in the Obj-C sample but in C# for use in MonoTouch? Thank you. 回答1: I assume you're looking for the same thing as the keyboard in Safari (i.e. it has a small

Is there any notification that gets sent when the Keyboard changes (like from NumberPad to Default)

南笙酒味 提交于 2019-12-10 11:25:19
问题 I am trying to figure out how I can get notified when the keyboard changes. What I am trying to do is add a DONE button to keyboard of type 4 & 5 (NumberPad and PhonePad), everything is working fine, except when I transition from a TextField using a Default KB type, The notification that the KeyboardDidAppear isn't being fired. Here is what I got: - (void)viewDidLoad { [super viewDidLoad]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name

Use the system keyboard without a UITextView or UITextField

你离开我真会死。 提交于 2019-12-10 07:14:16
问题 I am creating an app with core graphics that needs to take text input and place characters at specific pixel offsets. Do I have to subclass UITextField or something and re-invent the wheel (redefine it to be a more abstract text entry widget - really I only need the events a UITextField generates) or can I somehow show the keyboard, receive it's events and dismiss it myself! Thanks! 回答1: You could instantiate a UITextField with a frame that makes it invisible (off the "screen" to the left or

keyboardWillShow will only work from the second time on

ぐ巨炮叔叔 提交于 2019-12-09 20:12:30
问题 I have a UITextView that I need to move up when the user focuses on it. In the simulator I have set up 2 keyboards (English,Greek) Within keyboardWillShow function I change the UITextView's height to be less than the existing one, as in self.page_text.frame = CGRectMake(self.page_text.frame.origin.x, self.page_text.frame.origin.y, self.page_text.frame.width, (notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as NSValue).CGRectValue().origin.y - 180) The problem is that only each first

detect/get notification if shift key (modifier-key) pressed in uitextview

放肆的年华 提交于 2019-12-09 13:19:11
问题 I'm trying to figure out if there is any way in which we can detect if shift key is pressed or if any notification is sent when shift key is pressed in UIKeyboard - (BOOL) textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)string does not get called for shift key press since it is a modifier key. 回答1: Don't know whether you need to know it in combination with other text or only detect the single shift tap, but here is my solution for detecting

Make UITextView parent be its own inputAccessoryView

核能气质少年 提交于 2019-12-09 06:07:25
问题 I'm trying to achieve a similar keyboard interaction that Messages has in iOS 7. I have a UIView which contains a UITextView , and when the user selects it to start typing, I want to make this UIView the inputAccessoryView . This would take care of the animation for me, as well as the new UIScrollView keyboard dismiss interaction in iOS 7. When the UITextView begins editing, I'm trying to set its inputAccessoryView to its parent UIView (which is already in the view hierarchy). The keyboard

Keyboard does not disappear after viewDidDisappear on iOS 7

我的梦境 提交于 2019-12-08 15:40:15
问题 In our app, there's a situation where the user enters something in a textbox and then presses the back button to go back to the master screen. If we run that on iOS 7, the keyboard does not disappear, it just stays there. The user can still navigate through the app, but all text fields are disabled, meaning you can't enter text anywhere. The only option the user has is killing the app and starting fresh. We tried to add resignFirstResponder messages, but that didn't help anything. There's

dismiss keyboard on tapping on any UIControl objects

ⅰ亾dé卋堺 提交于 2019-12-08 11:01:51
问题 I have multiple keyboard provoking elements... UITextField , UITextView and UISearchBar . I would like to dismiss UIKeyboard upon touch anywhere except keyboard and currently active "text editing" element. I've implemented override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) { searchBar.resignFirstResponder() name.resignFirstResponder() //UITextField notes.resignFirstResponder() //UITextView self.view.endEditing(true) } This works if user taps on an "inert" element..