mirror of
https://github.com/insidegui/WWDC.git
synced 2026-04-07 19:17:41 +00:00
15 lines
448 B
Swift
15 lines
448 B
Swift
import SwiftUI
|
|
|
|
public extension View {
|
|
@ViewBuilder
|
|
func numericContentTransition(value: Double? = nil, countsDown: Bool = false) -> some View {
|
|
if let value, #available(macOS 14.0, iOS 17.0, *) {
|
|
contentTransition(.numericText(value: value))
|
|
} else if #available(macOS 13.0, iOS 16.0, *) {
|
|
contentTransition(.numericText(countsDown: countsDown))
|
|
} else {
|
|
self
|
|
}
|
|
}
|
|
}
|