CustomToolBar

- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx

{

    if([selfisMemberOfClass: [UIToolbarclass]])

    {

        UIImage *image = [UIImage imageNamed:@"微博切tu_65.png"];

        //CGContextClip(ctx);

        CGContextTranslateCTM(ctx, 0, image.size.height);

        CGContextScaleCTM(ctx, 1.0, -1.0);

        CGContextDrawImage(ctx, CGRectMake(0, 0, self.frame.size.width, self.frame.size.height), image.CGImage);

    }

    else

    {

        [super drawLayer:layer inContext:ctx];

    }

}

posted on 2012-11-15 17:56  无量少年  阅读(171)  评论(0)    收藏  举报

努力加载评论中...

导航

< 2012年11月 >
28 29 30 31 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示