NSString *path =[[NSBundle mainBundle] pathForResource:@"icon" ofType:@"png"];
MyImage = [UIImage imageWithContentsOfFile:path];
UIGraphicsBeginImageContext(currentView.bounds.size);
[currentView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
|
UIGraphicsBeginImageContext(currentView.bounds.size);
[currentView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
|
相关文章:
-
2021-11-02
-
2022-12-23
-
2021-06-25
-
2021-11-18
-
2022-02-07
-
2022-12-23
-
2022-12-23
-
2022-12-23