iOS 13: UITextField with LeftView spacing issue - Xcode 11

老子叫甜甜 提交于 2020-01-24 19:42:25

问题


iOS 12.0 with Xcode 10.0

iOS 13.0 with Xcode 11.0

I have taken custom LeftView with image and label for adding LeftView in UITextField. I have set all the needed constraints also but still I am facing issues of LeftView width spacing. In old Xcode and iOS it was working well but after new Xcode and iOS there is something wrong.


回答1:


I had similar problem fixed by adding constraints. Make sure had set UIImageView and UILabel width constraints and margins with other views, like:

H:|-0-[image(==40)]-0-[label(==70)]-0-|

hoping this help.



来源:https://stackoverflow.com/questions/58167613/ios-13-uitextfield-with-leftview-spacing-issue-xcode-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!