mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
12 lines
292 B
Swift
12 lines
292 B
Swift
class StateAnimatorGroup<State> {
|
|
func add<T: StateAnimator>(_ animator: T) where T.State == State {}
|
|
func set(_ state: State) {}
|
|
}
|
|
|
|
extension StateAnimatorGroup: StateAnimator where State == String {}
|
|
|
|
protocol StateAnimator {
|
|
associatedtype State
|
|
|
|
func set(_ state: State)
|
|
} |