UITextField leftview & rightview

Just now want to add a voice button in the textfield like google's browser. Firstly I think it should that the textfield add the button in its view, but I found that if user input more enough text in it, the button will cover the last several letters, looks ugly,so how should we do it?

Answer is textfield's right view, of course, if you want to add button in the textfield's left, you should use its left view.

Do like this,the textfield will not make the text be covered in the button.

Thanks,

Blues

你可能感兴趣的:(UITextField leftview & rightview)