iOS 绘制image

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

你可能感兴趣的:(iOS 绘制image)