This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://sarunw.com/posts/swiftui-circular-progress-bar/ | |
// | |
// CircularProgressView.swift | |
// SwiftUI30WWDC2021 | |
// | |
// Created by Mateo on 5/6/22. | |
// | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// SearchableFiddling | |
// | |
// Created by Mateo on 3/29/22. | |
// | |
import SwiftUI | |
struct SearchView: View { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AnimatableNumber.swift | |
// SwiftUI30WWDC2021 | |
// | |
// Created by Mateo on 4/19/22. | |
// | |
// https://stefanblos.com/posts/animating-number-changes/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct TicketPurchaseError: LocalizedError { | |
let errorDescription: String? | |
let failureReason: String? | |
let helpAnchor: String? | |
let recoverySuggestion: String? | |
} | |
struct TicketForm: View { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: [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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import _Concurrency | |
extension TimeInterval { | |
var nanoseconds: UInt64 { | |
UInt64(1_000_000_000.0 * self) | |
} | |
} | |
struct TaskTimer: AsyncSequence, AsyncIteratorProtocol { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Marquee.swift | |
// SwiftUI30WWDC2021 | |
// | |
// Created by Mateo @kingatarthur on 1/26/22. | |
// | |
import SwiftUI | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precedencegroup ExponentiationPrecedence { | |
associativity: right | |
higherThan: MultiplicationPrecedence | |
} | |
infix operator ^: ExponentiationPrecedence | |
func ^ (_ base: Double, _ exp: Double) -> Double { | |
pow(base, exp) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NumberFormatSpellOut.swift | |
// SwiftUI30WWDC2021 | |
// | |
// Created by Mateo on 1/10/22. | |
// | |
import SwiftUI | |
protocol NSNumberConvertible { } |