Imagine you have a normal table view where each row is an item on a conveyor belt. You will put the items in each cell of the table view but when you scroll you also want the background image (the conveyor belt) to scroll as well. How can you do this?
Share
Have the
UITableViewbackground transparent, and add aUIScrollViewbehind it with theUIImageViewinside it. Add a listener for when theUITableViewscrolls (since it is a subclass ofUIScrollViewit has all the same delegate methods). Then, when it scrolls, set the scroll position of theUIScrollViewbehind it to the same programmatically.You could technically do it without a second
UIScrollViewbehind theUITableView, just with a plainUIIImageView, if you want to reverse the offset values.