0

I want to create a scroll disabled tableview which will fill the view below navigation bar. Finally I've managed to do it but it's not the right way because I'm giving minus 64 margin (status bar + navigation bar) to tableview.

I'm assigning my constraints from storyboard. I've tried lots of other constraints with the table view like giving zero constraints from 4 sides or equal width + equal height + center horizontal + center vertical none of them worked.

What is the right way to solve this problem.

Screenshot from the storyboard are below.

enter image description here enter image description here enter image description here

mkeremkeskin
  • 644
  • 10
  • 27

2 Answers2

9

I solved it.

enter image description here

unchecking four of them and adding the constraints from image below worked as I wanted.

enter image description here

So I guess scroll disabled tableviews not working as expected with these four view controller options checked.

mkeremkeskin
  • 644
  • 10
  • 27
3

As kerem keskin said, unchecking resolves the issue but you don't need to uncheck all four. Just need to uncheck Adjust Scroll View Inset.

Refer to this: iOS 7 -- navigationController is setting the contentInset and ContentOffset of my UIScrollView

Community
  • 1
  • 1
Thiago Ramos
  • 649
  • 8
  • 6