我有兩個UIImageView一個在另一個上,我想將它們保存在一個單一的文件中相機卷。如何將2個UIImageView保存到一個圖像中
UIImageWriteToSavedPhotosAlbum(self.myimage.image,nil,nil,nil);
});
圖像重疊在一起並且尺寸相同。最上面的一個具有幾個字母才能看到另一個
我有兩個UIImageView一個在另一個上,我想將它們保存在一個單一的文件中相機卷。如何將2個UIImageView保存到一個圖像中
UIImageWriteToSavedPhotosAlbum(self.myimage.image,nil,nil,nil);
});
圖像重疊在一起並且尺寸相同。最上面的一個具有幾個字母才能看到另一個
,你可以這樣做......,
添加您都imageview的一個的UIView,然後拿這個的UIView的截屏並保存生成圖像在你想要的目的地。
這裏是代碼通過編碼
// code to take Screen shot
-(void) takeScreenshot
{
// Replace self.view with your view name which containing your ImageViews
UIGraphicsBeginImageContext(self.view.bounds.size);
CGContextRef context = UIGraphicsGetCurrentContext();
[self.view.layer renderInContext:context];
// get a UIImage from the image context
UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext();
// clean up drawing environment
UIGraphicsEndImageContext();
// Then save your Image in your desired destination
}
希望它會幫助你,快樂編碼
http://stackoverflow.com/questions/11131050/ios-save-image-to採取截屏-camera-roll – iPatel
http://stackoverflow.com/questions/2560082/how-to-merge-multiple-uiimageviews-into-one-uiimage – iPatel
圖像視圖如何相互關聯?他們是一樣的大小?有很多方法可以將圖像組合起來... – Wain