tableview属性

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *ID=@"cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];

    if(cell==nil){

        cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];

    }

    cell.textLabel.text=self.radiosource[indexPath.row];

 //    改变cell背景色
    cell.contentView.backgroundColor = [UIColor whiteColor];

      cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; //显示最右边的箭头

     return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

{

    NSLog(@"当前cell.textLabel.text:%@",[self.tableview cellForRowAtIndexPath: indexPath].textLabel.text);

    FMPlayer *ShowViewController=[[FMPlayer alloc]init];

    [self.navigationController pushViewController:ShowViewController animated:NO];


}

 
原文地址:https://www.cnblogs.com/gaozhang12345/p/8124586.html