- (void)setupTextviewBorder {
self.descTextView.layer.borderWidth = 50.0;
float f = 197.0/255.0;
self.descTextView.layer.borderColor = (__bridge CGColorRef)([UIColor colorWithRed:f green:f blue:f alpha:1]);
self.descTextView.layer.cornerRadius = 20.0;
self.descTextView.layer.masksToBounds = true;
self.descTextView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
是的我正在调用此方法,我可以记录该层。当我查看它时,我看不到边框。
答案 0 :(得分:3)
改变这个:
self.descTextView.layer.borderColor = (__bridge CGColorRef)([UIColor colorWithRed:f green:f blue:f alpha:1]);
对此:
self.descTextView.layer.borderColor = [UIColor colorWithRed:f green:f blue:f alpha:1].CGColor;