Uitableview 从Parse.com检索搜索结果的数据

Uitableview 从Parse.com检索搜索结果的数据,uitableview,uisearchbar,parse-platform,Uitableview,Uisearchbar,Parse Platform,对不起,我正在通过youtube和specific use Parse.com上的教程视频实现一个搜索栏 我想知道如何从另一个解析中检索数据,并根据我现在的代码将其嵌入搜索中?Ie除了命名时间,用户还希望照片。。。我无法输入其他搜索字符串。。。对不起,这个问题太平庸了。。。但它们完全是站 - (Void) { retrieveFromParse     PFQuery retrievePets * = [ PFQuery queryWithClassName : FF_USER_CLASS ]

对不起,我正在通过youtube和specific use Parse.com上的教程视频实现一个搜索栏

我想知道如何从另一个解析中检索数据,并根据我现在的代码将其嵌入搜索中?Ie除了命名时间,用户还希望照片。。。我无法输入其他搜索字符串。。。对不起,这个问题太平庸了。。。但它们完全是站

- (Void) { retrieveFromParse
    PFQuery retrievePets * = [ PFQuery queryWithClassName : FF_USER_CLASS ] ;
    [ retrievePets whereKeyExists : FF_USER_NOMECOGNOME ] ;
    
    
    [ retrievePets findObjectsInBackgroundWithBlock : ^ ( NSArray * objects , NSError * error ) {
        if ( error) {
            NSLog ( @ "% @ " , objects) ;
            totalStrings = [ [ NSMutableArray alloc ] init ] ;
            for ( PFObject * object in objects) {
                NSString * animal = [object objectForKey : FF_USER_NOMECOGNOME ] ;

                [ totalStrings addObject : animal] ;
            }
            
        }
        [ self.FFTableViewFindUser reloadData ] ;
    } ] ;
}

基本上你的过滤方式是错误的。。您应该尝试存储对象本身,而不是仅存储字符串。检索时。。直接将对象添加到数组中

    for (PFObject *object in objects) {
        [allObjects addObject:object];
        //NSString *animal = [object objectForKey:FF_USER_NOMECOGNOME];

    }
现在在CellForRow。。你可以直接得到过滤后的图像

   PFObject *object = [filteredObjects objectAtIndex:indexPath.row];
    NSString *str = [object objectForKey:FF_USER_NOMECOGNOME];

  cell.FFLabelCell_NomeCognome.text = str;
    cell.FFIMGCell_FotoProfilo.file = [object objectForKey:FF_USER_FOTOPROFILO];
    [cell.FFIMGCell_FotoProfilo loadInBackground];

基本上你的过滤方式是错误的。。您应该尝试存储对象本身,而不是仅存储字符串。检索时。。直接将对象添加到数组中

    for (PFObject *object in objects) {
        [allObjects addObject:object];
        //NSString *animal = [object objectForKey:FF_USER_NOMECOGNOME];

    }
现在在CellForRow。。你可以直接得到过滤后的图像

   PFObject *object = [filteredObjects objectAtIndex:indexPath.row];
    NSString *str = [object objectForKey:FF_USER_NOMECOGNOME];

  cell.FFLabelCell_NomeCognome.text = str;
    cell.FFIMGCell_FotoProfilo.file = [object objectForKey:FF_USER_FOTOPROFILO];
    [cell.FFIMGCell_FotoProfilo loadInBackground];

更多的想法被广泛接受…更多的想法被广泛接受。。。。