【问题标题】:Unknown class PFImageView in Interface Builder fileInterface Builder 文件中的未知类 PFImageView
【发布时间】:2013-10-17 15:31:42
【问题描述】:

我正在使用 Parse.com,并且我在 TableView 中有一个 ViewController ...

TableView 的单元格是个性化的,包含在带有 PFImageView 类的 ImageView 中。

我什么时候运行它一切正常,定期给我看照片,但 Xcode 5 给我显示这个错误消息

PFImageView Interface Builder 文件中的未知类。

我怎么会收到这个错误?我哪里做错了

下面我展示了表格视图中PFImageView的实现。

附: PFImageView 和 ' 也已添加到 CustomTableViewCell.h 的@属性中

-(FFCellFindUser *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath   {

    static NSString *CellIdentifier = @"CellFindUser";
    FFCellFindUser *cell = [self.FFTableViewFindUser dequeueReusableCellWithIdentifier:CellIdentifier];
    if (!cell) {
        cell = [[FFCellFindUser alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    }

    PFObject *TempObject = [self.FFTotalUser objectAtIndex:indexPath.row];
    cell.FFLabelCell_NomeCognome.text = [TempObject objectForKey:FF_USER_NOMECOGNOME];


    PFFile *imageFile = [TempObject objectForKey:FF_USER_FOTOPROFILO];
    [imageFile getDataInBackgroundWithBlock:^(NSData *data, NSError *error) {
        cell.FFIMGCell_FotoProfilo.image =[UIImage imageWithData:data];  }];

    return cell;
}

【问题讨论】:

  • Remove " if (!cell) { cell = [[FFCellFindUser alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; }" 并向我们展示单元原型的 IB 屏幕

标签: uitableview uiimageview parse-platform


【解决方案1】:

看来在PFTableViewCell中为自定义UITableViewCell单元格更改类已经解决了问题......这样编译器已经识别出PFImageView了。

【讨论】:

  • 你能解释一下这个吗?我的表格单元格已经是 PFTableViewCell 类型,我仍然得到未知类 PFImageView
【解决方案2】:

PFImage 有一个调用 use 而不是使用 getData。

假设您从我的评论中正确加载了您的单元格。

http://blog.parse.com/2012/07/11/loading-remote-images-stored-on-parse/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-11-23
    • 2018-03-06
    • 2016-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多