0

A header View is set to a tableView and the header View is an xib file using auto layout. When clicking a tableView cell and push another tableViewController ,then click back button to pop the tableViewController .However the headerView's height is changed from 98 to 34 and there is a gap between the headerView and the first cell.This is really odd.Is there anybody know how to solve this problem?Thank you very much!
pic with the right headerview height

pic with problem

Nirav D
  • 71,513
  • 12
  • 161
  • 183
Yung
  • 3
  • 4

2 Answers2

0

try this or add in programming to disable the insets

   self.automaticallyAdjustsScrollViewInsets = false

or if you are using navigation controller

self.navigationController.automaticallyAdjustsScrollViewInsets = false

Sucharu Hasija
  • 1,096
  • 11
  • 23
0

Just change your viewWill appear like this

- (void)viewWillAppear:(BOOL)animated {
     self.navigationController.navigationBar.translucent = NO;
}

Hope this will help you.

Nirav D
  • 71,513
  • 12
  • 161
  • 183
  • wow!!!!!Thank you so much !It did works.I use the second line.Thank you again .This helps a lot. – Yung Jun 20 '16 at 09:40