shajem
shajem

Reputation: 2121

Adding a UIToolBar Below UINavigationBar

I need to add a ToolBar beneath the NavigationBar in my UITableViewController. I have no clue how to do this programatically. Can someone please help me figure the code for this ?

A possible solution would be to make the class a UIViewController and then add a tableview controller to it. But if so, i am unable to add a pulltoRefresh feature to the tableview.

I think that there has to be a better approach than mine.

Upvotes: 0

Views: 672

Answers (1)

otakuProgrammer
otakuProgrammer

Reputation: 298

You should use UIViewController then add the UITableView as subview. More importantly you should pass the delegate and datasource to self, and adopt the UITableViewDelegate and UITableViewDataSource.

[myTableView setDelegate:self];
[myTableView setDataSource:self];

i am unable to add a pulltoRefresh feature to the tableview

How does pulltoRefresh works? If you mean reloadData, then probably you forget to connect the delegate and datasource for the tableview to work.

Upvotes: 1

Related Questions