The default flow layout wraps its rows to fit into a scrolling view that moves in just one direction. If you’re willing to do the math—there’s quite a bit of it, and it’s not easy—you can create a custom layout subclass that shows a grid of items that scrolls in both directions and doesn’t wrap its lines. Figure 10-9 shows such a layout.
Recipe 10-8 fully customizes its layout subclass, overriding
layoutAttributesForItemAtIndexPath: to manually place each item. This implementation fully respects all ...