Okay, so I have a problem. I want to do the following:
- Resize a table view so that I have 20 empty pixels above the table view and the navigation item
- Add a small view in said space
- Give that view a sky blue background color
- Have news feed like text in that view
I can figure out the news feed thing myself and the sky blue thing, but how can I resize the table view. I have tried just setting the frame when the view loads, but nothing happens.
Code:
- (void)setupView {
//called on viewDidLoad
CGRect tabViewBds = self.tableView.frame;
int removeSize = 20;
self.tableView.frame = CGRectMake(tabViewBds.origin.x, tabViewBds.origin.y+removeSize, tabViewBds.size.width, tabViewBds.size.height);
}
So can you help me?