Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you are referring to the tile view, you can duplicate that using a <code>UITableView</code> or a <code>UIScrollView</code>. If you want it to side scroll then a <code>UIScrollView</code> is the starting point.</p> <p>If you want it to scroll vertically (which I recommend on iPhone) then use a <code>UITableView</code> with a custom <code>UITableViewCell</code>. </p> <p>As for the Core Data side, you are probably coming at this incorrect, you are trying to store UI state information (how many photos are in a cell) in core data. Core Data should not care about how many images are in a cell.</p> <h2>UITableViewCell</h2> <p>To use a <code>UITableView</code> you would create an array that contains all of your images. You can then determine how many rows you need by dividing that array by the number of images per row. </p> <p>From there you should subclass <code>UITableViewCell</code> and pass in the 4 images for that cell to draw. Then it is a simple matter of adding 4 <code>UIImageView</code> instances to the custom cell and setting the images. </p> <h2>UIScrollView</h2> <p>For a scrollview you crate a <code>UIImageView</code> for each image and then add them as subviews of the <code>UIScrollView</code>. You would then set the frame of each <code>UIImageView</code> so that they are displayed in a grid. </p> <p>If you find you have more images than you can hold in memory at once then you will need to deal with tiling, effectively paying attention to where the user is scrolling and filling in (via moving the offscreen image views) ahead of the edge the user is scrolling towards. This is the same thing you get effectively for free with a <code>UITableView</code> via its queuing of cells.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload