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 Combine | |
import SwiftUI | |
struct SnapPointPreferenceData { | |
let frame: Anchor<CGRect> | |
} | |
struct SnapPointPreferenceKey: PreferenceKey { | |
typealias Value = SnapPointPreferenceData? | |
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
@resultBuilder | |
public struct ArrayBuilder<Element> { | |
public static func buildPartialBlock(first: Element) -> [Element] { [first] } | |
public static func buildPartialBlock(first: [Element]) -> [Element] { first } | |
public static func buildPartialBlock(accumulated: [Element], next: Element) -> [Element] { accumulated + [next] } | |
public static func buildPartialBlock(accumulated: [Element], next: [Element]) -> [Element] { accumulated + next } | |
// Empty Case | |
public static func buildBlock() -> [Element] { [] } | |
// If/Else |
OlderNewer