1楼 @tinyfool 我是利用shareSDK中一个分享截图的方法的,也试了正常的截图方法,这两个都是一样,截图出来的都是空白的。 1.-(void) screenShot { UIGraphicsBeginImageContext(self.bounds.size); [self.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image= UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSLog(@"image:%@",image);
UIImageView *imaView = [[UIImageView alloc] initWithImage:image];
imaView.frame = CGRectMake(0, 700, 500, 500);
[self addSubview:imaView];
[imaView release];
UIImageWriteToSavedPhotosAlbum(image, self, nil, nil);
} 2.shareSDK截图方法 [SSEShareHelper screenCaptureShare:^(SSDKImage *image, SSEShareHandler shareHandler) {
if (!image && self.imageV.image)
{
//如果无法取得屏幕截图则使用默认图片
image = [[SSDKImage alloc] initWithImage:self.imageV.image format:SSDKImageFormatJpeg settings:nil];
}
//构造分享参数
NSMutableDictionary *shareParams = [NSMutableDictionary dictionary];
NSArray* imageArray = @[image];
[shareParams SSDKSetupShareParamsByText:@"分享内容"
images:imageArray
url:[NSURL URLWithString:@"http://www.mob.com"]
title:@"分享标题"
type:SSDKContentTypeAuto];
]};