I am using a text view as a comment composer.
In the properties inspector I can\'t find anything like a border style property so that I can make use a rounded rect,
This is an old question, and I was also searched for this questions answer. luvieeres' answer is 100% correct and later Rob added some code. That is excellent, but I found a third party in another questions answer which seems very helpful to me. I was not only searched for similar look of UITextField
over UITextView
, I was also searched for multiline support. ChatInputSample satisfied both. Thats why I think this third party might be helpful to others. Also thanks to Timur, he mentioned this open source in here.
In iOS7 the following matches UITextField border perfectly (to my eye at least):
textField.layer.borderColor = [[[UIColor grayColor] colorWithAlphaComponent:0.5] CGColor];
textField.layer.borderWidth = 0.5;
textField.layer.cornerRadius = 5;
textField.clipsToBounds = YES;
There is no need to import anything special.
Thanks to @uvieere and @hanumanDev whose answers go me almost there :)