NSArray
の友達リストがviewdidload
あり、各セルが で構成されるカスタマイズされたテーブル ビューを持っています。テーブル ビュー セルにLable
配列要素を表示したいと考えてLable
います。
私のコードとして
tableList1 = [[NSArray
alloc]initWithObjects:@"Harendra",@"Satyendra",@"Jitendra",@"Sandeep",@"Dick",@"nihyan",@"alex
",@"Gorav",nil];
と
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
// ******** LableView *******
UILabel* cellLabel = [[UILabel alloc] initWithFrame:CGRectMake(200,12, 141, 111)];
cellLabel.textColor=[UIColor greenColor];
cellLabel.font=[UIFont boldSystemFontOfSize:18];
//cell.textLabel.text = [callDetailArray objectAtIndex:indexPath.row];
cell.textLabel.text =[tableList1 objectAtIndex:indexPath.row];
// cellLabel.text =[NSArray arrayWithArray:tableList];
cellLabel.text = @"Lorem Ipsum";
cellLabel.backgroundColor = [UIColor clearColor];
cellLabel.opaque = NO;
[cell.contentView addSubview:cellLabel];
NSLog(@" arr count in Friends list %i",tableList1.count);