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];
}
}