将标签数组添加到集合视图单元格

时间:2013-06-14 16:12:15

标签: iphone ios6 uicollectionview uicollectionviewcell

我想将此标签数组添加到collectionview单元格

labelArray =[[NSArray alloc] initWithObjects:@"Theme 001-002", @"Theme 002-006", @"Theme 006-009", @"Theme 009-012", nil];


NSString *filePath = [labelArray indexPath.row];

这是将标签数组添加到collectionview单元格的正确方法。

cell.label.text = @"Theme 001-002";

谢谢

1 个答案:

答案 0 :(得分:0)

解决了它

labelArray =[[NSArray alloc] initWithObjects:@"Theme 001-002", @"Theme 002-006", @"Theme 006-009", @"Theme 009-012", nil];


cell.label.text = [labelArray objectAtIndex:indexPath.row];