NSString *path =[[NSBundle mainBundle] pathForResource:@"icon" ofType:@"png"]; MyImage = [UIImage imageWithContentsOfFile:path];
UIGraphicsBeginImageContext(currentView.bounds.size); //currentView 当前的view[currentView.layer renderInContext:UIGraphicsGetCurrentContext()];UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil); |
Xcode10
浙公网安备 33010602011771号