ios - Table Header Views in StoryBoards

ID : 20138

viewed : 27

Tags : iosuitableviewxcode4storyboardios

Top 5 Answer for ios - Table Header Views in StoryBoards

vote vote


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

vote vote


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!

vote vote


Dragging and dropping a view on top of the tableview worked for only one screen size, at least in Xcode 11. It didn't size well on different screens.

I just created a view and left it there behind the tableview in storyboard. I created an IBOutlet for it:

@IBOutlet weak var audioView: UIView! 

Then in tableview code I did:

func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {     return audioView }  func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {     return 142 } 

It worked well on all screen sizes.

vote vote


vote vote


as a noob using Python3 ,I find it might be an import error instead of a Django error


from someModule import someClass 


from .someModule import someClass 

this happens a few days ago but I really can't reproduce it...I think only people new to Django may encounter's what I remember:

try to register a model in

from django.contrib import admin from user import User 

try to run server, error looks like this

some lines... File "/path/to/" ,line 6 tell you there is an import error some lines... Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label 

change user to .user ,problem solved

Top 3 video Explaining ios - Table Header Views in StoryBoards