Skip to content

Commit

Permalink
Release 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rchatham committed Oct 19, 2016
1 parent 355b8d2 commit 6020859
Show file tree
Hide file tree
Showing 13 changed files with 101 additions and 69 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0
10 changes: 0 additions & 10 deletions Animate.xcworkspace/contents.xcworkspacedata

This file was deleted.

19 changes: 0 additions & 19 deletions Animate/Animate.h

This file was deleted.

32 changes: 24 additions & 8 deletions Animate/Animate.swift → Sources/Animate.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Animate.swift
// VogueStore
// SwiftyAnimate
//
// Created by Reid Chatham on 10/17/16.
// Copyright © 2016 Reid Chatham. All rights reserved.
Expand Down Expand Up @@ -215,19 +215,23 @@ open class Animate {
self.perform()
}
case .wait(let timeout, let callback):
var timedout = false
timedout = false
callback {
if !timedout {
timedout = true
if !self.timedout {
self.timedout = true
self.perform()
}
}
guard let timeout = timeout else { return }
Timer.scheduledTimer(withTimeInterval: timeout, repeats: false) { timer in
if !timedout {
timedout = true
self.perform()
if #available(iOS 10.0, *) {
Timer.scheduledTimer(withTimeInterval: timeout, repeats: false) { timer in
if !self.timedout {
self.timedout = true
self.perform()
}
}
} else {
Timer.scheduledTimer(timeInterval: timeout, target: self, selector: #selector(Animate.block(_:)), userInfo: nil, repeats: false)
}
case .do(let callback):
callback()
Expand Down Expand Up @@ -263,4 +267,16 @@ open class Animate {
guard animations.dequeue() != nil else { return }
destroy()
}


// Below needed thanks to backwards compatibility. ;(
/// :nodoc:
private var timedout = false
/// :nodoc:
@objc internal func block(_ sender: Timer) {
if !timedout {
timedout = true
self.perform()
}
}
}
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions Sources/SwiftyAnimate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// SwiftyAnimate.h
// SwiftyAnimate
//
// Created by Reid Chatham on 10/18/16.
// Copyright © 2016 Reid Chatham. All rights reserved.
//

#import <UIKit/UIKit.h>

//! Project version number for SwiftyAnimate.
FOUNDATION_EXPORT double SwiftyAnimateVersionNumber;

//! Project version string for SwiftyAnimate.
FOUNDATION_EXPORT const unsigned char SwiftyAnimateVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <SwiftyAnimate/PublicHeader.h>


Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//: Playground - noun: a place where people can play

import UIKit
import Animate
import SwiftyAnimate

var str = "Hello, playground"

Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions SwiftyAnimate.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Pod::Spec.new do |spec|
spec.name = "SwiftyAnimate"
spec.version = "0.0.1"
spec.license = "MIT"
spec.homepage = "https://github.com/rchatham/SwiftyAnimate"
spec.authors = { "Reid Chatham" => "reid.chatham@gmail.com" }
spec.summary = "Swift animation"
spec.source = { :git => "https://github.com/rchatham/SwiftyAnimate.git", :tag => "#{spec.version}" }
spec.platform = :ios, "8.0"
spec.source_files = "Sources/*"
end
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
objects = {

/* Begin PBXBuildFile section */
3002F9921DB720C600FF2E53 /* Animate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3002F9901DB720C600FF2E53 /* Animate.h */; settings = {ATTRIBUTES = (Public, ); }; };
3002F9991DB720E200FF2E53 /* Animate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3002F9981DB720E200FF2E53 /* Animate.swift */; };
3002F99B1DB7210600FF2E53 /* DataStructures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3002F99A1DB7210600FF2E53 /* DataStructures.swift */; };
3002F9A21DB7F29B00FF2E53 /* SwiftyAnimate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3002F99E1DB7F29B00FF2E53 /* SwiftyAnimate.h */; settings = {ATTRIBUTES = (Public, ); }; };
3002F9A31DB7F29B00FF2E53 /* Animate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3002F99F1DB7F29B00FF2E53 /* Animate.swift */; };
3002F9A41DB7F29B00FF2E53 /* DataStructures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3002F9A01DB7F29B00FF2E53 /* DataStructures.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
3002F98D1DB720C600FF2E53 /* Animate.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Animate.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3002F9901DB720C600FF2E53 /* Animate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Animate.h; sourceTree = "<group>"; };
3002F9911DB720C600FF2E53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3002F9981DB720E200FF2E53 /* Animate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Animate.swift; sourceTree = "<group>"; };
3002F99A1DB7210600FF2E53 /* DataStructures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataStructures.swift; sourceTree = "<group>"; };
3002F98D1DB720C600FF2E53 /* SwiftyAnimate.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyAnimate.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3002F99E1DB7F29B00FF2E53 /* SwiftyAnimate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SwiftyAnimate.h; path = Sources/SwiftyAnimate.h; sourceTree = "<group>"; };
3002F99F1DB7F29B00FF2E53 /* Animate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Animate.swift; path = Sources/Animate.swift; sourceTree = "<group>"; };
3002F9A01DB7F29B00FF2E53 /* DataStructures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DataStructures.swift; path = Sources/DataStructures.swift; sourceTree = "<group>"; };
3002F9A11DB7F29B00FF2E53 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Sources/Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -34,28 +34,28 @@
3002F9831DB720C600FF2E53 = {
isa = PBXGroup;
children = (
3002F98F1DB720C600FF2E53 /* Animate */,
3002F99D1DB7F28D00FF2E53 /* Sources */,
3002F98E1DB720C600FF2E53 /* Products */,
);
sourceTree = "<group>";
};
3002F98E1DB720C600FF2E53 /* Products */ = {
isa = PBXGroup;
children = (
3002F98D1DB720C600FF2E53 /* Animate.framework */,
3002F98D1DB720C600FF2E53 /* SwiftyAnimate.framework */,
);
name = Products;
sourceTree = "<group>";
};
3002F98F1DB720C600FF2E53 /* Animate */ = {
3002F99D1DB7F28D00FF2E53 /* Sources */ = {
isa = PBXGroup;
children = (
3002F9981DB720E200FF2E53 /* Animate.swift */,
3002F99A1DB7210600FF2E53 /* DataStructures.swift */,
3002F9901DB720C600FF2E53 /* Animate.h */,
3002F9911DB720C600FF2E53 /* Info.plist */,
3002F99E1DB7F29B00FF2E53 /* SwiftyAnimate.h */,
3002F99F1DB7F29B00FF2E53 /* Animate.swift */,
3002F9A01DB7F29B00FF2E53 /* DataStructures.swift */,
3002F9A11DB7F29B00FF2E53 /* Info.plist */,
);
path = Animate;
name = Sources;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand All @@ -65,16 +65,16 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
3002F9921DB720C600FF2E53 /* Animate.h in Headers */,
3002F9A21DB7F29B00FF2E53 /* SwiftyAnimate.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
3002F98C1DB720C600FF2E53 /* Animate */ = {
3002F98C1DB720C600FF2E53 /* SwiftyAnimate */ = {
isa = PBXNativeTarget;
buildConfigurationList = 3002F9951DB720C600FF2E53 /* Build configuration list for PBXNativeTarget "Animate" */;
buildConfigurationList = 3002F9951DB720C600FF2E53 /* Build configuration list for PBXNativeTarget "SwiftyAnimate" */;
buildPhases = (
3002F9881DB720C600FF2E53 /* Sources */,
3002F9891DB720C600FF2E53 /* Frameworks */,
Expand All @@ -85,9 +85,9 @@
);
dependencies = (
);
name = Animate;
name = SwiftyAnimate;
productName = Animate;
productReference = 3002F98D1DB720C600FF2E53 /* Animate.framework */;
productReference = 3002F98D1DB720C600FF2E53 /* SwiftyAnimate.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
Expand All @@ -107,7 +107,7 @@
};
};
};
buildConfigurationList = 3002F9871DB720C600FF2E53 /* Build configuration list for PBXProject "Animate" */;
buildConfigurationList = 3002F9871DB720C600FF2E53 /* Build configuration list for PBXProject "SwiftyAnimate" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
Expand All @@ -119,7 +119,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
3002F98C1DB720C600FF2E53 /* Animate */,
3002F98C1DB720C600FF2E53 /* SwiftyAnimate */,
);
};
/* End PBXProject section */
Expand All @@ -139,8 +139,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3002F9991DB720E200FF2E53 /* Animate.swift in Sources */,
3002F99B1DB7210600FF2E53 /* DataStructures.swift in Sources */,
3002F9A31DB7F29B00FF2E53 /* Animate.swift in Sources */,
3002F9A41DB7F29B00FF2E53 /* DataStructures.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -188,7 +188,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -235,7 +235,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -257,12 +257,14 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Animate/Info.plist;
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.rchatham.Animate;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
Expand All @@ -278,20 +280,22 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Animate/Info.plist;
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.rchatham.Animate;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_VERSION = 3.0;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
3002F9871DB720C600FF2E53 /* Build configuration list for PBXProject "Animate" */ = {
3002F9871DB720C600FF2E53 /* Build configuration list for PBXProject "SwiftyAnimate" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3002F9931DB720C600FF2E53 /* Debug */,
Expand All @@ -300,7 +304,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
3002F9951DB720C600FF2E53 /* Build configuration list for PBXNativeTarget "Animate" */ = {
3002F9951DB720C600FF2E53 /* Build configuration list for PBXNativeTarget "SwiftyAnimate" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3002F9961DB720C600FF2E53 /* Debug */,
Expand Down
10 changes: 10 additions & 0 deletions SwiftyAnimate.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6020859

Please sign in to comment.