Learn the geometry, drawing state, and image representations behind custom rendering on iOS. The topics progress from a drawing context to reusable renderers and performance checks. Article links will be added to this outline as content becomes available.

Article available Coming soon

1. Geometry and Contexts

  • Points, Sizes, Rectangles, and Coordinate Systems
  • Points vs. Pixels and Display Scale
  • Drawing with CGContext
  • Saving and Restoring Graphics State
  • Translation, Rotation, and Affine Transforms

2. Paths and Appearance

  • Building Paths with Lines and Bézier Curves
  • Filling and Stroking Paths
  • Line Width, Joins, Caps, and Dash Patterns
  • Clipping Regions and Image Masks
  • Gradients, Blend Modes, and Compositing

3. Images and Documents

  • CGImage, UIImage, and Image Orientation
  • Bitmap Contexts, Pixel Formats, and Color Spaces
  • Resizing, Cropping, and Drawing Images
  • Rendering Scalable Content into PDF
  • Exporting Images with the Right Scale and Format

4. Rendering in an App

  • Custom View Drawing and Invalidation
  • Reusable Drawing Functions with Explicit Inputs
  • Separating Geometry from UIKit and SwiftUI Rendering
  • Rendering Offscreen Without Sharing Unsafe State
  • Caching Rendered Output and Invalidating It Correctly

5. Verification and Performance

  • Testing Geometry and Hit Regions
  • Snapshot Testing with Controlled Rendering Inputs
  • Reducing Overdraw and Repeated Drawing Work
  • Profiling Image Memory and Rendering Cost

Up next

Core Animation

This guide grows with the blog: new articles are linked here as soon as they're published. Missing something? Let me know.

← Back to all roadmaps