我正在尝试从facebook sdk中提供的ProfilePictureView获取UIImage。当我解压缩UIImageView并添加到主视图控制器时,代码显示图片。但是当我试图从我实例化的UIImageView中取出UIImage时,它会给我一张facebook的默认个人资料图片。请帮忙!
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
// txt_fname.Text = _user.First_Name;
// txt_lname.Text = _user.Last_Name;
UIImageView y = new UIImageView();
UIImage image = new UIImage ();
// btn_photo.SetBackgroundImage (fb_profile, UIControlState.Normal);
foreach (var x in fb_profile.Subviews) {
if (x is UIImageView) {
y = (UIImageView)x;
btn_photo.SetBackgroundImage (y.Image, UIControlState.Normal);
}
}
View.AddSubview (y);