This file contains hidden or 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 <UIKit/UIKit.h> | |
| typedef NS_ENUM(NSInteger, DBGInterfaceStyleOverride) { | |
| DBGInterfaceStyleOverrideNone = 0, | |
| DBGInterfaceStyleOverrideLight, | |
| DBGInterfaceStyleOverrideDark, | |
| }; | |
| #ifdef __cplusplus | |
| extern "C" { |
This file contains hidden or 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 SwiftCompilerPlugin | |
| import SwiftSyntax | |
| import SwiftSyntaxBuilder | |
| import SwiftSyntaxMacros | |
| /// Implementation of `syscall` macro, which takes an Int (the syscall number) and zero or more arguments to the syscall, and returns and Int | |
| /// It expands to include manual `dlsym`, and casting to a C function which has 7 filler arguments so that the syscall arguements are on the stack | |
| public struct SyscallMacro: ExpressionMacro { | |
| public static func expansion( | |
| of node: some FreestandingMacroExpansionSyntax, |
This file contains hidden or 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
| Style 0: <UIBlurEffect: 0x60000004c860> style=UIBlurEffectStyleExtraLight | |
| Style 1: <UIBlurEffect: 0x60000004c870> style=UIBlurEffectStyleLight | |
| Style 2: <UIBlurEffect: 0x60000004c880> style=UIBlurEffectStyleDark | |
| Style 3: <UIBlurEffect: 0x60000000ed40> style=UIBlurEffectStyleExtraDark | |
| Style 4: <UIBlurEffect: 0x60000000ed50> style=UIBlurEffectStyleRegular | |
| Style 5: <UIBlurEffect: 0x60000000ed60> style=UIBlurEffectStyleProminent | |
| Style 6: <UIBlurEffect: 0x60000004c890> style=UIBlurEffectStyleSystemUltraThinMaterial | |
| Style 7: <UIBlurEffect: 0x60000004c8a0> style=UIBlurEffectStyleSystemThinMaterial | |
| Style 8: <UIBlurEffect: 0x60000004c8b0> style=UIBlurEffectStyleSystemMaterial | |
| Style 9: <UIBlurEffect: 0x60000004c8c0> style=UIBlurEffectStyleSystemThickMaterial |
This file contains hidden or 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 | |
| #Preview { | |
| Form { | |
| Section { | |
| Button("Search on YouTube") { | |
| UIApplication.shared.open(URL(string: "youtube://results?search_query=SwiftUI")!) | |
| } | |
| Button("Search on YouTube V2") { |
This file contains hidden or 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
| // | |
| // UIScreen++.swift | |
| // UIScreen++ | |
| import SwiftUI | |
| extension UIScreen { | |
| var name: String { |
This file contains hidden or 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 | |
| import CryptoKit | |
| extension Color { | |
| public static var selectedControlColor: Color { | |
| Color(NSColor.selectedControlColor) | |
| } | |
| public static var controlAccentColor: Color { | |
| Color(NSColor.controlAccentColor) |
This file contains hidden or 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 JiggleViewModifier: ViewModifier { | |
| let amount: Double | |
| @State private var isJiggling = false | |
| func body(content: Content) -> some View { | |
| content | |
| .rotationEffect(.degrees(isJiggling ? amount : 0)) |
This file contains hidden or 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 | |
| @available(iOS 13.0, *) | |
| public extension SwiftUI.Color { | |
| // MARK: - Hex Code Color | |
| init(hex: String) { | |
| let scanner = Scanner(string: hex) | |
| _ = scanner.scanString("#") | |
| var rgb: UInt64 = 0 |
This file contains hidden or 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
| Seed: https://apps.apple.com/us/app/seed/id6449049254 | |
| Find My Certification Asst.: https://apps.apple.com/us/app/find-my-certification-asst/id1532296125 | |
| Car Keys Test: https://apps.apple.com/us/app/car-keys-tests/id1635860023 | |
| MagSafe Certification Asst.: https://apps.apple.com/us/app/magsafe-certification-asst/id1533467908 | |
| Accessory Developer Assistant: https://apps.apple.com/us/app/accessory-developer-assistant/id1635862694 |
This file contains hidden or 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 EmphasizedTextStyleDemoView: View { | |
| var body: some View { | |
| Form { | |
| Text("Emphasized Large Title") | |
| .font(Font(UIFont.preferredFont(forTextStyle: .emphasizedLargeTitle))) | |
| Text("Emphasized Title 1") |
NewerOlder