SRMR
SRMR

Reputation: 3134

Add Table View footer in Storyboard

Does anyone know if you can add a Table View footer in Storyboard?

I was able to add a header, but I can't find a way to add a footer too.

enter image description here

I have a programatic footer right now using viewForFooterInSection:, but I want to put it in Storyboard instead.

EDIT:

I'm able to put a UIView in the Storyboard right here if I drag it on the UITableView.

enter image description here

And if I create an outlet with @IBOutlet weak var footerView: UIView! and set it to self.tableView.tableFooterView = footerView and set self.tableView.sectionFooterHeight = 200 I still can't get anything to show up.

Upvotes: 0

Views: 2182

Answers (1)

Takeshi Akutsu
Takeshi Akutsu

Reputation: 11

oh, I had a totally same problem and struggle with it almost two hours. I turned out that I had a code which made a tableView unnecessary separator line clear in viewDidLoad(). When I remove it, it worked file.

In short, it can be possible that you have this code in viewDidLoad()

tableView.footerView = UIView.init()

Upvotes: 1

Related Questions