Skip to content

Instantly share code, notes, and snippets.

View SwiftBeta's full-sized avatar
💻

SwiftBeta SwiftBeta

💻
View GitHub Profile
@SwiftBeta
SwiftBeta / quiz_question_10_06_20232.swift
Created June 10, 2023 17:33
Snippet code SwiftBeta Quiz Questions
class CustomView: UIView {
// Override a method here
}
@SwiftBeta
SwiftBeta / quiz_question_10_06_20231.swift
Created June 10, 2023 17:33
Snippet code SwiftBeta Quiz Questions
struct ContentView: View {
// Use @State here
var body: some View {
Text("Hello, World!")
}
}
@SwiftBeta
SwiftBeta / quiz_question_10_06_20230.swift
Created June 10, 2023 17:33
Snippet code SwiftBeta Quiz Questions
class Person {
var firstName: String
var lastName: String
// Computed property goes here
}
@SwiftBeta
SwiftBeta / quiz_question_03_06_20235.swift
Created June 3, 2023 17:32
Snippet code SwiftBeta Quiz Questions
DispatchQueue.main.async {
// Update UI
}
@SwiftBeta
SwiftBeta / quiz_question_03_06_20234.swift
Created June 3, 2023 17:32
Snippet code SwiftBeta Quiz Questions
let label = UILabel()
label.text = "Hello, World!"
@SwiftBeta
SwiftBeta / quiz_question_03_06_20233.swift
Created June 3, 2023 17:32
Snippet code SwiftBeta Quiz Questions
if let unwrappedValue = optionalValue {
print(unwrappedValue)
}
@SwiftBeta
SwiftBeta / quiz_question_03_06_20232.swift
Created June 3, 2023 17:32
Snippet code SwiftBeta Quiz Questions
var optionalString: String?
@SwiftBeta
SwiftBeta / quiz_question_03_06_20231.swift
Created June 3, 2023 17:32
Snippet code SwiftBeta Quiz Questions
Button(action: {
print("Button tapped")
}) {
Text("Tap me")
}
@SwiftBeta
SwiftBeta / quiz_question_03_06_20230.swift
Created June 3, 2023 17:32
Snippet code SwiftBeta Quiz Questions
func exampleFunction() -> String {
return "Hello, World!"
}
@SwiftBeta
SwiftBeta / quiz_question_27_05_20235.swift
Created May 27, 2023 17:38
Snippet code SwiftBeta Quiz Questions
import UIKit
class MyView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}