首页 > 技术文章 > UITextView 设置边框

benbenzhu 2014-03-14 15:31 原文

    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];

 

推荐阅读