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
| @Observable | |
| class VM { | |
| var counter = 0 | |
| } | |
| struct ContentView: View { | |
| @State var vm = VM() | |
| var body: some View { | |
| // doesn't get executed on button tap |
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 SwiftUI | |
| import MapKit | |
| struct ContentView: View { | |
| @State var region = MKCoordinateRegion() | |
| @State var touching = false | |
| var body: some View { | |
| MapView( | |
| region: $region, |
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
| // AXError.swift | |
| import Cocoa | |
| extension AXError { | |
| var string: String { | |
| switch self { | |
| case .success: "success" | |
| case .failure: "failure" | |
| case .illegalArgument: "illegalArgument" |
OlderNewer