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
// | |
// AutoLayoutTestApp.swift | |
// AutoLayoutTest | |
// | |
// Created by Ryan Lintott on 2024-03-07. | |
// | |
import FrameUp | |
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
// | |
// ShrinkingLabel.swift | |
// FrameUpExample | |
// | |
// Created by Ryan Lintott on 2024-02-21. | |
// | |
import FrameUp | |
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
import SwiftUI | |
struct Theme: Identifiable { | |
let id: UUID | |
let name: String | |
} | |
extension Theme { | |
static let blue = Self(id: UUID(), name: "Blue") | |
static let red = Self(id: UUID(), name: "Red") |
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 ContentView: View { | |
var body: some View { | |
KeyboardAvoidingWithOffset() | |
.keyboardHeightEnvironmentValue() | |
} | |
} | |
struct KeyboardAvoidingWithOffset: 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
// | |
// GridAccessibilityTest.swift | |
// FrameUpExample | |
// | |
// Created by Ryan Lintott on 2023-10-22. | |
// | |
import FrameUp | |
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
// | |
// WidgetConfiguration+extensions.swift | |
// | |
// | |
// Created by Ryan Lintott on 2023-09-11. | |
// | |
import SwiftUI | |
import WidgetKit |
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)) | |
} |
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 | |
) { |
NewerOlder