UITableView set a web view and a button outside th

2019-08-15 11:21发布

I am new to Swift. Currently I am building an app which has a tableview as the home page. I am trying to make a graph from a website(webView) and a button as the background view of the UITableView and display it only when cell is empty. Is it doable? How can I combine a webView and a button and set it as the backView using tableView.backgroundView = (something here)?

The reason I am doing this is because I need to use the navigation controller for the segue. I have tried to put them in another view controller but then I cannot use push segue.

Thank you.

1条回答
Lonely孤独者°
2楼-- · 2019-08-15 11:42

You can use TableViewCell as a container of your button and webview. I added the mainstoryboard screenshot. enter image description here

Using custom cell in Table View explained here Custom Cell

Hope it helps.

查看更多
登录 后发表回答