Skip to content

Instantly share code, notes, and snippets.

import SwiftUI
struct ContentView: View {
@State private var spinRadians: CGFloat = .zero
@State private var tiltRadians: CGFloat = .zero
private var spin: Angle { .radians(spinRadians) }
private var tilt: Angle { .radians(tiltRadians) }
import Foundation
import Combine
protocol Initializable: RawRepresentable {
init?(rawValue: RawValue)
}
enum Person: Int, Initializable {
case andrew
}
struct ContentView: View {
@State var pictureExpanded = false
var body: some View {
VStack(alignment: .leading, spacing: 0) {
Text("Once upon a time there was a turtle named George who made friends with a giraffe at the local water park and then they went on lots of adventures together.")
Button {
withAnimation {
pictureExpanded.toggle()
import UIKit
import Combine
final class MessageConduit {
public let messageSubject = PassthroughSubject<Void, Never>()
}
/// Represents a view that will send messages, e.g. button presses.
final class SenderView: UIView {
import UIKit
protocol MessageDelegate: AnyObject {
func didPressButton() -> Void
}
/// Represents a view that will send messages, e.g. button presses.
final class SenderView<MyMessageDelegate: MessageDelegate>: UIView {
private let myButton: UIButton
import UIKit
protocol MessageDelegate: AnyObject {
func didPressButton() -> Void
}
/// Represents a view that will send messages, e.g. button presses.
final class SenderView: UIView {
private let myButton: UIButton
import UIKit
/// Represents a view that will send messages, e.g. button presses.
final class SenderView: UIView {
private let myButton: UIButton
@MainActor
init() {
self.myButton = .init()

Lab 8 FAQ

Please comment with your own questions below!

What doesn't my subplot show anything?

Check if your input array is non empty. Hint: command line argument is in Seconds

Lab 7 FAQ

Please comment with your own questions below!

Lab 6 FAQ

Please comment with your own questions below!