2

我有一个程序:

            [textView setFont:[UIFont fontWithName:@"ArialMT" size:20]];
            [textView setEditable:NO];
            [textView setScrollEnabled:NO];
            [textView.layer setMasksToBounds:NO];
            [textView.layer setBorderColor: [[UIColor lightGrayColor] CGColor]];
            [textView.layer setBorderWidth:1.0f];
            textView.layer.shadowColor = [[UIColor lightGrayColor]CGColor];
            textView.layer.shadowOpacity = 1.0f;
            textView.layer.shadowRadius = 5.0f;
            [textView.layer setShadowOffset:CGSizeMake(2, 2)];

这段代码为 UITextView 设置了阴影和边框,但是如何设置 textview 的边框不包括顶线,只为左、右和底线设置边框?

4

1 回答 1

3

这会做你想做的事,而且使用和集成非常简单:https ://github.com/99centsappdevelopment/JSTextView

于 2013-12-12T07:17:20.330 回答