Ios 在TableView上显示标签。滚动TableView时,此选项将消失

Ios 在TableView上显示标签。滚动TableView时,此选项将消失,ios,label,tableview,parse-platform,pfquery,Ios,Label,Tableview,Parse Platform,Pfquery,我有一个带有隐藏标签的TableView,只有通过didSelectRow单击单元格时才会显示 到目前为止还不错,当我选择单元格时,会显示从图像中可以看到的橙色标签,但当tableView滚动时会出现问题,橙色标签会消失,只有在我更改页面时才会返回 橙色标签指示好友请求是否挂起,并引用另一个页面中存在的查询,这要感谢使用prepareforsegue报告的可变数组 你能解释一下为什么橙色标签消失了吗??当我选择单元格时,如何使其保持在TableView上? 橙色的标签是Richiestanate

我有一个带有隐藏标签的TableView,只有通过didSelectRow单击单元格时才会显示

到目前为止还不错,当我选择单元格时,会显示从图像中可以看到的橙色标签,但当tableView滚动时会出现问题,橙色标签会消失,只有在我更改页面时才会返回

橙色标签指示好友请求是否挂起,并引用另一个页面中存在的查询,这要感谢使用prepareforsegue报告的可变数组

你能解释一下为什么橙色标签消失了吗??当我选择单元格时,如何使其保持在TableView上? 橙色的标签是Richiestanatesalabel 另外,我正在使用Parse.com

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

    static NSString *CellIdentifier = @"Cell";

    FFCustomCellUtentiGenerali  *cell =[self.TableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[FFCustomCellUtentiGenerali alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];


    }


if (!isFiltered) {

    PFObject *object = [self.Utenti objectAtIndex:indexPath.row];

    NSString *str = [object objectForKey:FF_USER_NOMECOGNOME];
    cell.NomeCognome.text = str;

    cell.FFFotoProfilo.file = [object objectForKey:FF_USER_FOTOPROFILO];
    cell.FFFotoProfilo.image = [UIImage imageNamed:@"FFNoFotoUSer"];
    [cell.FFFotoProfilo.layer setMasksToBounds:YES];
    [cell.FFFotoProfilo.layer setCornerRadius:30.0f];
    cell.FFFotoProfilo.contentMode = UIViewContentModeScaleAspectFill;
    [cell.FFFotoProfilo loadInBackground];

    [cell.BackgroundReputazioneBlu.layer setMasksToBounds:YES];
    [cell.BackgroundReputazioneBlu.layer setCornerRadius:15.0f];
    [cell.BackGroundReputazione.layer setMasksToBounds:YES];
    [cell.BackGroundReputazione.layer setCornerRadius:17.0f];
    [cell.TapAggiungiLabel.layer setMasksToBounds:YES];
    [cell.TapAggiungiLabel.layer setCornerRadius:3.0f];
    [cell.RichiestaInAttesaLabel.layer setMasksToBounds:YES];
    [cell.RichiestaInAttesaLabel.layer setCornerRadius:3.0f];

    PFUser *user = [self.Utenti   objectAtIndex:indexPath.row];
    [cell.TapAggiungiLabel setHidden:YES];
    [cell.RichiestaInAttesaLabel setHidden:NO];


    if ([self isFriend:user]) {
         [cell.TapAggiungiLabel setHidden:YES];
        [cell.RichiestaInAttesaLabel setHidden:YES];
    }

    else {


        [cell.TapAggiungiLabel setHidden:NO];
        [cell.RichiestaInAttesaLabel setHidden:YES  ];
    }



    if ([self Is_InAttesa:user]) {
        [cell.RichiestaInAttesaLabel setHidden:NO];
        [cell.TapAggiungiLabel setHidden:YES];

    }

    else {
        [cell.RichiestaInAttesaLabel setHidden:YES];

    }

}
//end IsFiltred
else {

why cell.RichiestaInAttesaLabel setHidden:在两种情况下都是?

如果完成,则在何处完成!isFiltered{?因为self isFriend:用户识别他们是否是朋友self Is_InAttesa:用户识别请求是否挂起为什么不设置[cell.RichiestaInAttesaLabel setHidden:YES];在开始时设置一次,并在[self Is_InAttesa:user]中将其更改为否{…?我试图这么做,但当我滚动表格查看橙色标签消失扫描你记录cell.RichiestaInAttesaLabel.hidden在方法末尾?它可见吗?对不起,翻译疯了…我不明白你想说什么
if ([self isFriend:user]) {
     [cell.TapAggiungiLabel setHidden:YES];
    [cell.RichiestaInAttesaLabel setHidden:YES];
}

else {


    [cell.TapAggiungiLabel setHidden:NO];
    [cell.RichiestaInAttesaLabel setHidden:YES  ];
}