I am making an iPhone app. In this app I have a UITableView which has a UITableView header. This is how my code looks like.
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(30, 0, 308, 50)];
view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"sx_home_tablehead.png"]];
self.tableViewAppointments.tableHeaderView = view;
And this is how it looks like on my iPhone

And this is what I want to achieve

Hope that anyone can help me !
Kind regards !
Because you’re specifying explicitly the frame of the view. You should not do a terrible hack like this. Use this piece of code instead: