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

Image Description Here Enter

Simulator

 Enter the image details here

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 header view as a subview of novelist .

  [self.navigationController.view addSubview: headerView];  Good practice:   

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:

  - (UIView *) TableView: (UITableView *) Table view view FORHeaderInSection: (NSInteger) section {UIView * aView = [[UIView alloc] init]; // Optimize viewing according to our recurring return aView; }   

Also implement:

  - (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. }   

You can create subclasses of UITableViewController instead of UIViewController . Hope this helps .. :)

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -