///Mearge two image in one image
-(UIImage *)imageWithImage:(UIImage *)image
borderImage:(UIImage *)borderImage
covertToSize:(CGSize)size
{
UIGraphicsBeginImageContext(size);
[image drawInRect:CGRectMake( 10, 0, 60, 53 )];
[borderImage drawInRect:CGRectMake( 0, 0, 70, 70)];
UIImage *destImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return destImage;
}
///How To Use
ImageView.image=[self imageWithImage:Image1 borderImage:Image2 covertToSize:CGSizeMake(70, 70)];
No comments:
Post a Comment