Search Results

Search found 1 results on 1 pages for 'user355066'.

Page 1/1 | 1 

  • iPhone How to set a clearcolor for my custom view

    - by user355066
    Hi, I am creating a custom StyleLabel by extending the UIView, which provides a link for particular type of strings. I have successfully implemented this functionality. I am using this label in TableViewCell along with UILabel.i set UILabel & StyleLabel background color is set to clearColor. UILabel works fine, but StyleLabel shows background in blackColor. I am not sure what is the problem with the following code. Here is the drawRect method of CustomLabel class -(void) drawRect:(CGRect)rect { CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextClearRect(ctx, rect); [[UIColor clearColor] setFill]; CGContextAddRect(ctx, rect); CGContextDrawPath(ctx, kCGPathFill); [_text drawText:ctx]; } Thanks Sasikumar

    Read the article

1