I am trying to add a custom header for tableview (not for section). I see that this post shows how to do that: Table Header Views in StoryBoards
can I add controls like UISwitch
, UIButton
and UILabel
to the view in tableheader so they can be hidden or updated dynamically?
I missed an important point, which is, I'd like this view to stay at top even though i scroll the rows. so this header will always show the total. if I delete a row, the total gets updated right on the screen. also a button and switch so user can choose certain things. appreciate if anyone could point me to some example.
I tried adding a view as mentioned in above URL but that UIView
goes out of view when i scroll the table down.
Sounds like what I need is the layout of UIView, UITableView embedded in UIViewController. Pl see the attached image. How do I handle the events for UIView and UITableView in a subclass of UIViewController?
thank you