Skip to content

Commit

Permalink
Update to Swift 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonParks committed Jul 8, 2019
1 parent 61a613d commit d589ff6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Source/Classes/GIFAnimatable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -215,22 +215,22 @@ extension GIFAnimatable {
// FIXME: (?)Protocol Requirements
// (?)I opted not to make property or protocol method requirements here in order to respect GIFAnimatable's style/useage of optional methods and computed properties, as well as trying to make my contributions minimally intrusive.
// (?)However it might be worth considering having required speed, synchronization, (and/or frameLimiter?) properties in the protocol?
protocol GIFControllable: GIFAnimatable {}
public protocol GIFControllable: GIFAnimatable {}

extension GIFControllable {
public extension GIFControllable {
/// Change playback speed of animation based upon a speed multiplier.
///
/// - parameter speed: A speed multiplier where normal speed = 1.0.
/// - parameter synchronization: Indicates whether frame should be synchronized to a frameRate, and to which frameRate. Default is syncToMaximumFPS.
public func setAnimationSpeed(to speed: PlaybackSpeed, synchronization: SyncFrameRates = .syncToMaximumFPS) {
func setAnimationSpeed(to speed: PlaybackSpeed, synchronization: SyncFrameRates = .syncToMaximumFPS) {
self.animator?.changeAnimationSpeed(to: speed, synchronization: synchronization)
}

/// Change playback speed of animation based upon a new duration.
///
/// - parameter duration: New target duration (gifLoopDuration) for the animation.
/// - parameter synchronization: Indicates whether frame should be synchronized to a frameRate, and to which frameRate. Default is syncToMaximumFPS.
public func setAnimationDuration(to duration: TimeInterval, synchronization: SyncFrameRates = .syncToMaximumFPS) {
func setAnimationDuration(to duration: TimeInterval, synchronization: SyncFrameRates = .syncToMaximumFPS) {
let currentDuration = self.gifLoopDuration
let newSpeed = currentDuration / duration
self.setAnimationSpeed(to: newSpeed, synchronization: synchronization)
Expand All @@ -243,7 +243,7 @@ extension GIFControllable {
/// Set the synchronization parameter for the animator. Default is syncToMaximumFPS.
///
/// - parameter synchronization: Indicates whether frame should be synchronized to a frameRate, and to which frameRate.
public func setSynchronization(to synchronization: SyncFrameRates) {
func setSynchronization(to synchronization: SyncFrameRates) {
let maxFPS = SyncFrameRates.syncToMaximumFPS.intValue
let sync: SyncFrameRates

Expand Down
2 changes: 1 addition & 1 deletion Supporting Files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>167</string>
<string>169</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
Expand Down

0 comments on commit d589ff6

Please sign in to comment.