我有一個UITextView,我在其圖層上設置邊框寬度,邊框顏色和圓角半徑屬性,外部看起來很棒。但是,邊界的內部沒有像外部那樣的圓角,並且看起來很有趣。有沒有辦法繞過邊界的內角?CALayer內邊框圓角半徑
編輯: 這是我在initWithFrame:
方法使用的代碼:
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor = UIColorFromRGB(0xdedede);
self.layer.cornerRadius = kTextFieldCornerRadius;
self.layer.borderColor = UIColorFromRGB(0xD4974C).CGColor;
self.layer.borderWidth = 3.0f;
self.font = [UIFont fontWithName:@"HelveticaNeue-Bold" size:12.0f];
[self setClipsToBounds:YES];
[self.layer setMasksToBounds:YES];
}
return self;
}
下面是什麼樣子,現在的截圖:預期外邊角圓潤
通知,但邊框的內角是尖的而不是圓角的。這就是我想要解決的問題。謝謝你的幫助!
請顯示您的代碼和快照textview –