Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
import Foundation | |
public protocol CodingStrategy { | |
associatedtype Converted | |
associatedtype RawValue: Codable | |
static func toRaw(_ value: Converted) throws -> RawValue | |
static func toValue(_ raw: RawValue) throws -> Converted | |
} |
struct User: Equatable { | |
var firstName: String | |
var lastName: String | |
} | |
@main | |
struct MyApp: App { | |
@State var value = User(firstName: "", lastName: "") | |
@State var showEdit = false |
Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
import Darwin | |
import Foundation | |
import UIKit | |
// https://github.com/xybp888/iOS-SDKs/blob/master/iPhoneOS17.1.sdk/System/Library/PrivateFrameworks/CoreSVG.framework/CoreSVG.tbd | |
// https://developer.limneos.net/index.php?ios=17.1&framework=UIKitCore.framework&header=UIImage.h | |
@objc | |
class CGSVGDocument: NSObject { } |
struct SizePreferenceKey: PreferenceKey { | |
static var defaultValue: CGSize = .zero | |
static func reduce(value: inout CGSize, nextValue: () -> CGSize) { | |
value = nextValue() | |
} | |
} | |
struct RelativeSizeModifier: ViewModifier { | |
let percentWidth: CGFloat |
import SwiftUI | |
extension View { | |
public func discover<T: UIView>( | |
tag: Int = .random(in: (.min)...(.max)), | |
where predicate: @escaping (T) -> Bool = { _ in true }, | |
_ closure: @escaping (T) -> Void | |
) -> some View { | |
self.overlay( | |
DiscoveryView(tag: tag) |
import Combine | |
import SwiftUI | |
extension View { | |
public func focused<T>(file: StaticString = #file, _ state: FocusState<T>, equals value: T) -> some View { | |
modifier(FocusedModifier(state: state, id: value, file: file)) | |
} | |
} | |
@propertyWrapper |
A collection of all of the various options and styles available to you if you'd like to format data into string on iOS 15.
See every option in detail at fuckingformatstyle.com or goshdarnformatstyle.com.
import SwiftUI | |
struct Light: View { | |
var body: some View { | |
Circle() | |
.overlay(rings) | |
.overlay( | |
Circle() | |
.fill(gradient) | |
.alignmentGuide(VerticalAlignment.center, computeValue: { $0.height/10 }) |