Table Header Views in StoryBoards

2019-01-03 01:53发布

Is there a way to insert a Table Header View (tableHeaderView) in StoryBoard (like we used to do in Interface Builder)?

2条回答
萌系小妹纸
2楼-- · 2019-01-03 02:07

It looks like one simply drags a control to the top of the table view. I didn't expect it to be that easy.

Before Drop

Before Drop

After Drop

After Drop

查看更多
一夜七次
3楼-- · 2019-01-03 02:17

You can do this easily by dragging your UIView/UIImageView just below the UITableView in the document outline (instead of the layout).

If you try to drag in the layout instead of document outline the UITableViewCell will jump to the top handling which is frustrating!

查看更多
登录 后发表回答