View GridAccessibilityTest.swift
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
// | |
// GridAccessibilityTest.swift | |
// FrameUpExample | |
// | |
// Created by Ryan Lintott on 2023-10-22. | |
// | |
import FrameUp | |
import SwiftUI |
View LayoutThatFits.swift
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
// | |
// LayoutThatFits.swift | |
// WWDC22Experiments | |
// | |
// Created by Ryan Lintott on 2022-06-08. | |
// | |
import SwiftUI | |
struct LayoutThatFits: Layout { |
View WidgetConfiguration+disfavoredLocationsIfAvailable.swift
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
// | |
// WidgetConfiguration+extensions.swift | |
// | |
// | |
// Created by Ryan Lintott on 2023-09-11. | |
// | |
import SwiftUI | |
import WidgetKit |
View AnimatablePack.swift
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
// | |
// AnimatablePack.swift | |
// ShapeUp | |
// | |
// Created by Ryan Lintott on 2023-08-02. | |
// | |
import Foundation | |
import SwiftUI |
View CustomColorScheme.swift
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 | |
enum CustomColorScheme: Int, CaseIterable, Identifiable, Codable { | |
static var defaultKey = "customColorScheme" | |
static var defaultValue = CustomColorScheme.system | |
case system = 0 | |
case light = 1 | |
case dark = 2 | |
View Text+joined.swift
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
extension Collection where Element == Text { | |
func joined() -> Text { | |
reduce(into: Text("")) { | |
$0 = $0 + $1 | |
} | |
} | |
func joined(separator: String) -> Text { | |
joined(separator: Text(separator)) | |
} |
View PreviewState.swift
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 PreviewState<each T, Content: View>: View { | |
@State private var value: (repeat each T) | |
var content: (Binding<(repeat each T)>) -> Content | |
init( | |
_ value: repeat each T, | |
@ViewBuilder content: @escaping (Binding<(repeat each T)>) -> Content | |
) { |
View ListWithMoveUpAction.swift
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
struct ListWithMoveUpAction: View { | |
@AccessibilityFocusState private var focus: String? | |
@State private var users = ["Glenn", "Malcolm", "Nicola", "Terri"] | |
var body: some View { | |
NavigationStack { | |
List(users, id: \.self) { user in | |
Text(user) | |
.accessibilityActions { | |
Button { |
View DoubleScrollTabView.swift
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
// | |
// DoubleScrollTabView.swift | |
// FrameUpExample | |
// | |
// Created by Ryan Lintott on 2022-11-13. | |
// | |
import FrameUp | |
import SwiftUI |
NewerOlder