ios - Custom header view overlapped by UITableView -
In the interface builder, I have header view above the UITableView, although it is missing in the simulator, and the table looks on it Is there a reason for taking more and more screens? Work around?
Interface Builder Simulator In your case: Interface Builder Image I can see that the table view is a view of the view and you are also the subview of the header view tableview. This is happening because tableview header is hiding the view. If you add the header view as a view of the table view, then it will appear. But adding the subviews will not solve your problem as the subview will go away when you scroll through the table view. To solve your problem, I can see that your table view has a navigation bar Set the header view for the section after you set any custom view at the top of your table view do not require. Try it: Also implement: You can create subclasses of
novelist .
[self.navigationController.view addSubview: headerView]; Good practice:
- (UIView *) TableView: (UITableView *) Table view view FORHeaderInSection: (NSInteger) section {UIView * aView = [[UIView alloc] init]; // Optimize viewing according to our recurring return aView; }
- (CGFloat) Table View: (UITableView *) Table High HeightForhead Inception: (NSInteger) section {return 44.f ; // Make this height as much as you need. Otherwise you may not see the full view. }
UITableViewController instead of
UIViewController . Hope this helps .. :)
Comments
Post a Comment