How to style UITextview to like Rounded Rect text field?

后端 未结 20 2331
深忆病人
深忆病人 2020-11-28 00:36

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,

20条回答
  •  死守一世寂寞
    2020-11-28 01:13

    How about just:

    UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(20, 20, 280, 32)];
    textField.borderStyle = UITextBorderStyleRoundedRect;
    [self addSubview:textField];
    

提交回复
热议问题