This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
/// | |
///Declaration | |
/// | |
protocol UIViewBuilder: AnyObject {} | |
extension UIViewBuilder where Self: UIView { | |
init(_ build: ((Self) -> Void)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modified version of ContentView.swift from Pol Piella's blog | |
// post "Using Core Data and Swift Data side by side". | |
// | |
// See: https://www.polpiella.dev/core-data-and-swift-data | |
// | |
// Crux is in the `onAppear`. | |
// ``` | |
// .onAppear() { | |
// NotificationCenter.default.addObserver(forName: Notification.Name.NSManagedObjectContextDidSave, | |
// object: nil, |
OlderNewer