vendredi 31 juillet 2015

UITextField "content size" property

Is there a way to make the right side of a UITextField's content "end sooner" like in this graphic:

enter image description here

I'm using the following to give the content text some left padding, but can't figure out an easy solution to reduce the available content size on the right size: self.textfield.layer.sublayerTransform = CATransform3DMakeTranslation(10, 0, 0);

I'd rather not subclass UITextField but I'm fine doing so if need be.

Aucun commentaire:

Enregistrer un commentaire