-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added errors for unavailable structs and methods
- Loading branch information
1 parent
439f10b
commit 4705b4a
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Foundation | ||
|
||
@available( | ||
*, unavailable, | ||
message: "Loop convenience struct has been removed following type checking changes in Swift 5.8. Use a for-loops or the sequence extension method `mapSequence()` or `mapGroup()` instead" | ||
) | ||
/// Loop through a sequence or for a specified repeat count to easily repeat multiple animation. | ||
/// - Warning: This struct is no longer available. The same functionality can be achieved by using `for`-loop or the methods `mapSequence()` and `mapGroup()` on any Swift Sequence. | ||
public struct Loop: SequenceAnimatable, GroupAnimatable { | ||
public var duration: TimeInterval = 0 | ||
public init( | ||
for repeatCount: Int, | ||
@SequenceBuilder animations builder: (_ index: Int) -> [SequenceAnimatable] | ||
) { } | ||
|
||
public static func through<S: Swift.Sequence>( | ||
_ sequence: S, | ||
@SequenceBuilder animations builder: (S.Element) -> [SequenceAnimatable] | ||
) -> [SequenceAnimatable] { | ||
[] | ||
} | ||
|
||
public static func through<S: Swift.Sequence>( | ||
_ sequence: S, | ||
@SequenceBuilder animations builder: (S.Element) -> [GroupAnimatable] | ||
) -> [GroupAnimatable] { | ||
[] | ||
} | ||
} |
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