Warnings displayed when using `inputAccessoryView`
up vote
1
down vote
favorite
I have added a custom inputAccessoryView
with a subclassed UITextView
inside it.
When I click on on the inputAccessoryView
, the keyboard pushes it up and the following 2 warnings appear:
API error: <_UIKBCompatInputView: 0x7f92815391b0; frame = (0 0; 0 0); layer = > returned 0 width, assuming UIViewNoIntrinsicMetric
API error: <_UIKBCompatInputView: 0x7f92815391b0; frame = (0 0; 0 0); layer = > returned 0 width, assuming UIViewNoIntrinsicMetric
When I move the empty collectionView
on the view controller, the keyboard descends as the inputAccessoryView
moves back to the bottom of the screen and then 2 more warnings are displayed:
[View] First responder warning: 'TextInputView: 0x7f9282847000; baseClass = UITextView; frame = (10 10; 354 27); text = ''; clipsToBounds = YES; gestureRecognizers = ; layer = ; contentOffset: {0, 3}; contentSize: {158.5, 30.5}; adjustedContentInset: {0, 0, 14, 0}>' rejected resignFirstResponder when being removed from hierarchy
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on > without matching -beginDisablingInterfaceAutorotation. Ignoring.
What is causing these warnings and how do I prevent them? I looked up similar questions here and none of them contain a clear answer.
As requested, the inputAccessoryView
:
class BigInputBar: UIView, UITextViewDelegate {
// MARK: - Subviews
let separatorLine = SeparatorLine()
// View that contains everything
var backgroundView: UIView = {
let view = UIView()
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()
lazy var inputTextView: TextInputView = {
let textView = TextInputView()
textView.translatesAutoresizingMaskIntoConstraints = false
textView.backgroundColor = .clear
return textView
}()
var sendButton: UIButton = {
let button = UIButton(frame: .zero)
let image = UIImage.getImage(named: "chevron-right")
button.setImage(image, for: )
button.addTarget(self, action: #selector(sendButtonTapped), for: .touchUpInside)
button.translatesAutoresizingMaskIntoConstraints = false
button.setBackgroundImage(image, for: .highlighted) //Fun develop only graphic
button.backgroundColor = .clear
button.isEnabled = false
return button
}()
@objc private func sendButtonTapped(){
print("Button Tapped")
}
// MARK: Properties
override var intrinsicContentSize: CGSize {
return CGSize(width: bounds.width, height: 60)
}
// MARK: - Init Methods
convenience init() {
self.init(frame: .zero)
}
override init(frame: CGRect) {
super.init(frame: frame)
setup()
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setup()
}
func setup() {
autoresizingMask = [.flexibleHeight]
addSubview(backgroundView)
addSubview(separatorLine)
backgroundView.addSubview(sendButton)
backgroundView.addSubview(inputTextView)
setupConstraints()
inputTextView.delegate = self
}
private func setupConstraints() {
separatorLine.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
separatorLine.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
separatorLine.topAnchor.constraint(equalTo: self.topAnchor, constant: 0).isActive = true
backgroundView.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
backgroundView.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
backgroundView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: 0).isActive = true
backgroundView.topAnchor.constraint(equalTo: separatorLine.bottomAnchor, constant: 0).isActive = true
sendButton.rightAnchor.constraint(equalTo: backgroundView.rightAnchor, constant: -10).isActive = true
sendButton.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10).isActive = true
sendButton.widthAnchor.constraint(equalToConstant: 30).isActive = true
sendButton.heightAnchor.constraint(equalToConstant: 30).isActive = true
let leftTextView = inputTextView.leftAnchor.constraint(equalTo: backgroundView.leftAnchor, constant: 10)
let rightTextView = inputTextView.rightAnchor.constraint(equalTo: sendButton.leftAnchor, constant: -10)
let bottomTextView = inputTextView.bottomAnchor.constraint(equalTo: backgroundView.bottomAnchor, constant: -20)
let topTextView = inputTextView.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10)
NSLayoutConstraint.activate([leftTextView, rightTextView, bottomTextView, topTextView])
}
}
ios swift xcode
add a comment |
up vote
1
down vote
favorite
I have added a custom inputAccessoryView
with a subclassed UITextView
inside it.
When I click on on the inputAccessoryView
, the keyboard pushes it up and the following 2 warnings appear:
API error: <_UIKBCompatInputView: 0x7f92815391b0; frame = (0 0; 0 0); layer = > returned 0 width, assuming UIViewNoIntrinsicMetric
API error: <_UIKBCompatInputView: 0x7f92815391b0; frame = (0 0; 0 0); layer = > returned 0 width, assuming UIViewNoIntrinsicMetric
When I move the empty collectionView
on the view controller, the keyboard descends as the inputAccessoryView
moves back to the bottom of the screen and then 2 more warnings are displayed:
[View] First responder warning: 'TextInputView: 0x7f9282847000; baseClass = UITextView; frame = (10 10; 354 27); text = ''; clipsToBounds = YES; gestureRecognizers = ; layer = ; contentOffset: {0, 3}; contentSize: {158.5, 30.5}; adjustedContentInset: {0, 0, 14, 0}>' rejected resignFirstResponder when being removed from hierarchy
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on > without matching -beginDisablingInterfaceAutorotation. Ignoring.
What is causing these warnings and how do I prevent them? I looked up similar questions here and none of them contain a clear answer.
As requested, the inputAccessoryView
:
class BigInputBar: UIView, UITextViewDelegate {
// MARK: - Subviews
let separatorLine = SeparatorLine()
// View that contains everything
var backgroundView: UIView = {
let view = UIView()
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()
lazy var inputTextView: TextInputView = {
let textView = TextInputView()
textView.translatesAutoresizingMaskIntoConstraints = false
textView.backgroundColor = .clear
return textView
}()
var sendButton: UIButton = {
let button = UIButton(frame: .zero)
let image = UIImage.getImage(named: "chevron-right")
button.setImage(image, for: )
button.addTarget(self, action: #selector(sendButtonTapped), for: .touchUpInside)
button.translatesAutoresizingMaskIntoConstraints = false
button.setBackgroundImage(image, for: .highlighted) //Fun develop only graphic
button.backgroundColor = .clear
button.isEnabled = false
return button
}()
@objc private func sendButtonTapped(){
print("Button Tapped")
}
// MARK: Properties
override var intrinsicContentSize: CGSize {
return CGSize(width: bounds.width, height: 60)
}
// MARK: - Init Methods
convenience init() {
self.init(frame: .zero)
}
override init(frame: CGRect) {
super.init(frame: frame)
setup()
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setup()
}
func setup() {
autoresizingMask = [.flexibleHeight]
addSubview(backgroundView)
addSubview(separatorLine)
backgroundView.addSubview(sendButton)
backgroundView.addSubview(inputTextView)
setupConstraints()
inputTextView.delegate = self
}
private func setupConstraints() {
separatorLine.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
separatorLine.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
separatorLine.topAnchor.constraint(equalTo: self.topAnchor, constant: 0).isActive = true
backgroundView.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
backgroundView.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
backgroundView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: 0).isActive = true
backgroundView.topAnchor.constraint(equalTo: separatorLine.bottomAnchor, constant: 0).isActive = true
sendButton.rightAnchor.constraint(equalTo: backgroundView.rightAnchor, constant: -10).isActive = true
sendButton.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10).isActive = true
sendButton.widthAnchor.constraint(equalToConstant: 30).isActive = true
sendButton.heightAnchor.constraint(equalToConstant: 30).isActive = true
let leftTextView = inputTextView.leftAnchor.constraint(equalTo: backgroundView.leftAnchor, constant: 10)
let rightTextView = inputTextView.rightAnchor.constraint(equalTo: sendButton.leftAnchor, constant: -10)
let bottomTextView = inputTextView.bottomAnchor.constraint(equalTo: backgroundView.bottomAnchor, constant: -20)
let topTextView = inputTextView.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10)
NSLayoutConstraint.activate([leftTextView, rightTextView, bottomTextView, topTextView])
}
}
ios swift xcode
Can you post your inputAccessoryView code.
– Raul Mantilla
Nov 8 at 20:21
@RaulMantilla I've posted as suggested.
– Edan
Nov 9 at 16:24
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have added a custom inputAccessoryView
with a subclassed UITextView
inside it.
When I click on on the inputAccessoryView
, the keyboard pushes it up and the following 2 warnings appear:
API error: <_UIKBCompatInputView: 0x7f92815391b0; frame = (0 0; 0 0); layer = > returned 0 width, assuming UIViewNoIntrinsicMetric
API error: <_UIKBCompatInputView: 0x7f92815391b0; frame = (0 0; 0 0); layer = > returned 0 width, assuming UIViewNoIntrinsicMetric
When I move the empty collectionView
on the view controller, the keyboard descends as the inputAccessoryView
moves back to the bottom of the screen and then 2 more warnings are displayed:
[View] First responder warning: 'TextInputView: 0x7f9282847000; baseClass = UITextView; frame = (10 10; 354 27); text = ''; clipsToBounds = YES; gestureRecognizers = ; layer = ; contentOffset: {0, 3}; contentSize: {158.5, 30.5}; adjustedContentInset: {0, 0, 14, 0}>' rejected resignFirstResponder when being removed from hierarchy
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on > without matching -beginDisablingInterfaceAutorotation. Ignoring.
What is causing these warnings and how do I prevent them? I looked up similar questions here and none of them contain a clear answer.
As requested, the inputAccessoryView
:
class BigInputBar: UIView, UITextViewDelegate {
// MARK: - Subviews
let separatorLine = SeparatorLine()
// View that contains everything
var backgroundView: UIView = {
let view = UIView()
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()
lazy var inputTextView: TextInputView = {
let textView = TextInputView()
textView.translatesAutoresizingMaskIntoConstraints = false
textView.backgroundColor = .clear
return textView
}()
var sendButton: UIButton = {
let button = UIButton(frame: .zero)
let image = UIImage.getImage(named: "chevron-right")
button.setImage(image, for: )
button.addTarget(self, action: #selector(sendButtonTapped), for: .touchUpInside)
button.translatesAutoresizingMaskIntoConstraints = false
button.setBackgroundImage(image, for: .highlighted) //Fun develop only graphic
button.backgroundColor = .clear
button.isEnabled = false
return button
}()
@objc private func sendButtonTapped(){
print("Button Tapped")
}
// MARK: Properties
override var intrinsicContentSize: CGSize {
return CGSize(width: bounds.width, height: 60)
}
// MARK: - Init Methods
convenience init() {
self.init(frame: .zero)
}
override init(frame: CGRect) {
super.init(frame: frame)
setup()
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setup()
}
func setup() {
autoresizingMask = [.flexibleHeight]
addSubview(backgroundView)
addSubview(separatorLine)
backgroundView.addSubview(sendButton)
backgroundView.addSubview(inputTextView)
setupConstraints()
inputTextView.delegate = self
}
private func setupConstraints() {
separatorLine.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
separatorLine.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
separatorLine.topAnchor.constraint(equalTo: self.topAnchor, constant: 0).isActive = true
backgroundView.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
backgroundView.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
backgroundView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: 0).isActive = true
backgroundView.topAnchor.constraint(equalTo: separatorLine.bottomAnchor, constant: 0).isActive = true
sendButton.rightAnchor.constraint(equalTo: backgroundView.rightAnchor, constant: -10).isActive = true
sendButton.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10).isActive = true
sendButton.widthAnchor.constraint(equalToConstant: 30).isActive = true
sendButton.heightAnchor.constraint(equalToConstant: 30).isActive = true
let leftTextView = inputTextView.leftAnchor.constraint(equalTo: backgroundView.leftAnchor, constant: 10)
let rightTextView = inputTextView.rightAnchor.constraint(equalTo: sendButton.leftAnchor, constant: -10)
let bottomTextView = inputTextView.bottomAnchor.constraint(equalTo: backgroundView.bottomAnchor, constant: -20)
let topTextView = inputTextView.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10)
NSLayoutConstraint.activate([leftTextView, rightTextView, bottomTextView, topTextView])
}
}
ios swift xcode
I have added a custom inputAccessoryView
with a subclassed UITextView
inside it.
When I click on on the inputAccessoryView
, the keyboard pushes it up and the following 2 warnings appear:
API error: <_UIKBCompatInputView: 0x7f92815391b0; frame = (0 0; 0 0); layer = > returned 0 width, assuming UIViewNoIntrinsicMetric
API error: <_UIKBCompatInputView: 0x7f92815391b0; frame = (0 0; 0 0); layer = > returned 0 width, assuming UIViewNoIntrinsicMetric
When I move the empty collectionView
on the view controller, the keyboard descends as the inputAccessoryView
moves back to the bottom of the screen and then 2 more warnings are displayed:
[View] First responder warning: 'TextInputView: 0x7f9282847000; baseClass = UITextView; frame = (10 10; 354 27); text = ''; clipsToBounds = YES; gestureRecognizers = ; layer = ; contentOffset: {0, 3}; contentSize: {158.5, 30.5}; adjustedContentInset: {0, 0, 14, 0}>' rejected resignFirstResponder when being removed from hierarchy
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on > without matching -beginDisablingInterfaceAutorotation. Ignoring.
What is causing these warnings and how do I prevent them? I looked up similar questions here and none of them contain a clear answer.
As requested, the inputAccessoryView
:
class BigInputBar: UIView, UITextViewDelegate {
// MARK: - Subviews
let separatorLine = SeparatorLine()
// View that contains everything
var backgroundView: UIView = {
let view = UIView()
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()
lazy var inputTextView: TextInputView = {
let textView = TextInputView()
textView.translatesAutoresizingMaskIntoConstraints = false
textView.backgroundColor = .clear
return textView
}()
var sendButton: UIButton = {
let button = UIButton(frame: .zero)
let image = UIImage.getImage(named: "chevron-right")
button.setImage(image, for: )
button.addTarget(self, action: #selector(sendButtonTapped), for: .touchUpInside)
button.translatesAutoresizingMaskIntoConstraints = false
button.setBackgroundImage(image, for: .highlighted) //Fun develop only graphic
button.backgroundColor = .clear
button.isEnabled = false
return button
}()
@objc private func sendButtonTapped(){
print("Button Tapped")
}
// MARK: Properties
override var intrinsicContentSize: CGSize {
return CGSize(width: bounds.width, height: 60)
}
// MARK: - Init Methods
convenience init() {
self.init(frame: .zero)
}
override init(frame: CGRect) {
super.init(frame: frame)
setup()
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setup()
}
func setup() {
autoresizingMask = [.flexibleHeight]
addSubview(backgroundView)
addSubview(separatorLine)
backgroundView.addSubview(sendButton)
backgroundView.addSubview(inputTextView)
setupConstraints()
inputTextView.delegate = self
}
private func setupConstraints() {
separatorLine.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
separatorLine.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
separatorLine.topAnchor.constraint(equalTo: self.topAnchor, constant: 0).isActive = true
backgroundView.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
backgroundView.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
backgroundView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: 0).isActive = true
backgroundView.topAnchor.constraint(equalTo: separatorLine.bottomAnchor, constant: 0).isActive = true
sendButton.rightAnchor.constraint(equalTo: backgroundView.rightAnchor, constant: -10).isActive = true
sendButton.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10).isActive = true
sendButton.widthAnchor.constraint(equalToConstant: 30).isActive = true
sendButton.heightAnchor.constraint(equalToConstant: 30).isActive = true
let leftTextView = inputTextView.leftAnchor.constraint(equalTo: backgroundView.leftAnchor, constant: 10)
let rightTextView = inputTextView.rightAnchor.constraint(equalTo: sendButton.leftAnchor, constant: -10)
let bottomTextView = inputTextView.bottomAnchor.constraint(equalTo: backgroundView.bottomAnchor, constant: -20)
let topTextView = inputTextView.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10)
NSLayoutConstraint.activate([leftTextView, rightTextView, bottomTextView, topTextView])
}
}
class BigInputBar: UIView, UITextViewDelegate {
// MARK: - Subviews
let separatorLine = SeparatorLine()
// View that contains everything
var backgroundView: UIView = {
let view = UIView()
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()
lazy var inputTextView: TextInputView = {
let textView = TextInputView()
textView.translatesAutoresizingMaskIntoConstraints = false
textView.backgroundColor = .clear
return textView
}()
var sendButton: UIButton = {
let button = UIButton(frame: .zero)
let image = UIImage.getImage(named: "chevron-right")
button.setImage(image, for: )
button.addTarget(self, action: #selector(sendButtonTapped), for: .touchUpInside)
button.translatesAutoresizingMaskIntoConstraints = false
button.setBackgroundImage(image, for: .highlighted) //Fun develop only graphic
button.backgroundColor = .clear
button.isEnabled = false
return button
}()
@objc private func sendButtonTapped(){
print("Button Tapped")
}
// MARK: Properties
override var intrinsicContentSize: CGSize {
return CGSize(width: bounds.width, height: 60)
}
// MARK: - Init Methods
convenience init() {
self.init(frame: .zero)
}
override init(frame: CGRect) {
super.init(frame: frame)
setup()
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setup()
}
func setup() {
autoresizingMask = [.flexibleHeight]
addSubview(backgroundView)
addSubview(separatorLine)
backgroundView.addSubview(sendButton)
backgroundView.addSubview(inputTextView)
setupConstraints()
inputTextView.delegate = self
}
private func setupConstraints() {
separatorLine.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
separatorLine.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
separatorLine.topAnchor.constraint(equalTo: self.topAnchor, constant: 0).isActive = true
backgroundView.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
backgroundView.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
backgroundView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: 0).isActive = true
backgroundView.topAnchor.constraint(equalTo: separatorLine.bottomAnchor, constant: 0).isActive = true
sendButton.rightAnchor.constraint(equalTo: backgroundView.rightAnchor, constant: -10).isActive = true
sendButton.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10).isActive = true
sendButton.widthAnchor.constraint(equalToConstant: 30).isActive = true
sendButton.heightAnchor.constraint(equalToConstant: 30).isActive = true
let leftTextView = inputTextView.leftAnchor.constraint(equalTo: backgroundView.leftAnchor, constant: 10)
let rightTextView = inputTextView.rightAnchor.constraint(equalTo: sendButton.leftAnchor, constant: -10)
let bottomTextView = inputTextView.bottomAnchor.constraint(equalTo: backgroundView.bottomAnchor, constant: -20)
let topTextView = inputTextView.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10)
NSLayoutConstraint.activate([leftTextView, rightTextView, bottomTextView, topTextView])
}
}
class BigInputBar: UIView, UITextViewDelegate {
// MARK: - Subviews
let separatorLine = SeparatorLine()
// View that contains everything
var backgroundView: UIView = {
let view = UIView()
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()
lazy var inputTextView: TextInputView = {
let textView = TextInputView()
textView.translatesAutoresizingMaskIntoConstraints = false
textView.backgroundColor = .clear
return textView
}()
var sendButton: UIButton = {
let button = UIButton(frame: .zero)
let image = UIImage.getImage(named: "chevron-right")
button.setImage(image, for: )
button.addTarget(self, action: #selector(sendButtonTapped), for: .touchUpInside)
button.translatesAutoresizingMaskIntoConstraints = false
button.setBackgroundImage(image, for: .highlighted) //Fun develop only graphic
button.backgroundColor = .clear
button.isEnabled = false
return button
}()
@objc private func sendButtonTapped(){
print("Button Tapped")
}
// MARK: Properties
override var intrinsicContentSize: CGSize {
return CGSize(width: bounds.width, height: 60)
}
// MARK: - Init Methods
convenience init() {
self.init(frame: .zero)
}
override init(frame: CGRect) {
super.init(frame: frame)
setup()
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setup()
}
func setup() {
autoresizingMask = [.flexibleHeight]
addSubview(backgroundView)
addSubview(separatorLine)
backgroundView.addSubview(sendButton)
backgroundView.addSubview(inputTextView)
setupConstraints()
inputTextView.delegate = self
}
private func setupConstraints() {
separatorLine.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
separatorLine.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
separatorLine.topAnchor.constraint(equalTo: self.topAnchor, constant: 0).isActive = true
backgroundView.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0).isActive = true
backgroundView.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0).isActive = true
backgroundView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: 0).isActive = true
backgroundView.topAnchor.constraint(equalTo: separatorLine.bottomAnchor, constant: 0).isActive = true
sendButton.rightAnchor.constraint(equalTo: backgroundView.rightAnchor, constant: -10).isActive = true
sendButton.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10).isActive = true
sendButton.widthAnchor.constraint(equalToConstant: 30).isActive = true
sendButton.heightAnchor.constraint(equalToConstant: 30).isActive = true
let leftTextView = inputTextView.leftAnchor.constraint(equalTo: backgroundView.leftAnchor, constant: 10)
let rightTextView = inputTextView.rightAnchor.constraint(equalTo: sendButton.leftAnchor, constant: -10)
let bottomTextView = inputTextView.bottomAnchor.constraint(equalTo: backgroundView.bottomAnchor, constant: -20)
let topTextView = inputTextView.topAnchor.constraint(equalTo: backgroundView.topAnchor,constant: 10)
NSLayoutConstraint.activate([leftTextView, rightTextView, bottomTextView, topTextView])
}
}
ios swift xcode
ios swift xcode
edited Nov 9 at 16:22
asked Nov 8 at 19:34
Edan
409
409
Can you post your inputAccessoryView code.
– Raul Mantilla
Nov 8 at 20:21
@RaulMantilla I've posted as suggested.
– Edan
Nov 9 at 16:24
add a comment |
Can you post your inputAccessoryView code.
– Raul Mantilla
Nov 8 at 20:21
@RaulMantilla I've posted as suggested.
– Edan
Nov 9 at 16:24
Can you post your inputAccessoryView code.
– Raul Mantilla
Nov 8 at 20:21
Can you post your inputAccessoryView code.
– Raul Mantilla
Nov 8 at 20:21
@RaulMantilla I've posted as suggested.
– Edan
Nov 9 at 16:24
@RaulMantilla I've posted as suggested.
– Edan
Nov 9 at 16:24
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53214925%2fwarnings-displayed-when-using-inputaccessoryview%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you post your inputAccessoryView code.
– Raul Mantilla
Nov 8 at 20:21
@RaulMantilla I've posted as suggested.
– Edan
Nov 9 at 16:24