WWDC 2017 introduced a new concept available from iOS 11 which is persistent history tracking. It’s Apple’s answer for merging changes that come from several targets like app extensions. Whenever you change something in your Core Data database from your Share Extension, a transaction is written which can be merged into any of your other …
withAnimation completion callback with animatable modifiers
SwiftUI is great when it comes down to animations as it does a lot for you with methods like withAnimation and animation(…). You can simply pass in the things you’d like it to animate and SwiftUI will make sure your views move smoothly from one state to another. Sometimes, however, you’d like to have the …
Write-Ahead Logging (WAL) disabled to force commits in Core Data
Write-Ahead Logging is the default journaling mode for Core Data SQLite stores since iOS 7 and OS X Mavericks. Journaling in Core Data is best explained as the way data transactions are saved into the underlying SQLite store. The WAL mode is significantly faster in most scenarios compared to the previous default “rollback” journal mode …
How to combine text weights in SwiftUI
Combining multiple text weights in SwiftUI might not look straight forward at first. If you’re used to using UIKit you were probably looking into support for NSAttributedString in which you could apply different text styles for certain ranges. SwiftUI makes it possible to combine different text styles with the built-in plus (+) operator implementation. Multiple …
Adding a closure as a target to UIButton and other controls in Swift
The target-action pattern is used in combination with user interface controls as a callback to a user event. Whenever a button is pressed on a target, its action will be called. The fact that the method is not defined close to the control definition is sometimes seen as a downside and reason for a lot …
Launch screens in Xcode: All the options explained
Launch screens appear when your app starts up and give the user the impression that your app is fast and responsive. After your app is loaded it will be replaced with your app’s first screen after which the user can start using your app. Xcode creates a storyboard by default which you can use to …
ValueTransformer in Core Data explained: Storing absolute URLs
ValueTransformers in Core Data are a powerful way of transforming values before they get inserted into the database and before they get read. They’re set up in an abstract class which handles the value transformations from one representation to another. They’re often used as a way to store values that aren’t supported by default. Core …
Full-screen development with Xcode and the Simulator
While developing apps it’s important to create focus to get in your flow and speed up development. Full-screen mode can help to keep your focus without any distraction from other apps. Up until Xcode 12 full-screen support was hidden behind a user defaults flag. With the latest version of Xcode, we can now simply make …
SVG Assets in Xcode for Single Scale Images
Xcode 12 introduced support for using Scalable Vector Graphic (SVG) image assets in iOS, macOS, and iPadOS. It’s one of those changes that you might have missed during WWDC 2020 as it’s quite a small addition. Up until Xcode 12, we were able to use single scale resources by using PDF assets. It takes away …
WWDC 2020: 7 Tips to prepare yourself
In less than a week we will know what WWDC 2020 has brought to us. Apple has been working hard like every year to deliver a new Xcode, OS versions, and possibly new products. It’s like Christmas in the middle of the year if you’re developing for any of Apple’s platforms. This year is a …