0
특정 유형의 문자열에 대한 링크를 제공하는 UIView를 확장하여 사용자 정의 StyleLabel을 만듭니다. 나는이 기능을 성공적으로 구현했다.iPhone 내 사용자 정의보기에 clearcolor를 설정하는 방법
UILabel.i와 함께 TableViewCell에서이 레이블을 사용하고 있습니다. UILabel & StyleLabel 배경색이 clearColor로 설정되었습니다. UILabel은 잘 작동하지만 StyleLabel은 배경을 blackColor로 표시합니다.
다음 코드에 어떤 문제가 있는지 잘 모르겠습니다.
여기 뷰가 불투명 한 경우
-(void) drawRect:(CGRect)rect
{
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextClearRect(ctx, rect);
[[UIColor clearColor] setFill];
CGContextAddRect(ctx, rect);
CGContextDrawPath(ctx, kCGPathFill);
[_text drawText:ctx];
}
감사 Sasikumar