Sign in

I like reading manga and writing about Swift. Check out my app, Find — look for text in real life, with outrageous speed.

With Swift, Markdown, and GitHub Pages

Image credit: Author

Most big apps have some sort of help center, also known as a “knowledge base.” You know, the “What can we help you with?” screens.

Search up “knowledge base software,” and you’ll find countless services that offer this functionality… but have you looked at their pricing?

Make your designs look great on any device

Ever since Apple released the iPhone X, using the safe area has been a must-do for developers. You don’t want your work hidden under the notch or clipped beneath the status bar or under the rounded corners, etc.

The launch of the iPhone X along with the safe area came back in 2017, so I think it’s safe to say every iOS developer knows how to use it — if not, here’s the documentation.

But sometimes you need to dive deeper. You might want the safe area present in some views but not in others — maybe a blur partially…

Music makes everything better

Photo by the author.

In 2016, Apple released an iPad version of Swift Playgrounds. Paired with an external keyboard, it’s almost as good as Xcode and a lot faster, but it’s slightly oversimplified. Sure, you can write code, but what about adding files or playing audio?

When I was coding my playground for this year’s Swift Student Challenge, I started out using my iPad. It was extremely fast. Pressing “Run My Code” would yield the result in less than a second! But I hit some snags — the most significant one being there was no way to play audio! …

Non-technical mistakes I made building my first app

Photo by Jamie Street on Unsplash

I launched my first app in April, which is three months ago. It’s still my only app. Well, I made other apps, but that was the only one I launched.

Right after the launch, there were problems. Bugs. I fixed them in a following release, 1.0.1. That release got “metadata rejected,” which for me meant my promo video violated the guidelines. I re-rendered my video and released another version quickly, 1.0.2. That was approved.

And now, after almost three months of inactivity, version 1.1.0 is here. I translated my app into Chinese. I made new screenshots and refreshed the video.

Why have two buttons when you can have one?

SwiftUI is a very new and rapidly evolving framework — which is great, but that also means it lacks lots of nice features, including touch events.

So what’s a touch event? If you’re coming from UIKit, you’re probably familiar with them. Really, they’re just a fancy way of saying “Press detected!”

However, because iPhones and iPads are advanced, multitouch-capable devices, sometimes “Press detected!” isn’t enough. You might want to detect when the user first touches down or maybe when they release … or maybe when they drag and release.

Back in the UIKit storyboard, these touch events were easy to…

It’s not as big as Big Sur, but it’s still really big

Photo by Paweł Czerwiński on Unsplash

Before SF Symbols, making icons for iOS apps used to present a major hassle for both the designer and the developer. A workflow would often look along the lines of this:

  1. Plan the icon.
  2. Design it and make sure it aligns with your app’s message.
  3. Or go online and find an icon instead…
  4. … which would probably mean purchasing a license.
  5. After all the work, you can finally embed it into your app — only to find the font weight is off and you need to tweak it.

Google’s Material Design icons have been around since 2014, and websites like…

How 17 lines of code can replace two entire files

Photo by Jonathan Kemper on Unsplash.

SwiftUI is a great way to build apps. It’s simple, concise, and fast. What’s made in UIKit can be recreated in SwiftUI with half the lines of code. What used to take weeks now only takes hours. But until today, it um still depended on UIKit.

To display a view made with SwiftUI, you had to wrap it in a UIHostingController, which had to be wrapped in a UIWindow, which had to be defined in SceneDelegate:

For a framework designed for simplicity and performance… all that code doesn’t make sense. …

It’s not magic — even though it seems to be

Hey! Just to clarify, this article is about the @State property (unique to SwiftUI) and not the general concept of state. They’re related, but state itself is just an idea while the @State property is an actual, visible, and tangible object. It’s also very versatile, almost like magic …


If you’ve been working with SwiftUI, chances are that you once made a property and tried to change its value, only to get this weird error: “Cannot assign to property: ‘self’ is immutable.”

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store