Это Swift 4. Мне не удалось заполнить данные (в информационном массиве) в табличном представлении.Я ожидаю, что строки «Имя», «Дата рождения», «Пол», «Телефон», «Электронная почта» появятся в табличном представлении, но ничего не отображается.
Я ввел «ProfileInfo»"как мой идентификатор tableViewCell.
Спасибо.
let information = ["Name", "Date of Birth", "Gender", "Phone", "Email"]
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return information.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "ProfileInfo", for: indexPath) as! OTProfileTableViewCell
cell.label.text = information[indexPath.row]
return cell
}