Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/103.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios ProfileViewController.m正在尝试获取ProfilePicture_Ios_Objective C_Image_Picturebox_User Profile - Fatal编程技术网

Ios ProfileViewController.m正在尝试获取ProfilePicture

Ios ProfileViewController.m正在尝试获取ProfilePicture,ios,objective-c,image,picturebox,user-profile,Ios,Objective C,Image,Picturebox,User Profile,我有一个纵断面图控制器,用户可以在其中设置或更改他或她的纵断面图,但不断出现对我来说毫无意义的错误 -(void)getProfilePicture { PFUser *user = [PFUser currentUser]; NSLog(@"file--%@",[user objectForKey:PF_USER_PICTURE]); userName = user[PF_USER_USERNAME]; status = user[PF_USER_STATUS

我有一个纵断面图控制器,用户可以在其中设置或更改他或她的纵断面图,但不断出现对我来说毫无意义的错误

-(void)getProfilePicture
{
    PFUser *user = [PFUser currentUser];
    NSLog(@"file--%@",[user objectForKey:PF_USER_PICTURE]);

    userName = user[PF_USER_USERNAME];
    status = user[PF_USER_STATUS];

    if ([user objectForKey:PF_USER_PICTURE]) {
        [imageUser setFile:[user objectForKey:PF_USER_PICTURE]];
        [imageUser loadInBackground];
    }
    else{
        imageUser.image = [UIImage imageNamed:@"blank_profile@2x.png"];
    }


//    fieldName.text = user[PF_USER_FULLNAME];
}

#pragma mark - UIActionSheetDelegate

非常感谢您提供的任何帮助或所需的任何支持代码。

您会收到什么错误?“UIImageView”没有可见接口声明选择器“setFile:”“UIImageView”没有可见接口声明选择器“loadInBackground”,您收到的错误中有一个对象,我知道它是
UIImageView
类型,您尝试调用
setFile:
loadInBackground
方法
UIImageView
不响应上述任何方法。也许你在错误的对象上调用它。。。。。