MCES10-Software/SwiftUI-Code-Examples
SwiftUI Code Solutions Dataset Created by MCES10 Software has SwiftUI Code Problems and can be used for AI training for Code Generation Recommendations Train your LLM on the Swift and SwiftUI Framework Syntax before training it this Fine Tune or Train Effectively at optimal Epochs and Learning Rates Use the whole dataset for training Your Model may need to be Prompt Tuned for the best performance but it isn't required. Use test when testing or trialing the… See the full description on the dataset page: https://huggingface.co/datasets/MCES10-Software/SwiftUI-Code-Examples.
346
1prompt,output2Create a SwiftUI view with a button that changes text on tap,"import SwiftUI3 4struct 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}"18Create a SwiftUI view with a TextField and a Text showing its value,"import SwiftUI19 20struct 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}"34Create a SwiftUI List with 5 items,"import SwiftUI35 36struct 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 in41 Text(item)42 }43 }44}"45Create a SwiftUI view with a toggle switch,"import SwiftUI46 47struct ContentView: View {48 @State private var isOn = false49 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}"60 