iOS 绘制图片
#pragma mark 绘制图像
- (void)drawImage:(CGContextRef)context
{
//绘制之后无法监听事件 无法改变位置
UIImage *image = [UIImage imageNamed:@"IMGP0002.JPG"];
//[image drawAtPoint:CGPointMake(0, 0)];
//拉伸绘制
[image drawInRect:CGRectMake(0, 0, 375, 667)];
//平铺绘制
[image drawAsPatternInRect:CGRectMake(0, 0, 375, 667)];
}
网友评论