浏览代码

self-sizing cells for ProfileInfoViewController

cyberta 5 年之前
父节点
当前提交
6fcba8248b
共有 1 个文件被更改,包括 1 次插入9 次删除
  1. 1 9
      deltachat-ios/Controller/ProfileInfoViewController.swift

+ 1 - 9
deltachat-ios/Controller/ProfileInfoViewController.swift

@@ -58,6 +58,7 @@ class ProfileInfoViewController: UITableViewController {
         super.viewDidLoad()
         title = String.localized("pref_profile_info_headline")
         navigationItem.rightBarButtonItem = doneButtonItem
+        tableView.rowHeight = UITableView.automaticDimension
     }
 
     // MARK: - tableviewDelegate
@@ -69,15 +70,6 @@ class ProfileInfoViewController: UITableViewController {
         return cells[indexPath.row]
     }
 
-    override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
-
-        let cell = cells[indexPath.row]
-        if cell is AvatarSelectionCell {
-            return AvatarSelectionCell.cellHeight
-        }
-        return Constants.defaultCellHeight
-    }
-
     override func tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? {
         let email = dcContext.addr ?? ""
         let footerTitle = String.localizedStringWithFormat(