Profiling SwiftUI app using Instruments

Xcode comes with a bunch of tools you need to build, debug and release your apps. One of these tools is the Instruments app. The Instruments app is a great tool for profiling your iOS apps. It provides many profiling templates for debugging Core Data, catching memory leaks, disk read/writes, and much more. This week we will learn how to profile SwiftUI apps using the SwiftUI template.

AnimatableModifier in SwiftUI

I have already talked about animations in SwiftUI many times on this blog. But still didn’t cover all the opportunities in terms of animation. Today I want to fill another gap and talk to you about the AnimatableModifier protocol that opens new horizons for animations.

Labels in SwiftUI

We often underestimate the power of simple things. The same feelings I had during the first usage of Label view in SwiftUI. It looks straightforward, but it hides many use cases where it works great. Today we will talk about the Label view and its customization capabilities.

Hero animations in SwiftUI

Animation is one of the powerful features of SwiftUI. I was shocked when I saw how easy we could animate changes in view hierarchy by simply mutating @State properties and attaching animation modifiers. This week we will talk about another animation type called hero animation. We will learn how we can implement hero animations using the new matchedGeometryEffect view modifier.

Styling custom SwiftUI views using environment

One of my favorite features of SwiftUI is styling. I love the idea of style protocols provided by every view and sharing them using the environment. I have already covered most of the style protocols for SwiftUI provided views in my previous posts. But what about custom views? This week we will learn how to share styling using environment for our custom views.

Focus management in SwiftUI

WWDC 20 brings us tons of new SwiftUI APIs, which we can use to improve our apps user experience without using UIKit. One of these new APIs was the focus management API that we can use on iOS, macOS, tvOS, and watchOS. This week we will talk about SwiftUI functionality that allows us to manage the focus in our apps.

Commands in SwiftUI

This week we will talk about another new API that Apple released this year during WWDC 20. Replacing AppDelegate with the new SwiftUI App Lifecycle brings us tons of new APIs that we can use to replace old functionality with a brand new declarative API. One of those APIs is commands, which we will cover today.

Keyboard shortcuts in SwiftUI

This year Apple released the new App Lifecycle API for SwiftUI, which brings tons of new modifiers to replace AppDelegate callbacks. I have already covered most of them in previous posts. This week, we will discuss the new keyboardShortcut modifier, which allows us to assign a shortcut to any interacting view.

How to use GeometryReader without breaking SwiftUI layout

Usually, I try to avoid GeometryReader as much as I can. But sometimes, we need it to build our custom view. This week we will talk about GeometryReader. The view that allows us to read its geometry and layout child views manually.

The magic of redacted modifier in SwiftUI

Redacted modifier is the thing that will have a great impact on how iOS apps handle loading states. During WWDC20, Apple showed us the easy way of hiding the data from home-screen widgets using the redacted modifier. Today we will talk about using the redacted modifier to hide sensitive data and handle loading states.