I need some code on how to make a UIScrollView
that contains UIImageViews lined up like the iPhone photo's app that comes with the phone.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
Best way to do this is probably a standard
UITableView
whose cells contain a row of fourUIImageView
s. In-tableView:cellForRowAtIndexPath:
, load the four images corresponding to that row (assuming you've got them in a linear array, the image indices would be (row*4), (row*4 + 1), (row*4 + 2), and (row*4 + 3)), and apply them to the cell's image views. Make sure to use-dequeueReusableCellWithIdentifier
andinitWithStyle:reuseIdentifier:
or your performance—specifically, the overhead of creating and destroying all the views involved—will be terrible.This is a frequently asked question around here. Several questions that might have answers on the various aspects of doing this are
The Three20 framework has a drop-in component for doing just this, as well.