Maysam
Maysam

Reputation: 7367

UIToolBar buttons don't work over UITableView

I have a UITableView inside the ViewController, on top of it there is a UIToolbar.

enter image description here

A button image is placed inside the Toolbar, as shown in the image. What is weird is that when I click that button nothing happens, it seems it's behind the TableView. I've tried sending back the TableView, like this:

view.sendSubviewToBack(tableView)

Simulated output:

enter image description here

But it did not work. What's wrong with my code?

Upvotes: 0

Views: 172

Answers (1)

Leo
Leo

Reputation: 24714

Because your toolbar is under tableview

Just change the order of toolbar

Upvotes: 1

Related Questions