Reputation: 2825
I would like to make a page like this (i.e. a fix segmented controller on the top, with a uitableview appending beneath it):
So, this is the way I did it: I have added a segmented controller in a uiviewcontroller, then I append a uitableview under it. Here is the diagram in the storyboard:
However, when it runs in the simulator, the header of the uitableview is abnormally tall.
I have no idea why it is like this. Am I going to a wrong direction? Thanks for any helps.
UPDATE: This is the default setting of the uitableview. I didn't change any thing.
Upvotes: 0
Views: 116
Reputation: 8918
Select your view controller in storyboard. In the Attributes inspector, uncheck "Adjust Scroll View Insets" and uncheck "Under Top Bars".
Upvotes: 1
Reputation: 17595
You have placed Segment control in Tableview's header. But you had set some height to tableview section header
via either xib or programmatically. That's why it leads to show this space.
Upvotes: 0