如何在我的字幕中添加文本?目前我有一个带有名称列表的 NSArray,如何为名称添加字幕?
lodgeList = [[NSArray alloc]initWithObjects:
@"Abingdon Lodge No. 48",
@"York Lodge No. 12",
@"Alberene Lodge No. 277",
nil];
继续...
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
cell.textLabel.text =[lodgeList objectAtIndex:indexPath.row];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;