0

I'm using swift 2.2 and i have a dynamic table view . I want to set table view height according to number of cell. No empty cell should display. In my current one it shows additional empty cells and heigh of table view also not dynamically changing according to number of cells.Any help?

Anushka Madushan
  • 681
  • 2
  • 12
  • 31
  • Refer [this link](http://stackoverflow.com/questions/18746929/using-auto-layout-in-uitableview-for-dynamic-cell-layouts-variable-row-heights) & [another link](http://stackoverflow.com/questions/30052930/auto-sizing-a-uitableviewcell-swift) hope it will helpful. – Akshay Apr 06 '17 at 06:26
  • refer [this link](http://stackoverflow.com/questions/18746929/using-auto-layout-in-uitableview-for-dynamic-cell-layouts-variable-row-heights) & [another link](http://stackoverflow.com/questions/30052930/auto-sizing-a-uitableviewcell-swift) hope will helpful. – Akshay Apr 06 '17 at 06:27
  • refer [link](http://stackoverflow.com/questions/18746929/using-auto-layout-in-uitableview-for-dynamic-cell-layouts-variable-row-heights) & [link2](http://stackoverflow.com/questions/30052930/auto-sizing-a-uitableviewcell-swift) will helpful. – Akshay Apr 06 '17 at 06:28
  • 2
    Possible duplicate of [Adjust the size of UITableView dynamically which would display as a non-scrollable list of content](http://stackoverflow.com/questions/43228539/adjust-the-size-of-uitableview-dynamically-which-would-display-as-a-non-scrollab) – RajeshKumar R Apr 06 '17 at 07:19

1 Answers1

2

You can try this for not showing empty cells in tableview

   tableView.tableFooterView = UIView()
Anil Kumar
  • 945
  • 7
  • 16