Я просто использую пользовательский класс для своих полей UITextFields, когда я хочу заполнить.
class PaddedTextField: UITextField {
override func textRect(forBounds bounds: CGRect) -> CGRect {
return bounds.inset(by: UIEdgeInsets.init(top: 0, left: 15, bottom: 0, right: 0))
}
override func placeholderRect(forBounds bounds: CGRect) -> CGRect {
return bounds.inset(by: UIEdgeInsets.init(top: 0, left: 15, bottom: 0, right: 0))
}
override func editingRect(forBounds bounds: CGRect) -> CGRect {
return bounds.inset(by: UIEdgeInsets.init(top: 0, left: 15, bottom: 0, right: 0))
}
}