Replacing attributed text in UITextView with UndoManager supportWhen working on apps with text editing capabilities, a must have feature is to allow users to undo their changes, UITextViews makes this easier via the undoManager property. Text changes performed with the replaceRange:withText: are automatically reg...Jan 1, 2024 · 1 min readandresandswift.com
Observing CoreData fetch request results from view models in SwiftUICoreData and SwiftData provide property wrappers that allow us to react to data changes (@FetchRequest and @Query respectively) unfortunately, if you want to move away the data handling from the view as it's the case with MVVM, you won't be able to u...Dec 29, 2023 · 2 min readandresandswift.com
NavigationSplitView and MVVM in SwiftUISwiftUI's NavigationSplitView is a great choice when looking for a navigation container for your app, this is especially true if you are targeting multiple form platforms. On iPhone, the NavigationSplitView folds its views and presents them similarly...Dec 28, 2023 · 3 min readandresandswift.com