I have a table view which loads data. This table view has the “PullToRefreshTableViewController” as superclass. So the top of the .h file contains this:
@interface NewsTable: PullRefreshTableViewController
Since this makes the whole view an tableview I can’t add anything like a toolbar on top of this.
So I thought. I’ll make a sort of container class. One which has the toolbar in it, and also add the class with the PullRefreshTableView as a subview.
Only problem i’m having that I don’t know how to integrate this? What should I do to add the PullRefreshTableView in this container class?
I think it’s something like
[containerclass addSubView:PullRefreshTableView]
But of course this doesn’t work
Thnx for your effort!
Update:
The working code is:
PullRefreshTableViewController *newsFeed = [[PullRefreshTableViewController alloc] init];
[self.view addSubview:newsFeed.view];
Beware to not release it as soon as you add the subview
If you are doing this
in a view controller it should be