I need to create a screen that scrolls vertically – like the tableview but I need 3 columns and within those 3 columns I need to add images of varying height – so this will not fit into rows that a tableview can provide.
Should I create 3 tableviews and lay them out side by side – or something else. I think I could build this by simply positioning the images using coordinates but I wanted to benefit from methods that the table view can provide.
If you want the columns to act stuck together, so that they all scroll simultaneously, then I think best approach is to use
UIScrollViewwith the images added in the correct placed “by hand.” UITableView and friends is not built to handle non-lined up columns.added If you do use a
UIScrollView, and you have a large number of images you want to display (that is, the user can scroll for a long time), then it would be wise to recycle yourUIImageViewobjects that are scrolled off the screen. This is whatUITableViewdoes withUITableViewCellobjects, and that’s whyUITableViewwins. You can win, too, if you code carefully.