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
struct ContentView: View { | |
@State private var translationWidth = 0.0 | |
var body: some View { | |
VStack { | |
List(0...1000, id: \.self) { | |
Text("\($0)") | |
} | |
Text("\(translationWidth)") | |
.padding(16) |
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 | |
struct ContentView: View { | |
var body: some View { | |
Button("increment") { | |
Task { | |
await CountActor.shared.increment() | |
} | |
} | |
} |
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 | |
struct ContentView: View { | |
@State private var isSheetPresented = false | |
var body: some View { | |
NavigationStack { | |
Button("Present sheet") { | |
isSheetPresented = true | |
} |
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 | |
@main | |
struct SplitMREApp: App { | |
var body: some Scene { | |
WindowGroup { | |
ContentView() | |
} | |
} |
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 | |
struct SpreadsheetView<ColumnView: View, RowView: View, ContentView: View, Column: Hashable, Row: Hashable>: View { | |
init( | |
columns: [Column], | |
rows: [Row], | |
columnWidth: CGFloat, | |
columnHeight: CGFloat, | |
rowWidth: CGFloat, | |
rowHeight: CGFloat, |
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 | |
@main | |
struct ExampleApp: App { | |
var body: some Scene { | |
WindowGroup { | |
ContentView() | |
} | |
} |
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 Observation | |
@main | |
struct TestObservableBindableApp: App { | |
@State var observableObjectModel = ObservableObjectModel() | |
@State var observableModel = ObservableModel() | |
var body: some Scene { | |
WindowGroup { |
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
#!/usr/bin/env python3 | |
import os | |
filenames = ["a", "b"] | |
codeMixed = [ | |
'someFunc(data: SomeClass(data: SomeStruct(data: SomeStruct.Nested1.Nested2(point: CGPoint(x: {}, y: {})))))', | |
'someFunc(data: .init(data: .init(data: .init(point: .init(x: {}, y: {})))))' | |
] | |
for (i, filename) in enumerate(filenames): |