Implementing dark mode in your app using observers

While dark mode is now available for both tvOS and macOS, it is still not available on iOS. In this tutorial, we’ll see how to set up a custom in-app theming system which lets the user pick between light and dark mode within the app, providing an alternative to a system dark mode.

We’ll also use observers to allow view controllers and other classes to register for appearance updates, so they can update their appearance whenever the theme is changed by the user.

Adding pinch to zoom to an image view using Swift

A UIImageView is frequently used for displaying all types of images in iOS apps, but unfortunately, image views don’t support any type of zooming, such as pinch to zoom. In this tutorial, we’ll see how it’s possible to use a UIScrollView to make any image view support pinch to zoom.

As we are using a UIScrollView, the image can also be moved around after zooming, so it feels natural. After adding support for pinch to zoom, we will also add support for double tap to zoom.