Reputation: 20150
I'm trying to add a Toolbar in interface builder in the following View:
However, when adding the toolbar, it is not going at the bottom of the screen but is like this:
As a result, at runtime, the toolbar is appearing like a row in the table.
Any suggestion why the toolbar is not going at the end of the screen and how can I solve this?
Upvotes: 0
Views: 91
Reputation: 277
Declare delegate and data source like this.
@interface YourViewController : UIViewController<UITableViewDelegate, UITableViewDataSource>
Hope this will help you.
Upvotes: 0
Reputation: 3960
In tableView
you can have only cells
, that's why toolbar
getting add as cell instead a toolbar
in bottom. So for adding toolbar
at that controller
, you can decrease the size of tableView by 44 (size of a toolbar) and than in Controller's View
you can add your toolBar
. I added a ScreenShot
Upvotes: 0
Reputation: 698
It seems you are adding toolbar inside table view,
Upvotes: 1