改变UITextView的边框颜色

UITextView *textView = [[UITextView alloc]initWithFrame:CGRectMake(10, 100, 200, 40)];

// 重点是改变textView的边框颜色,切记后边的CGColor

    textView.layer.borderColor = [[UIColor colorWithRed:215.0 / 255.0 green:215.0 / 255.0 blue:215.0 / 255.0 alpha:1] CGColor];

    textView.font = [UIFont systemFontOfSize:18];

    textView.layer.borderWidth = 0.6f;

    textView.layer.cornerRadius = 6.0f;

    [self.view addSubview:textView];



你可能感兴趣的:(页面布局)