0

I have a View Controller with UITableView declared in storyboard. The View Controllers has "Under top bars" option selected (Edge Rect). Normally the view looks like the below image. enter image description here

There is no gap between the cells of the tableview and navigation bar.

The filter in the right bar button item presents filter view controller modally and when returning back (dismiss), there is content inset (additional) added (by I don't know who). The final looks like this. enter image description here

I have tried to set content inset in viewWillAppear, viewDidLayoutSUbviews etc. But nothing seems to work. Has anyone ever come across similar kind of problems? How can I remove this contentInset.

Dunes Buggy
  • 1,779
  • 1
  • 21
  • 41
  • Are you sure it's a contentInset problem? It looks more to me like a top layout guide issue. – Jeffery Thomas Jun 23 '14 at 12:10
  • Well I'm observing contentInset.y and frame of tableview in viewwillappear, and the abnormality I'm observing is contentInset.y being set to 128. If everything has to work correctly this value should be 64. Can you explain what do you think I might be doing wrong with top layout ? I don't see any problem with it. – Dunes Buggy Jun 23 '14 at 12:23
  • If you see the value of `contentInset` changing, then it's a `contentInset` problem. Have you seen: http://stackoverflow.com/a/18953140/1298400 – Jeffery Thomas Jun 23 '14 at 12:33
  • I don't know what n how, but I added a Zero Rect view behind the tableview, and everything works fine. No idea why I even tried it. – Dunes Buggy Jun 23 '14 at 13:03
  • Was this view controller created by dragging a table view controller object into a storyboard, or was a table view added as a subview of the view controllers `view` object? If it's a subview, are the edges constrained to the superview, or is the size constrained? – Anthony Mattox Aug 25 '14 at 20:49

0 Answers0