Rolling Numbers Animation Using Only CALayers

I’m an iOS Engineer at Triumph Labs, where I develop TriumphSDK for game devs. Not so long ago, I got a task to completely reimplement UI and animations. One of the most interesting parts was implementing of balance view with rolling animation of the number in it.

At the first sight, it looks pretty simple, but we needed a well-configured custom solution. Of course, I checked existing libraries that I could reuse and adjust this kind of animation for our needs. After the first try, I figured out that the libraries are not so adjustable, and we cannot control the animation of each number. I won’t go into details too much. However, I decided to make my own solution from scratch.

Setting up iOS Framework for Unity

Part 1: Launch UIViewController from Unity

I won’t waste your time on a long introduction about the technologies that I will describe here. You most likely already work as an iOS Engineer or Game Developer, which means you probably have some questions regarding the topic of this article. So, let’s get started.

This article is split into two parts. In the first part, you will learn how to launch a simple UIViewController from Unity. We will force C# to understand Swift. In the second part, we will try to expand the usage of Swift in Unity and explore its limitations.

Updating SwiftUI Views From Objective-C Using MVVM

On the internet, in the Apple documentation, and on Medium, there is a ton of information about SwiftUI, how to use it from UIKit, and vice versa. But today, let’s consider a not-so-common case in real life that’s useful to reflect on non-standard situations in iOS development.

Task: Show SwiftUI view from Objective-C codebase. Moreover, when an Objective-C model should be observable, the respective SwiftUI should be updated.