Upload traib.csv
Browse files
traib.csv
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
prompt,output
|
2 |
+
Create a SwiftUI view with a button that changes text on tap,"import SwiftUI
|
3 |
+
|
4 |
+
struct ContentView: View {
|
5 |
+
@State private var text = ""Hello, World!""
|
6 |
+
|
7 |
+
var body: some View {
|
8 |
+
VStack {
|
9 |
+
Text(text)
|
10 |
+
.font(.largeTitle)
|
11 |
+
Button(""Tap me"") {
|
12 |
+
text = ""Button Tapped!""
|
13 |
+
}
|
14 |
+
.padding()
|
15 |
+
}
|
16 |
+
}
|
17 |
+
}"
|
18 |
+
Create a SwiftUI view with a TextField and a Text showing its value,"import SwiftUI
|
19 |
+
|
20 |
+
struct ContentView: View {
|
21 |
+
@State private var name = """"
|
22 |
+
|
23 |
+
var body: some View {
|
24 |
+
VStack {
|
25 |
+
TextField(""Enter your name"", text: $name)
|
26 |
+
.textFieldStyle(RoundedBorderTextFieldStyle())
|
27 |
+
.padding()
|
28 |
+
Text(""Hello, \(name)!"")
|
29 |
+
.font(.title)
|
30 |
+
}
|
31 |
+
.padding()
|
32 |
+
}
|
33 |
+
}"
|
34 |
+
Create a SwiftUI List with 5 items,"import SwiftUI
|
35 |
+
|
36 |
+
struct ContentView: View {
|
37 |
+
let items = [""Item 1"", ""Item 2"", ""Item 3"", ""Item 4"", ""Item 5""]
|
38 |
+
|
39 |
+
var body: some View {
|
40 |
+
List(items, id: \ .self) { item in
|
41 |
+
Text(item)
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}"
|
45 |
+
Create a SwiftUI view with a toggle switch,"import SwiftUI
|
46 |
+
|
47 |
+
struct ContentView: View {
|
48 |
+
@State private var isOn = false
|
49 |
+
|
50 |
+
var body: some View {
|
51 |
+
VStack {
|
52 |
+
Toggle(""Enable Feature"", isOn: $isOn)
|
53 |
+
.padding()
|
54 |
+
Text(isOn ? ""Feature is ON"" : ""Feature is OFF"")
|
55 |
+
.font(.title)
|
56 |
+
}
|
57 |
+
.padding()
|
58 |
+
}
|
59 |
+
}"
|