iOS开发_部分密文显示身份证号及姓名

    LHYCardListInfo *cardInfo = self.cardArray[indexPath.row];
    UILabel *cardIndexLabel = cell.contentView.subviews[0];
    UILabel *cardIdLabel = cell.contentView.subviews[1];
    UILabel *nameLabel = cell.contentView.subviews[2];
    cardIndexLabel.text = [NSString stringWithFormat:@"卡%ld", (long)indexPath.row + 1];
    cardIdLabel.text = cardInfo.cardId;
    cardIdLabel.text = [NSString stringWithFormat:@"%@******%@", [cardInfo.cardId substringToIndex:4],  [cardInfo.cardId substringFromIndex:10]];
    nameLabel.text = [NSString stringWithFormat:@"*%@", [cardInfo.name substringFromIndex:1]];

你可能感兴趣的:(iOS开发_部分密文显示身份证号及姓名)