по какой-то причине я не могу заставить выражение работать. что мне не хватает? :( с неожиданной «символьной ошибкой» в строковой интерполяции
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("reuseIdentifier", forIndexPath: indexPath)
// Configure the cell...
if(indexPath.section == 0){
cell.textLabel!.text = searchActive == true ? "\(csFilter[indexPath.row].returnFullDescription())" : "\(subjectPerSection["CS"]![indexPath.row].returnFullDescription())";
}
else if(indexPath.section == 1){
cell.textLabel!.text = searchActive == true ? "\(seaFilter[indexPath.row].returnFullDescription())" : "\(subjectPerSection["SEA"]![indexPath.row].returnFullDescription())";
}
else if(indexPath.section == 2){
cell.textLabel!.text = searchActive == true ? "\(humFilter[indexPath.row].returnFullDescription())" : "\(subjectPerSection["HUM"]![indexPath.row].returnFullDescription())";
}
return cell
}
@LeoDabus вы имеете в виду \ String (subjectPerSection ["CS"]!)? – phenomenon09
@LeoDabus попытался использовать это, но я получаю «использование неразрешенного indentifier'CS» в '\ (subjectPerSection [String (CS)]!) – phenomenon09
Btw для сравнения Bool с true это избыточно. Просто отпустите '== true' –