inputaccessoryview

label showing top of screen instead of being on the inputAccessoryView

烈酒焚心 提交于 2019-12-31 04:16:38
问题 Here is my code: var messageView : UITextView = { var textView = UITextView() textView.text = " Add your message here" textView.textColor = UIColor.lightGrayColor() textView.translatesAutoresizingMaskIntoConstraints = false textView.backgroundColor = UIColor.lightGrayColor() textView.layer.cornerRadius = 3 textView.clipsToBounds = true textView.keyboardAppearance = .Dark textView.layer.borderWidth = 1.0 textView.layer.borderColor = UIColor.lightGrayColor() textView.autocorrectionType = .no //

Input Accessory View Behave Unexpectedly with keyboard hide and show events

时光总嘲笑我的痴心妄想 提交于 2019-12-24 01:38:10
问题 I am facing an strange behavior with InputAccessoryView, I am working on chat screen where I have used InputAccessoryView where I have registered for KeyboardWillShow and KeyboardWillHide notifications. When my chat screen appears it automatically calls the KeyboardWillShowMethod once and after that it hides automatically without calling the KeyboardWillHide notification. After Loading chats when I click on textbox to type text it calls KeyboardWillShow which is fine. But when I try to hide

Changing the frame of an inputAccessoryView in iOS 8

橙三吉。 提交于 2019-12-17 21:53:22
问题 Long time lurker - first time poster! I am having an issue while recreating a bar with a UITextView like WhatsApp does it. I am using a custom UIView subclass, and lazily instantiating it on: - (UIView *)inputAccessoryView and returning YES on: - (BOOL)canBecomeFirstResponder Now, I want to change the size of the inputAccessoryView when the UITextView grows in size. On iOS 7, I would simply change the size of the frame of said view - and not it's origin -, and then call reloadInputViews and

Custom Keyboard InputAccessoryView not visible in iOS 11

℡╲_俬逩灬. 提交于 2019-12-14 03:43:48
问题 I have implemented Custom input accessory view it was working fine till iOS 10.3.1. But it's not visible in iOS 11 beta. Have anyone experience this issue? 回答1: The question you ask does not have much detail. But I had the same problem when using an inputAccessoryView and a custom inputView for the textfield. And resolved this on iOS11 by setting the custom inputView's autoresizingMask to .flexibleHeight. yourCustomInputView.autoresizingMask = .flexibleHeight Hope this resolves the issue. If

Swift: inputAccessoryView buttons are not showing

大兔子大兔子 提交于 2019-12-11 20:54:44
问题 Following is my code for adding an inputAccessoryView (with a Done button on it) to my textView: let keyboardButtonView = UIToolbar() keyboardButtonView.sizeToFit() let doneButton = UIBarButtonItem(image: nil, style: .Done, target: self, action: "closeMessageViewKeyboard") doneButton.possibleTitles = ["Done"] var toolbarButtons = NSMutableArray() toolbarButtons.addObject(doneButton) keyboardButtonView.items = toolbarButtons as [AnyObject] messageView.inputAccessoryView = keyboardButtonView

Why UIBarButtonItem not getting clicks in UIToolbar set as inputAccessoryView of UITextField?

六月ゝ 毕业季﹏ 提交于 2019-12-10 19:49:05
问题 UIBarItem does not respond to clicks inside UIToolbar which is setup as inputAccessoryView on a UITextField. The button does not show click animation when I try to click it, callback does not get called. My setup looks like: @interface MyViewController() @property (weak, nonatomic) IBOutlet UITextField *closeDateTextField; @property (strong, nonatomic) UIToolbar * datePickerToolbar; @end I setup toolbar with button: - (void)viewDidLoad { self.datePickerToolbar = [[UIToolbar alloc] init];

inputAccessoryView's UIToolbar turns black when rotating in iOS

混江龙づ霸主 提交于 2019-12-07 03:07:44
问题 Here is my code: override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. let keyBoardToolBar = UIToolbar(frame: CGRectMake(0, 0, self.view.frame.size.width, 44)) keyBoardToolBar.barStyle = .Default let flexSpaceKeyboardBarButtonItem = UIBarButtonItem(barButtonSystemItem: .FlexibleSpace, target: nil, action: nil) let doneKeyboardBarButtonItem = UIBarButtonItem(title: "Done", style: .Done, target: self, action: nil) let

inputAccessoryView animating down when alertController (actionSheet) presented

心已入冬 提交于 2019-12-07 02:29:03
问题 I have an inputAccessoryView for a chat app that always remains visible and docked at the bottom of the screen for text input similar to most messaging apps. When I present an alertController with actionSheet style, the inputAccessoryView animates down off screen as the alert is presented and then back up again when the alert is dismissed. This in turn scrolls my tableView and is undesirable. This is happening because the chat viewController is giving up firstResponder when the alert is

Animate the height of inputAccessoryView Swift

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 17:26:19
Hello I' trying to change the height of a button set as inputAccessoryView once I click on it. Unfortunately it seems only to change the position but not the height. Can Anyone help me out? Below my code. Thank you! import UIKit class ViewController: UIViewController, UITextFieldDelegate { @IBOutlet var textField: UITextField! var SendButton: UIButton = UIButton.buttonWithType(UIButtonType.Custom) as UIButton override func viewDidLoad() { super.viewDidLoad() SendButton.frame = CGRectMake(0, 0, UIScreen.mainScreen().applicationFrame.width, 30) SendButton.backgroundColor = UIColor(red: 184/255.0

Swift inputAccessoryView override bug

做~自己de王妃 提交于 2019-12-06 10:21:45
问题 I'm experiencing a weird bug with the appearance of my inputAccessoryView . While in the middle of a transition, it appears like so: After the transition, it appears as it should: I override the property like so: override var inputAccessoryView: UIView! { get { if composeView == nil { composeView = CommentComposeView(frame: CGRectMake(0, 0, 0, MinimumToolbarHeight - 0.5)) self.setupSignals() } return composeView } } I'm wondering if anyone can point out any obvious flaw in what I'm doing or