Recent Articles

  1. Advanced Multi-window UIs on iPadOS with Drag & Drop and State Restoration
  2. 2 Jan

    WWDC 2019 saw the introduction of a new operating system - iPadOS - for iPad. The first features of iPadOS listed on Apple's webpage that distinguish it from iOS are Slide Over, Split View, Apps in Multiple Spaces, and App Exposé. All of these features are powered by iPadOS's multi-window user interface, and today we are going to explore how to leverage these features in your apps using the powerful new "scene" APIs introduced with iPadOS. You will see that with a relatively small architectural change, your app will benefit from multi-window support. With a little bit more work, your app can support multiple scenes to support the various different workflows of your power users. Let's get started! Read more…

  3. Simplifying UICollectionView Usage With UICollectionView​DiffableDataSource
  4. 11 Dec

    Both UICollectionView and UITableView received significant updates at this year's WWDC, one of which was a new way to supply said views with the data that they display. This new data-providing functionality is afforded by two new classes - UICollectionViewDiffableDataSource and UITableViewDiffableDataSource. Most of the examples of using these new classes that Apple focussed on emphasised the benefits that apply to particularly complex collection and table views where the data being displayed is frequently changed, which in the past has been a source of headaches for developers when trying to update the view to match the new data. However, we also get worthwhile improvements to our code when using UICollectionViewDiffableDataSource for simple collection views whose data isn't frequently updated in complex ways. Read more…

  5. Synchronising CALayer and UIKit Animations
  6. 26 Nov

    When building custom views on iOS with advanced and complex animations, we often have to delve in to the lower-level CALayer and CAAnimation Core Animation APIs in order to gain full control over the animations that are produced. However, the drawback of this approach is that it means our animations exist outside of the bounds of UIKit's animation API, meaning our custom views cannot be animated using UIKit's simpler block-based animation API. Instead, we have to provide separate functions on our views to allow the calling code to trigger the animations that we have provided. This adds an extra layer of complexity to our custom view's API, and makes it difficult to synchronise animations between different views. Read more…

See all of my articles.