問題是這樣的,我現在想往自訂cell中傳入幾個判斷條件,用以判斷是否添加圖片標籤等等,請問能否在返回cell時添加用屬性給cell中傳值
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
tabelViewCell1 *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
NSDictionary *dic = _arr[indexPath.row];
cell.name.text = dic[@"userinfo"][@"uname"];
[cell.imgView sd_setImageWithURL:[NSURL URLWithString:dic[@"userinfo"][@"icon"]]];
cell.songId = @"ddd";
return cell;
}
songId並不能傳進cell中