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]];
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应用中实现卡列表展示的方法。通过使用LHYCardListInfo结构来存储卡片信息,并利用UILabel控件显示卡号、姓名等信息。为了保护用户隐私,卡号部分采用遮罩处理。
1350

被折叠的 条评论
为什么被折叠?



