ios - ARC 语义问题 : "No visible @interface for UIImageView" and PFImageView Semantic Issues

标签 ios objective-c uiimageview semantics semantic-ui

我有一个 profileviewcontroller,其中这些 ImageView 主要是为了获取个人资料图片。但是在我的 profileviewController.m 的开头,它声明“未知类型名称‘PFImageView’;你是说‘UIImageview’吗?”对于以下行:

@property (strong, nonatomic) PFImageView *imageUser;

如果用户要添加他的个人资料照片,我会得到完全相同的照片:

-(void)addProfilePic
{
    //---------------------------------------------------------------------------------------------------------------------------------------------
    imageUser = [[PFImageView alloc] initWithFrame:CGRectMake(([UIScreen mainScreen].bounds.size.width-100)/2, 50, 100, 100)];

我不想一定要更改为 UIImageView,认为它可能会弄乱代码中的其他内容,所以想澄清一下。我还有一个 ARC 语义问题,涉及“'UIImageView' 的不可见@interface 声明选择器'setFile。'”和“'UIImageView' 的不可见@interface 声明选择器'loadInBackground。'”这在我的呼吁中头像:

-(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];
}

非常感谢您的帮助,感谢您的宝贵时间。

最佳答案

将 ParseUI FrameWork 导入您的项目。

#import <ParseUI/ParseUI.h>

将上面的行导入到你想要使用PFImageView的头文件中

关于ios - ARC 语义问题 : "No visible @interface for UIImageView" and PFImageView Semantic Issues,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27776480/

相关文章:

iphone - NSDateFormatter 内存泄漏

ios - cgcontext严重错误: draw bezierPath in initwithcoder?

swift - 更改 IBOutlet (UIImageView) 的宽度

ios - 在没有自己的服务器的情况下通过推送通知通知其他客户端?

ios - 如何将 AVAudioEngine 连接到 Lightning 端口音频输入?

ios - 从移动网页通过 native Facebook iOS 应用程序登录

ios - 如何在文件管理器中保存多个图像

ios - 如何将背景图像添加到将滚动和缩放单元格的 UICollectionView

ios - 从 layoutSubviews 访问上一个单元格

iOS:获取图像的最大颜色