у меня
Таблица, содержащая 5 мест.
var places = ["lat": "42.61964890000001", "country": "United States", "name": "39 Cosgrove St", "lon": "-71.3031683"]
[["lat": "42.6285025", "country": "United States", "name": "138 B St", "lon": "-71.3288776"], ["lat": "42.6334255", "country": "United States", "name": "137 Pine St", "lon": "-71.3321021"], ["lat": "42.6225646", "country": "United States", "name": "98 Marriner St", "lon": "-71.31320219999999"], ["lat": "42.6252232", "country": "United States", "name": "48 Houghton St", "lon": "-71.3243308"], ["lat": "42.61964890000001", "country": "United States", "name": "39 Cosgrove St", "lon": "-71.3031683"]]
Я хочу
, чтобы не показывать активное место из списка в моей таблице.
Я пытаюсь
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
if places[indexPath.row]["name"] != nil && places[indexPath.row]["name"] != places[activePlace]["name"] {
cell.textLabel?.text = places[indexPath.row]["name"]
}
return cell
}
Я получил
текст, который нужно скрыть, но он, кажется, оставляет пустое пространство, которое выглядит очень плохо.
Надеюсь
кто-то может пролить свет на это.