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
// replying to https://mastodon.world/@luckkerr/110684106839939474 | |
import SwiftUI | |
struct MiscellaneousAction { | |
let action: () -> Void | |
init(_ action: @escaping () -> Void) { | |
self.action = action | |
} |
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
// | |
// RemovableKeyboardShortcut.swift | |
// | |
// Created by Clarko on 2/2/21. | |
// | |
// Adds an argument to dynamically remove a keyboard shortcut | |
// | |
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
// ⚠️ As of WWDC21 you can just use a SwiftUI Material | |
// https://developer.apple.com/documentation/swiftui/material | |
// | |
// Frost.swift | |
// | |
// Created by Clarko on 7/19/20. | |
// | |
// A SwiftUI representation of UIVisualEffectView | |
// and UIBlurEffect, that handles mostly like a | |
// SwiftUI Color view. Use it as a .background() |
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
// ⚠️ As of WWDC21 you can use SwiftUI .searchable | |
// https://developer.apple.com/documentation/swiftui/list/searchable(text:placement:) | |
// | |
// SearchField.swift | |
// | |
// Created by Clarko on 7/17/20. | |
// | |
// SwiftUI doesn't have a SearchField yet, so here's one from UIKit. | |
// | |
// The isEditing binding lets you react to keyboard focus 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
// | |
// ConvenientColors.swift | |
// | |
// Created by Clarko on 7/15/20. | |
// | |
// Color.primary and Color.secondary are great for foreground text | |
// that adapts in light & dark mode, but there are a lot more | |
// UI Element Colors in iOS and macOS: | |
// | |
// https://developer.apple.com/documentation/uikit/uicolor/ui_element_colors |