Skip to content

Instantly share code, notes, and snippets.

// https://sarunw.com/posts/swiftui-circular-progress-bar/
//
// CircularProgressView.swift
// SwiftUI30WWDC2021
//
// Created by Mateo on 5/6/22.
//
//
// ContentView.swift
// SearchableFiddling
//
// Created by Mateo on 3/29/22.
//
import SwiftUI
struct SearchView: View {
//
// AnimatableNumber.swift
// SwiftUI30WWDC2021
//
// Created by Mateo on 4/19/22.
//
// https://stefanblos.com/posts/animating-number-changes/
import SwiftUI
struct TicketPurchaseError: LocalizedError {
let errorDescription: String?
let failureReason: String?
let helpAnchor: String?
let recoverySuggestion: String?
}
struct TicketForm: View {
//: [Previous](@previous)
import Foundation
struct Emoji: Hashable, Equatable, Identifiable, Codable, CustomStringConvertible {
let character: String
let name: String
let category: Category
let isNew: Bool
let zwjGroup: String? // nil for plain emoji, a String for ZWJ emoji group name (family, role, etc)
import Foundation
import _Concurrency
extension TimeInterval {
var nanoseconds: UInt64 {
UInt64(1_000_000_000.0 * self)
}
}
struct TaskTimer: AsyncSequence, AsyncIteratorProtocol {
// This demonstrate problem when .accessibilityElement(children: .combine) is used accessibility value and label
import SwiftUI
struct SomeView: View {
let value: String
init(_ value: String) {
self.value = value
}
//
// Marquee.swift
// SwiftUI30WWDC2021
//
// Created by Mateo @kingatarthur on 1/26/22.
//
import SwiftUI
precedencegroup ExponentiationPrecedence {
associativity: right
higherThan: MultiplicationPrecedence
}
infix operator ^: ExponentiationPrecedence
func ^ (_ base: Double, _ exp: Double) -> Double {
pow(base, exp)
}
//
// NumberFormatSpellOut.swift
// SwiftUI30WWDC2021
//
// Created by Mateo on 1/10/22.
//
import SwiftUI
protocol NSNumberConvertible { }