Mọi thứ đều hoạt động tốt với FBProfilePictureView nhưng tôi cần lấy ảnh đó từ FBProfilePictureView và biến nó thành UIImage.Làm cách nào để chuyển đổi FBProfilePictureView thành UIImage?
Tôi nên làm như thế nào?
tôi đã cố gắng sử dụng này:
UIGraphicsBeginImageContext(self.profilePictureView.frame.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
self.TestPictureOutlet.image = viewImage;
Nhưng điều này doesnt làm việc cho giải pháp của tôi.
Không chắc chắn lý do tại sao họ không hiển thị UIImage. Giải pháp lame, nhưng bạn có thể chỉ cần sử dụng Graph API và tải thông qua URL? –