inputaccessoryview

inputAccessoryView animating down when alertController (actionSheet) presented

对着背影说爱祢 提交于 2019-12-05 07:08:40
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 presented. Is there anyway to present an alertController and not give up firstResponder, or anyway to keep

inputAccessoryView's UIToolbar turns black when rotating in iOS

≡放荡痞女 提交于 2019-12-05 06:23:05
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 wordKeyboardBarButtonItem = UIBarButtonItem(title: "Button 1", style: .Plain, target: self, action: nil) var

Custom Keyboard InputAccessoryView not visible in iOS 11

点点圈 提交于 2019-12-04 22:53:49
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? 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 not maybe provide some more information? Here is how I add the input accessory, incase this is of more help

Swift inputAccessoryView override bug

喜你入骨 提交于 2019-12-04 16:44:30
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 provide some more information on how to ensure my view appears as it should, before, during, and after

Resizing text field in inputAccessoryView

一笑奈何 提交于 2019-12-04 10:55:16
问题 I have been trying to get a UITextView to resize all week. I don't see how this should be done, so I have decided to include practically all relevant code. I have this conversation view: This conversationview is a UIViewController with a UITableView inside (using constraints). I have a custom UIView subclass ConversationToolbar set as inputAccessoryView (the UIViewController containing it can become the first responder, so the view is visible at all times), that contains 2 subviews. One for

How do I create a keyboard accessory view with Auto Layout in Interface Builder?

老子叫甜甜 提交于 2019-12-04 03:49:12
问题 I want to add a "Done" button and a segmented control to a Decimal Pad keyboard. Ideally I would like to lay out a keyboard accessory view with Auto Layout in Interface Builder. Is this even possible? Do I create a new XIB or can I do it in the existing Storyboard scene somehow? How do I attach the accessory view to the appropriate text field? 回答1: Would you mind doing it programmatically? Typically you take a UIToolbar to a UITextField with your items, but you may need to subview the

Change height of inputAccessoryView issue

限于喜欢 提交于 2019-12-03 18:30:19
问题 When I change the height of inputAccessoryView in iOS 8, the inputAccessoryView not go to the right origin, but covers the keyboard. Here are some code snippets: in table view controller - (UIView *)inputAccessoryView { if (!_commentInputView) { _commentInputView = [[CommentInputView alloc] initWithFrame:CGRectMake(0, 0, [self width], 41)]; [_commentInputView setPlaceholder:NSLocalizedString(@"Comment", nil) andButtonTitle:NSLocalizedString(@"Send", nil)]; [_commentInputView

Resize inputAccessoryView dynamically in iOS 8

混江龙づ霸主 提交于 2019-12-03 12:13:42
问题 Basically I am trying to create a resizing UITextView within a inputAccessoryView property. I have a viewController with the method canBecomeFirstResponder returning true and a view I instantiate via a custom class (which gets it from a XIB). Within this view is a UITextView located. I try to resize the complete inputAccessoryView from inside of that class. I tried in in a few ways: setting the frame directy, try to use a height constraint. It appears it resizes only half way: This is

how can i increase the height of an inputAccessoryView

白昼怎懂夜的黑 提交于 2019-12-03 07:24:19
问题 I have spent several days on this with no solution in sight. I have an inputAccessoryView which consists of a UIView containing a textView and two buttons. The behaviour of the inputAccessoryView is as expected and works fine in all cases except one. When the height of the textView increases, I am trying to increase the height of the inputAccessoryView by the same amount. When I redefine the height of the inputAccessoryView in textViewDidChange , the inputAccessoryView increases height

Resizing text field in inputAccessoryView

懵懂的女人 提交于 2019-12-03 07:02:00
I have been trying to get a UITextView to resize all week. I don't see how this should be done, so I have decided to include practically all relevant code. I have this conversation view: This conversationview is a UIViewController with a UITableView inside (using constraints). I have a custom UIView subclass ConversationToolbar set as inputAccessoryView (the UIViewController containing it can become the first responder, so the view is visible at all times), that contains 2 subviews. One for the UITextView and left and right buttons, and one for the emoticons. The emoticons only show when the