图片合并

 UIImage * image2=[UIImage imageNamed:@"1"];
    UIImage * image1=[UIImage imageNamed:@"1"];
    
    UIGraphicsBeginImageContextWithOptions(CGSizeMake(200, 100), NO, 0);
    [image1 drawInRect:CGRectMake(0, 0, 200, 100)];
    [image2 drawInRect:CGRectMake(50, 25, 100, 50)];
    self.imageView.layer.borderColor=[UIColor orangeColor].CGColor;
    self.imageView.layer.borderWidth=1;
    self.imageView.image=UIGraphicsGetImageFromCurrentImageContext()
    ;
    //关闭上下问
    UIGraphicsEndImageContext();

posted @ 2016-01-15 10:27  谢小锋  阅读(129)  评论(0)    收藏  举报