1

I have a TextField in 350 X 93 size and I have set the control of the TextField to vertical up. But I have an issue that the text become in the top too much which it looks weird. How I can set that text programmatically 10 pixel down? "Comment in the picture"

Also another issue how I can set the text to enter a new line after it exceed 100 character? because it won't enter a new line after the TextField box reach the end

enter image description here

enter image description here

Luai Kalkatawi
  • 1,492
  • 5
  • 25
  • 51

1 Answers1

2

To address the second question, for multi-line input use UITextView instead of UITextField. The textContainerInset property might be useful. Note that UITextView has no facility for showing placeholder text.

Douglas Hill
  • 1,537
  • 10
  • 14
  • I have searched a lot and I think there is no way of making that after comparing `UITextView` and `UITextFied` ... Thanks. – Luai Kalkatawi Feb 15 '15 at 22:02
  • Don’t give up! Designers and product managers will not be impressed. Consider using more views, such as separate `UIView`s just to draw the grey boxes, and/or a `UILabel` for the placeholder text that is hidden and shown as necessary. – Douglas Hill Feb 16 '15 at 12:20
  • I didn't give up... After you told me about `UITextView` missing placeholder feature I searched about it and I found my solution how to do it in this link http://stackoverflow.com/a/10201671/1104515 easiest way. Thanks :) – Luai Kalkatawi Feb 17 '15 at 20:43