How to have an UI component scrolling with my UITableView
I am trying to have a UI component stuck to my cells in a UITableView and scrolling with them... It seems weird but a picture permits to understand the main point:
I am trying to do the same effect but with other UI components (another UIVIew). Do you have some hints to do this ?
- Is it a custom uitableviewcell inserted at start ?
- Is there an easy-to-implement hack ?
Thanks a lot开发者_开发技巧 for your help !
You can add any UIView and make it scroll with the table cells by placing the UIView in the table header. There is a special property for a table view, called tableHeaderView.
Use something like this:
UIView* my_custom_view;
// TODO: Alloc, and initialize the view
tableView.tableHeaderView = my_custom_view;
精彩评论