小编Ane*_*sic的帖子

如何将FBProfilePictureView转换为UIImage?

使用FBProfilePictureView一切正常,但我需要从FBProfilePictureView获取该图片并将其转换为UIImage.

我该怎么办?

我试过用这个:

UIGraphicsBeginImageContext(self.profilePictureView.frame.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
self.TestPictureOutlet.image = viewImage;
Run Code Online (Sandbox Code Playgroud)

但这对我的解决方案不起作用.

uiimage facebook-graph-api ios facebook-ios-sdk

16
推荐指数
1
解决办法
7795
查看次数