I use UITextField and I want padding top. So... How to in UITextField text padding top?
Sorry for my English:/
I use UITextField and I want padding top. So... How to in UITextField text padding top?
Sorry for my English:/
If I am not wrong then you want translate your text inside the textfield by y. UITextField
have property know as sublayerTransform
which can be used to translate the text. For example, to give a text view translate x by 10 and y by 10 you would use this code:
let titleTextField = UITextField(frame: CGRectZero)
titleTextField.layer.sublayerTransform =
let shiftTextByX = 10
let shiftTextByY = 10
titleTextField.layer.sublayerTransform CATransform3DMakeTranslation(shiftTextByX, shiftTextByY, 0)