相对缩放UIImageView
|
我有两个UIImageViews,我设法合并并保存了它们。但是我希望覆盖的图像相对于所选图像的比例进行缩放和定位。因此,您在屏幕上看到的UIImageView与其保存的UIImageView相同。
- (UIImage *)combineImages{
UIGraphicsBeginImageContext(CGSizeMake(theimageView.image.size.width,theimageView.image.size.height));
// Draw image1
[theimageView.image drawInRect:CGRectMake(0,0, theimageView.image.size.width,theimageView.image.size.height)];
// Draw image2
[Birdie.image drawInRect:CGRectMake(Birdie.center.x, Birdie.center.y, (theimageView.image.size.width / 2), (theimageView.image.size.height / 2))];
UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return resultingImage;
}
theImageView和Birdie是两个UIImageViews。
先谢谢了!
没有找到相关结果
已邀请:
1 个回复
舜辉
谢谢,