ios - How can I convert FBProfilePictureView to an UIImage? -


everything working fine fbprofilepictureview need picture fbprofilepictureview , turn uiimage.

how should it?

i tried using this:

uigraphicsbeginimagecontext(self.profilepictureview.frame.size); [self.view.layer renderincontext:uigraphicsgetcurrentcontext()]; uiimage *viewimage = uigraphicsgetimagefromcurrentimagecontext(); uigraphicsendimagecontext(); self.testpictureoutlet.image = viewimage; 

but doesnt work solution.

fbprofilepictureview uiview, uiview contains uiimageview, image, can uiimage uiimageview:

profilepictureview fbprofilepictureview

uiimage *image = nil;  (nsobject *obj in [profilepictureview subviews]) {     if ([obj ismemberofclass:[uiimageview class]]) {         uiimageview *objimg = (uiimageview *)obj;         image = objimg.image;         break;     } } 

edit: add way more same thing

__block uiimage *image = nil;  [self.view.subviews enumerateobjectsusingblock:^(nsobject *obj, nsuinteger idx, bool *stop) {     if ([obj ismemberofclass:[uiimageview class]]) {         uiimageview *objimg = (uiimageview *)obj;         image = objimg.image;         *stop = yes;     } }]; 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -