UITextView 设置边框

    UITextView * txtView = [[UITextView alloc] initWithFrame:CGRectMake(10, 50, 200, 50)];

    txtView.backgroundColor = [UIColorclearColor];

    txtView.layer.masksToBounds = YES;

    txtView.layer.borderWidth = 1.0f;

    txtView.layer.borderColor = [UIColorredColor].CGColor;

    [self.view addSubview:txtView];

 

你可能感兴趣的:(UITextView)