Compute heights of TableViewCells automatically
This is necessary because different languages need different amounts of space. Especially text fields with some more text need to be variable in their heights.
This commit is contained in:
parent
73a015616a
commit
8351c16d75
7 changed files with 56 additions and 36 deletions
17
pass/UserInterface/AutoCellHeightUITableViewController.swift
Normal file
17
pass/UserInterface/AutoCellHeightUITableViewController.swift
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
//
|
||||
// AutoCellHeightUITableViewController.swift
|
||||
// pass
|
||||
//
|
||||
// Created by Danny Moesch on 17.02.19.
|
||||
// Copyright © 2019 Bob Sun. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class AutoCellHeightUITableViewController: UITableViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
tableView.estimatedRowHeight = 170
|
||||
tableView.rowHeight = UITableViewAutomaticDimension
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue