Skip to content

Instantly share code, notes, and snippets.

View SwiftBeta's full-sized avatar
💻

SwiftBeta SwiftBeta

💻
View GitHub Profile
@SwiftBeta
SwiftBeta / quiz_question_24_06_20230.swift
Created June 24, 2023 17:32
Snippet code SwiftBeta Quiz Questions
var optionalVar: String?
@SwiftBeta
SwiftBeta / quiz_question_17_06_20235.swift
Created June 17, 2023 17:32
Snippet code SwiftBeta Quiz Questions
struct ContentView: View {
var body: some View {
Text("Hello, World!").font(.largeTitle)
}
}
@SwiftBeta
SwiftBeta / quiz_question_17_06_20234.swift
Created June 17, 2023 17:32
Snippet code SwiftBeta Quiz Questions
protocol MyDelegate: AnyObject {
func myFunction()
}
class MyClass {
weak var delegate: MyDelegate?
}
@SwiftBeta
SwiftBeta / quiz_question_17_06_20233.swift
Created June 17, 2023 17:32
Snippet code SwiftBeta Quiz Questions
func myFunction() -> String? {
return "Hello, World!"
}
@SwiftBeta
SwiftBeta / quiz_question_17_06_20232.swift
Created June 17, 2023 17:32
Snippet code SwiftBeta Quiz Questions
class MyViewController: UIViewController {
@IBOutlet weak var label: UILabel!
}
@SwiftBeta
SwiftBeta / quiz_question_17_06_20231.swift
Created June 17, 2023 17:32
Snippet code SwiftBeta Quiz Questions
struct MyCustomView: View {
var body: some View {
Text("Hello, World!")
}
}
@SwiftBeta
SwiftBeta / quiz_question_17_06_20230.swift
Created June 17, 2023 17:32
Snippet code SwiftBeta Quiz Questions
struct MyStruct {
var property: String
}
@SwiftBeta
SwiftBeta / quiz_question_10_06_20235.swift
Created June 10, 2023 17:33
Snippet code SwiftBeta Quiz Questions
// Declare the DataModel here
@SwiftBeta
SwiftBeta / quiz_question_10_06_20234.swift
Created June 10, 2023 17:33
Snippet code SwiftBeta Quiz Questions
let array = [1, 2, 3, 4, 5]
// Use map here
@SwiftBeta
SwiftBeta / quiz_question_10_06_20233.swift
Created June 10, 2023 17:33
Snippet code SwiftBeta Quiz Questions
// Declare the function here