I can't use the rightView
property with MDCTextField
anymore on iOS 13. Am I the only one having an issue with this?
The right view width cover the whole text field: preventing the user interaction and hiding the textView content.
No problem when I switch from MDCTextField
to UITextField
.
Add width
constraint
to therightView
/leftView
.Don't forget to set
translatesAutoresizingMaskIntoConstraints = false
You may notice some autolayout warnings in the consule because you didn't set the missing constraint for the
rightView
/leftView
. So add missing constraints or simply ignore those.And note that if the
rightView
/leftView
is some kind ofStackView
, try to putting it inside aview
and then add this view instead.Apparently this was a change in the way
rightViewRect(forBounds:)
behaves in iOS 13 Beta 5.From the iOS & iPadOS 13 Developer Beta 5 Release Notes:
The MDCTextField
-(CGRect)rightViewRectForBounds:(CGRect)bounds
function needs to be updated.