给UITextView加边框

来源:互联网 发布:网络用语肥皂什么意思 编辑:程序博客网 时间:2024/06/02 12:34

    _answerTextView = [[UITextViewalloc] initWithFrame:CGRectMake(10.0,10.0, 300.0, 390.0)];


    [_answerTextViewsetEditable:NO];

    

   _answerTextView.layer.backgroundColor = [[UIColorclearColor]CGColor];


   _answerTextView.layer.borderColor = [[UIColorcolorWithRed:230.0/255.0green:250.0/255.0blue:250.0/255.0alpha:1.0]CGColor];


   _answerTextView.layer.borderWidth =3.0;


   _answerTextView.layer.cornerRadius =8.0f;


    [_answerTextView.layersetMasksToBounds:YES];

原创粉丝点击