From a965f870ff007ccce75a2c8407dd445fe7a52ac5 Mon Sep 17 00:00:00 2001
From: Joe Mattiello
Date: Sat, 25 Apr 2020 18:55:10 -0400
Subject: [PATCH 01/25] Squashed commit of the following:
commit daae5be93d72384b44154f688bc004ed2895bb26
Author: Joe Mattiello
Date: Tue Apr 21 21:45:42 2020 -0400
Update docs/UsageGuide.md
Resolve conflicts
commit 2478d8e1e3ef50c28eda16b6d21abecf8cc126dc
Author: nrgbistro <35301702+nrgbistro@users.noreply.github.com>
Date: Thu Jan 31 13:37:42 2019 -0500
Update UsageGuide.md
---
docs/UsageGuide.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 docs/UsageGuide.md
diff --git a/docs/UsageGuide.md b/docs/UsageGuide.md
new file mode 100644
index 00000000..1461fd3c
--- /dev/null
+++ b/docs/UsageGuide.md
@@ -0,0 +1,60 @@
+# Usage
+
+## Storyboard
+
+1. In the Identity Inspector, for every pair of source/destination views, give each one the same `HeroID` attribute.
+2. For any other views that you would like to animate, specify animation effects in the `Hero Modifier String` attribute.
+3. Also in the Identity Inspector, enable Hero Transition on your destination view controller.
+
+## In Code
+
+1. Before doing a transition, set the desired `heroID` and `heroModifiers` to both your source and destination views.
+2. Enable Hero for the destination view controller
+
+ ```swift
+ viewController.hero.isEnabled = true
+ ```
+
+### UINavigationController & UITabBarController
+
+Hero also supports transitions within a navigation controller or a tab bar controller—just set the 'hero.isEnabled' attribute to true on the UINavigationController/UITabBarController instance.
+
+## Attributes
+
+There are two important attributes to understand: `heroID` and `heroModifiers`. These are implemented as extensions (using associated objects) for `UIView`. Therefore, after the Hero library is imported, every `UIView` will have these two attributes.
+
+| Attribute Name | Description |
+| --- | --- |
+| `heroID` | Identifier for the view. Hero will automatically transition between views with the same `heroID` |
+| `hero.modifiers` | Specifies the extra animations performed alongside the main transition. |
+
+## HeroID
+
+`heroID` is the identifier for the view. When doing a transition between two view controllers, Hero will search through all subviews for both controllers, and match any views with the same `heroID`. Whenever a pair is discovered, Hero will automatically transit the views from source state to destination state.
+
+## HeroModifiers
+
+Use `hero.modifiers` to specify animations alongside the main transition. Checkout [HeroModifier.swift](https://github.com/lkzhao/Hero/blob/master/Sources/HeroModifier.swift) for available modifiers.
+
+#### For example, to achieve the following effect, set the `hero.modifiers` to be
+
+```swift
+view.hero.modifiers = [.fade, .translate(x:0, y:-250), .rotate(x:-1.6), .scale(1.5)]
+```
+
+
+
+
+Note: For matched views, the target view's heroModifier will be used. The source view's heroModifier will be ignored. When dismissing, the target view is the presentingViewController's view and the source view is the presentedViewController's view.
+
+## HeroModifierString
+
+This is a string value. It provides another way to set `hero.modifiers`. It can be accessed through the storyboard.
+
+It must be in the following syntax:
+
+```swift
+modifier1() modifier2(parameter1) modifier3(parameter1, parameter2) ...
+```
+
+Parameters must be between a pair of parentheses, separated by a comma, and each modifier must be separated by a space. Not all modifiers are settable this way.
From c86e98362a8b53642b98dff435fdd06d1d8b5964 Mon Sep 17 00:00:00 2001
From: nrgbistro <35301702+nrgbistro@users.noreply.github.com>
Date: Sat, 25 Apr 2020 18:57:20 -0400
Subject: [PATCH 02/25] Update UsageGuide.md (#576)
* Update UsageGuide.md
* Update docs/UsageGuide.md
Co-authored-by: Joe Mattiello
From c70b471eeb91c5ac72d9d8e99affb9fbe0748b81 Mon Sep 17 00:00:00 2001
From: Arnaud Dorgans
Date: Wed, 30 May 2018 00:05:50 +0200
Subject: [PATCH 03/25] fix keyboard transition
---
Sources/Transition/HeroTransition+Start.swift | 1 +
1 file changed, 1 insertion(+)
diff --git a/Sources/Transition/HeroTransition+Start.swift b/Sources/Transition/HeroTransition+Start.swift
index f2763820..d4cf457f 100644
--- a/Sources/Transition/HeroTransition+Start.swift
+++ b/Sources/Transition/HeroTransition+Start.swift
@@ -91,6 +91,7 @@ extension HeroTransition {
// a view to hold all the animating views
container = UIView(frame: transitionContainer?.bounds ?? .zero)
+ container.isUserInteractionEnabled = false
if !toOverFullScreen && !fromOverFullScreen {
container.backgroundColor = containerColor
}
From 6390a80b5c29f3ccd60e9e2c76ece04b6fe9dcac Mon Sep 17 00:00:00 2001
From: Oleh Stasula
Date: Mon, 29 Jun 2020 14:51:54 +0200
Subject: [PATCH 04/25] Fix no such module UIKit
---
Sources/Animator/HeroAnimatorViewContext.swift | 4 ++++
Sources/Animator/HeroCoreAnimationViewContext.swift | 4 ++++
Sources/Animator/HeroDefaultAnimator.swift | 4 ++++
Sources/Animator/HeroViewPropertyViewContext.swift | 4 ++++
Sources/Debug Plugin/HeroDebugPlugin.swift | 4 +++-
Sources/Debug Plugin/HeroDebugView.swift | 3 ++-
Sources/Extensions/Array+HeroModifier.swift | 4 ++++
Sources/Extensions/CALayer+Hero.swift | 4 ++++
Sources/Extensions/CAMediaTimingFunction+Hero.swift | 4 ++++
Sources/Extensions/UIColor+HexString.swift | 4 ++++
Sources/Extensions/UIKit+Hero.swift | 4 ++++
Sources/Extensions/UIView+Hero.swift | 4 ++++
Sources/Extensions/UIViewController+Hero.swift | 4 ++++
Sources/HeroContext.swift | 4 ++++
Sources/HeroModifier+Advanced.swift | 4 ++++
Sources/HeroModifier+HeroStringConvertible.swift | 4 ++++
Sources/HeroModifier.swift | 4 ++++
Sources/HeroPlugin.swift | 4 ++++
Sources/HeroTargetState.swift | 5 +++++
Sources/HeroTypes.swift | 4 ++++
Sources/HeroViewControllerDelegate.swift | 4 ++++
Sources/Parser/HeroStringConvertible.swift | 4 ++++
Sources/Preprocessors/BasePreprocessor.swift | 4 ++++
Sources/Preprocessors/CascadePreprocessor.swift | 4 ++++
Sources/Preprocessors/ConditionalPreprocessor.swift | 4 ++++
Sources/Preprocessors/DefaultAnimationPreprocessor.swift | 4 ++++
.../Preprocessors/IgnoreSubviewModifiersPreprocessor.swift | 4 ++++
Sources/Preprocessors/MatchPreprocessor.swift | 4 ++++
Sources/Preprocessors/SourcePreprocessor.swift | 4 ++++
Sources/SwiftSupport.swift | 4 +++-
Sources/Transition/HeroProgressRunner.swift | 4 ++++
Sources/Transition/HeroTransition+Animate.swift | 4 ++++
Sources/Transition/HeroTransition+Complete.swift | 4 ++++
Sources/Transition/HeroTransition+CustomTransition.swift | 4 ++++
Sources/Transition/HeroTransition+Interactive.swift | 4 ++++
Sources/Transition/HeroTransition+Start.swift | 4 ++++
.../HeroTransition+UINavigationControllerDelegate.swift | 4 ++++
.../HeroTransition+UITabBarControllerDelegate.swift | 4 ++++
...eroTransition+UIViewControllerTransitioningDelegate.swift | 4 ++++
Sources/Transition/HeroTransition.swift | 4 ++++
40 files changed, 157 insertions(+), 3 deletions(-)
diff --git a/Sources/Animator/HeroAnimatorViewContext.swift b/Sources/Animator/HeroAnimatorViewContext.swift
index 7828d468..0f2e199c 100644
--- a/Sources/Animator/HeroAnimatorViewContext.swift
+++ b/Sources/Animator/HeroAnimatorViewContext.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
internal class HeroAnimatorViewContext {
@@ -69,3 +71,5 @@ internal class HeroAnimatorViewContext {
self.appearing = appearing
}
}
+
+#endif
diff --git a/Sources/Animator/HeroCoreAnimationViewContext.swift b/Sources/Animator/HeroCoreAnimationViewContext.swift
index 8ea7990c..b402170c 100644
--- a/Sources/Animator/HeroCoreAnimationViewContext.swift
+++ b/Sources/Animator/HeroCoreAnimationViewContext.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
extension CALayer {
@@ -456,3 +458,5 @@ internal class HeroCoreAnimationViewContext: HeroAnimatorViewContext {
return animate(delay: targetState.delay, duration: duration)
}
}
+
+#endif
diff --git a/Sources/Animator/HeroDefaultAnimator.swift b/Sources/Animator/HeroDefaultAnimator.swift
index 68a787a3..e61bf5e7 100644
--- a/Sources/Animator/HeroDefaultAnimator.swift
+++ b/Sources/Animator/HeroDefaultAnimator.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
internal extension UIView {
@@ -137,3 +139,5 @@ internal class HeroDefaultAnimator: HeroAn
viewContexts.removeAll()
}
}
+
+#endif
diff --git a/Sources/Animator/HeroViewPropertyViewContext.swift b/Sources/Animator/HeroViewPropertyViewContext.swift
index fffd62e5..b20d3641 100644
--- a/Sources/Animator/HeroViewPropertyViewContext.swift
+++ b/Sources/Animator/HeroViewPropertyViewContext.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
@available(iOS 10, tvOS 10, *)
@@ -72,3 +74,5 @@ internal class HeroViewPropertyViewContext: HeroAnimatorViewContext {
return duration
}
}
+
+#endif
diff --git a/Sources/Debug Plugin/HeroDebugPlugin.swift b/Sources/Debug Plugin/HeroDebugPlugin.swift
index 148814d8..07a0c324 100644
--- a/Sources/Debug Plugin/HeroDebugPlugin.swift
+++ b/Sources/Debug Plugin/HeroDebugPlugin.swift
@@ -20,9 +20,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit) && os(iOS)
+
import UIKit
-#if os(iOS)
public class HeroDebugPlugin: HeroPlugin {
public static var showOnTop: Bool = false
@@ -176,4 +177,5 @@ extension HeroDebugPlugin: HeroDebugViewDelegate {
hero.container.layer.sublayerTransform = t
}
}
+
#endif
diff --git a/Sources/Debug Plugin/HeroDebugView.swift b/Sources/Debug Plugin/HeroDebugView.swift
index 21af2bb9..fc3de27d 100644
--- a/Sources/Debug Plugin/HeroDebugView.swift
+++ b/Sources/Debug Plugin/HeroDebugView.swift
@@ -20,9 +20,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit) && os(iOS)
+
import UIKit
-#if os(iOS)
protocol HeroDebugViewDelegate: class {
func onProcessSliderChanged(progress: Float)
func onPerspectiveChanged(translation: CGPoint, rotation: CGFloat, scale: CGFloat)
diff --git a/Sources/Extensions/Array+HeroModifier.swift b/Sources/Extensions/Array+HeroModifier.swift
index 8b6e3beb..caf3109c 100644
--- a/Sources/Extensions/Array+HeroModifier.swift
+++ b/Sources/Extensions/Array+HeroModifier.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
internal extension Array {
@@ -57,3 +59,5 @@ internal extension Array where Element: ExprNode {
return nil
}
}
+
+#endif
diff --git a/Sources/Extensions/CALayer+Hero.swift b/Sources/Extensions/CALayer+Hero.swift
index 642da1a3..a8ceb738 100644
--- a/Sources/Extensions/CALayer+Hero.swift
+++ b/Sources/Extensions/CALayer+Hero.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
internal extension CALayer {
@@ -49,3 +51,5 @@ internal extension CALayer {
}
}
}
+
+#endif
diff --git a/Sources/Extensions/CAMediaTimingFunction+Hero.swift b/Sources/Extensions/CAMediaTimingFunction+Hero.swift
index 3e093e0b..f7efd2af 100644
--- a/Sources/Extensions/CAMediaTimingFunction+Hero.swift
+++ b/Sources/Extensions/CAMediaTimingFunction+Hero.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
import QuartzCore
@@ -62,3 +64,5 @@ public extension CAMediaTimingFunction {
}
}
}
+
+#endif
diff --git a/Sources/Extensions/UIColor+HexString.swift b/Sources/Extensions/UIColor+HexString.swift
index 2a6092c5..a4a693f9 100644
--- a/Sources/Extensions/UIColor+HexString.swift
+++ b/Sources/Extensions/UIColor+HexString.swift
@@ -6,6 +6,8 @@
// Copyright © 2019 Luke Zhao. All rights reserved.
//
+#if canImport(UIKit)
+
import UIKit
extension UIColor {
@@ -31,3 +33,5 @@ extension UIColor {
)
}
}
+
+#endif
diff --git a/Sources/Extensions/UIKit+Hero.swift b/Sources/Extensions/UIKit+Hero.swift
index b76ff13b..a3aa0230 100644
--- a/Sources/Extensions/UIKit+Hero.swift
+++ b/Sources/Extensions/UIKit+Hero.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
private let parameterRegex = "(?:\\-?\\d+(\\.?\\d+)?)|\\w+"
@@ -54,3 +56,5 @@ internal extension UIColor {
return components.a
}
}
+
+#endif
diff --git a/Sources/Extensions/UIView+Hero.swift b/Sources/Extensions/UIView+Hero.swift
index 95cbb6e6..18181789 100644
--- a/Sources/Extensions/UIView+Hero.swift
+++ b/Sources/Extensions/UIView+Hero.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
class SnapshotWrapperView: UIView {
@@ -194,3 +196,5 @@ public extension UIView {
set { hero.storedAlpha = newValue }
}
}
+
+#endif
diff --git a/Sources/Extensions/UIViewController+Hero.swift b/Sources/Extensions/UIViewController+Hero.swift
index 97d6aea8..0fe09443 100644
--- a/Sources/Extensions/UIViewController+Hero.swift
+++ b/Sources/Extensions/UIViewController+Hero.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
internal class HeroViewControllerConfig: NSObject {
@@ -379,3 +381,5 @@ extension UIViewController {
hero.replaceViewController(with: next)
}
}
+
+#endif
diff --git a/Sources/HeroContext.swift b/Sources/HeroContext.swift
index 6edf570b..f1e1adc7 100644
--- a/Sources/HeroContext.swift
+++ b/Sources/HeroContext.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
public class HeroContext {
@@ -402,3 +404,5 @@ extension HeroContext {
public protocol HeroCustomSnapshotView {
var heroSnapshot: UIView? { get }
}
+
+#endif
diff --git a/Sources/HeroModifier+Advanced.swift b/Sources/HeroModifier+Advanced.swift
index eb385d99..76dee9e2 100644
--- a/Sources/HeroModifier+Advanced.swift
+++ b/Sources/HeroModifier+Advanced.swift
@@ -21,6 +21,8 @@
// THE SOFTWARE.
//
+#if canImport(UIKit)
+
// advance modifiers
extension HeroModifier {
/**
@@ -130,3 +132,5 @@ extension HeroModifier {
targetState.useScaleBasedSizeChange = true
}
}
+
+#endif
diff --git a/Sources/HeroModifier+HeroStringConvertible.swift b/Sources/HeroModifier+HeroStringConvertible.swift
index 898a5656..50ffe640 100644
--- a/Sources/HeroModifier+HeroStringConvertible.swift
+++ b/Sources/HeroModifier+HeroStringConvertible.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
/// used to construct HeroModifier from heroModifierString
@@ -122,3 +124,5 @@ extension HeroModifier: HeroStringConvertible {
return nil
}
}
+
+#endif
diff --git a/Sources/HeroModifier.swift b/Sources/HeroModifier.swift
index ad912722..7b69eb4b 100644
--- a/Sources/HeroModifier.swift
+++ b/Sources/HeroModifier.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
public final class HeroModifier {
@@ -497,3 +499,5 @@ extension HeroModifier {
return .when({ !$0.isAppearing }, modifiers)
}
}
+
+#endif
diff --git a/Sources/HeroPlugin.swift b/Sources/HeroPlugin.swift
index d46296c8..4636fa66 100644
--- a/Sources/HeroPlugin.swift
+++ b/Sources/HeroPlugin.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
open class HeroPlugin: NSObject, HeroPreprocessor, HeroAnimator {
@@ -169,3 +171,5 @@ internal extension HeroTransition {
}
}
}
+
+#endif
diff --git a/Sources/HeroTargetState.swift b/Sources/HeroTargetState.swift
index 5fff5e4d..f2ae0c2b 100644
--- a/Sources/HeroTargetState.swift
+++ b/Sources/HeroTargetState.swift
@@ -20,6 +20,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
+import QuartzCore
import UIKit
public enum HeroSnapshotType {
@@ -127,3 +130,5 @@ extension HeroTargetState: ExpressibleByArrayLiteral {
append(contentsOf: elements)
}
}
+
+#endif
diff --git a/Sources/HeroTypes.swift b/Sources/HeroTypes.swift
index 675f9abf..7949cc62 100644
--- a/Sources/HeroTypes.swift
+++ b/Sources/HeroTypes.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
public protocol HeroPreprocessor: class {
@@ -46,3 +48,5 @@ public protocol HeroProgressUpdateObserver: class {
public enum HeroViewOrderingStrategy {
case auto, sourceViewOnTop, destinationViewOnTop
}
+
+#endif
diff --git a/Sources/HeroViewControllerDelegate.swift b/Sources/HeroViewControllerDelegate.swift
index 3bd84436..d218c00c 100644
--- a/Sources/HeroViewControllerDelegate.swift
+++ b/Sources/HeroViewControllerDelegate.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
@objc public protocol HeroViewControllerDelegate {
@@ -56,3 +58,5 @@ internal extension HeroTransition {
}
}
}
+
+#endif
diff --git a/Sources/Parser/HeroStringConvertible.swift b/Sources/Parser/HeroStringConvertible.swift
index cbfadab5..312a413f 100644
--- a/Sources/Parser/HeroStringConvertible.swift
+++ b/Sources/Parser/HeroStringConvertible.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
public protocol HeroStringConvertible {
@@ -51,3 +53,5 @@ extension String {
return parse()?.last
}
}
+
+#endif
diff --git a/Sources/Preprocessors/BasePreprocessor.swift b/Sources/Preprocessors/BasePreprocessor.swift
index 88cf8170..6bb0d575 100644
--- a/Sources/Preprocessors/BasePreprocessor.swift
+++ b/Sources/Preprocessors/BasePreprocessor.swift
@@ -22,6 +22,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
class BasePreprocessor: HeroPreprocessor {
@@ -32,3 +34,5 @@ class BasePreprocessor: HeroPreprocessor {
func process(fromViews: [UIView], toViews: [UIView]) {}
}
+
+#endif
diff --git a/Sources/Preprocessors/CascadePreprocessor.swift b/Sources/Preprocessors/CascadePreprocessor.swift
index d3d40a13..22f9f694 100644
--- a/Sources/Preprocessors/CascadePreprocessor.swift
+++ b/Sources/Preprocessors/CascadePreprocessor.swift
@@ -22,6 +22,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
public enum CascadeDirection {
@@ -136,3 +138,5 @@ class CascadePreprocessor: BasePreprocessor {
}
}
}
+
+#endif
diff --git a/Sources/Preprocessors/ConditionalPreprocessor.swift b/Sources/Preprocessors/ConditionalPreprocessor.swift
index 980dfd77..c471252a 100644
--- a/Sources/Preprocessors/ConditionalPreprocessor.swift
+++ b/Sources/Preprocessors/ConditionalPreprocessor.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
public struct HeroConditionalContext {
@@ -89,3 +91,5 @@ class ConditionalPreprocessor: BasePreprocessor {
}
}
}
+
+#endif
diff --git a/Sources/Preprocessors/DefaultAnimationPreprocessor.swift b/Sources/Preprocessors/DefaultAnimationPreprocessor.swift
index 048af948..06feb0f9 100644
--- a/Sources/Preprocessors/DefaultAnimationPreprocessor.swift
+++ b/Sources/Preprocessors/DefaultAnimationPreprocessor.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
public enum HeroDefaultAnimationType {
@@ -378,3 +380,5 @@ class DefaultAnimationPreprocessor: BasePreprocessor {
}
}
}
+
+#endif
diff --git a/Sources/Preprocessors/IgnoreSubviewModifiersPreprocessor.swift b/Sources/Preprocessors/IgnoreSubviewModifiersPreprocessor.swift
index 7d601b7d..096ed34c 100644
--- a/Sources/Preprocessors/IgnoreSubviewModifiersPreprocessor.swift
+++ b/Sources/Preprocessors/IgnoreSubviewModifiersPreprocessor.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
class IgnoreSubviewModifiersPreprocessor: BasePreprocessor {
@@ -53,3 +55,5 @@ class IgnoreSubviewModifiersPreprocessor: BasePreprocessor {
}
}
}
+
+#endif
diff --git a/Sources/Preprocessors/MatchPreprocessor.swift b/Sources/Preprocessors/MatchPreprocessor.swift
index fe91c1e1..bae58f70 100644
--- a/Sources/Preprocessors/MatchPreprocessor.swift
+++ b/Sources/Preprocessors/MatchPreprocessor.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
class MatchPreprocessor: BasePreprocessor {
@@ -74,3 +76,5 @@ class MatchPreprocessor: BasePreprocessor {
}
}
}
+
+#endif
diff --git a/Sources/Preprocessors/SourcePreprocessor.swift b/Sources/Preprocessors/SourcePreprocessor.swift
index 44dcb2ba..7e9baa5c 100644
--- a/Sources/Preprocessors/SourcePreprocessor.swift
+++ b/Sources/Preprocessors/SourcePreprocessor.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
class SourcePreprocessor: BasePreprocessor {
@@ -82,3 +84,5 @@ class SourcePreprocessor: BasePreprocessor {
context[view] = state
}
}
+
+#endif
diff --git a/Sources/SwiftSupport.swift b/Sources/SwiftSupport.swift
index b601818c..0f417558 100644
--- a/Sources/SwiftSupport.swift
+++ b/Sources/SwiftSupport.swift
@@ -6,10 +6,11 @@
// Copyright © 2018 Luke Zhao. All rights reserved.
//
-#if !(swift(>=4.2))
+#if canImport(UIKit) && !(swift(>=4.2))
import Foundation
import CoreMedia
import CoreGraphics
+
import UIKit
extension CMTime {
@@ -46,4 +47,5 @@ extension RunLoop {
static let common = RunLoopMode.commonModes
}
}
+
#endif
diff --git a/Sources/Transition/HeroProgressRunner.swift b/Sources/Transition/HeroProgressRunner.swift
index a34d6539..b9835fb0 100644
--- a/Sources/Transition/HeroProgressRunner.swift
+++ b/Sources/Transition/HeroProgressRunner.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
protocol HeroProgressRunnerDelegate: class {
@@ -70,3 +72,5 @@ class HeroProgressRunner {
displayLink = nil
}
}
+
+#endif
diff --git a/Sources/Transition/HeroTransition+Animate.swift b/Sources/Transition/HeroTransition+Animate.swift
index e570379e..24a3be15 100644
--- a/Sources/Transition/HeroTransition+Animate.swift
+++ b/Sources/Transition/HeroTransition+Animate.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import Foundation
extension HeroTransition {
@@ -79,3 +81,5 @@ extension HeroTransition {
fullScreenSnapshot?.removeFromSuperview()
}
}
+
+#endif
diff --git a/Sources/Transition/HeroTransition+Complete.swift b/Sources/Transition/HeroTransition+Complete.swift
index ad9aaf72..cbc2e978 100644
--- a/Sources/Transition/HeroTransition+Complete.swift
+++ b/Sources/Transition/HeroTransition+Complete.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
extension HeroTransition {
@@ -143,3 +145,5 @@ extension HeroTransition {
transitionContext?.completeTransition(finished)
}
}
+
+#endif
diff --git a/Sources/Transition/HeroTransition+CustomTransition.swift b/Sources/Transition/HeroTransition+CustomTransition.swift
index 7a01131b..add4c192 100644
--- a/Sources/Transition/HeroTransition+CustomTransition.swift
+++ b/Sources/Transition/HeroTransition+CustomTransition.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
// custom transition helper, used in hero_replaceViewController
@@ -38,3 +40,5 @@ public extension HeroTransition {
start()
}
}
+
+#endif
diff --git a/Sources/Transition/HeroTransition+Interactive.swift b/Sources/Transition/HeroTransition+Interactive.swift
index 8ba9663b..3cac05a9 100644
--- a/Sources/Transition/HeroTransition+Interactive.swift
+++ b/Sources/Transition/HeroTransition+Interactive.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
extension HeroTransition {
@@ -130,3 +132,5 @@ extension HeroTransition {
}
}
}
+
+#endif
diff --git a/Sources/Transition/HeroTransition+Start.swift b/Sources/Transition/HeroTransition+Start.swift
index d4cf457f..504c4c28 100644
--- a/Sources/Transition/HeroTransition+Start.swift
+++ b/Sources/Transition/HeroTransition+Start.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
extension HeroTransition {
@@ -163,3 +165,5 @@ extension HeroTransition {
#endif
}
}
+
+#endif
diff --git a/Sources/Transition/HeroTransition+UINavigationControllerDelegate.swift b/Sources/Transition/HeroTransition+UINavigationControllerDelegate.swift
index ec46a272..67b8bd87 100644
--- a/Sources/Transition/HeroTransition+UINavigationControllerDelegate.swift
+++ b/Sources/Transition/HeroTransition+UINavigationControllerDelegate.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
extension HeroTransition: UINavigationControllerDelegate {
@@ -49,3 +51,5 @@ extension HeroTransition: UINavigationControllerDelegate {
return interactiveTransitioning
}
}
+
+#endif
diff --git a/Sources/Transition/HeroTransition+UITabBarControllerDelegate.swift b/Sources/Transition/HeroTransition+UITabBarControllerDelegate.swift
index ad1b9d58..0fdb957f 100644
--- a/Sources/Transition/HeroTransition+UITabBarControllerDelegate.swift
+++ b/Sources/Transition/HeroTransition+UITabBarControllerDelegate.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
extension HeroTransition: UITabBarControllerDelegate {
@@ -49,3 +51,5 @@ extension HeroTransition: UITabBarControllerDelegate {
return self
}
}
+
+#endif
diff --git a/Sources/Transition/HeroTransition+UIViewControllerTransitioningDelegate.swift b/Sources/Transition/HeroTransition+UIViewControllerTransitioningDelegate.swift
index eee488de..b0ab0b10 100644
--- a/Sources/Transition/HeroTransition+UIViewControllerTransitioningDelegate.swift
+++ b/Sources/Transition/HeroTransition+UIViewControllerTransitioningDelegate.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
extension HeroTransition: UIViewControllerTransitioningDelegate {
@@ -78,3 +80,5 @@ extension HeroTransition: UIViewControllerInteractiveTransitioning {
animateTransition(using: transitionContext)
}
}
+
+#endif
diff --git a/Sources/Transition/HeroTransition.swift b/Sources/Transition/HeroTransition.swift
index a645db8d..1080f526 100644
--- a/Sources/Transition/HeroTransition.swift
+++ b/Sources/Transition/HeroTransition.swift
@@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if canImport(UIKit)
+
import UIKit
/**
@@ -213,3 +215,5 @@ extension HeroTransition: HeroProgressRunnerDelegate {
self.progress = progress
}
}
+
+#endif
From 10e3c9e79ae6ce7334ff56fe21568889eb12c5ee Mon Sep 17 00:00:00 2001
From: Sung
Date: Tue, 4 Aug 2020 10:28:09 +0900
Subject: [PATCH 05/25] Add BackButton
---
Examples/SwiftUIMatchExample.swift | 32 +++++++++++++++++++++---------
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/Examples/SwiftUIMatchExample.swift b/Examples/SwiftUIMatchExample.swift
index efc4ed2b..fb3f9a3a 100644
--- a/Examples/SwiftUIMatchExample.swift
+++ b/Examples/SwiftUIMatchExample.swift
@@ -8,7 +8,7 @@ class SwiftUIMatchExampleViewController: UIHostingController {
required init() {
super.init(rootView: ImagesTableView())
-
+ rootView.dismiss = self.dismiss
rootView.onTapRow = { image in
let destinationViewController = UIHostingController(rootView: ImageViewWrapper(name: image.name, heroID: image.name)
@@ -25,6 +25,10 @@ class SwiftUIMatchExampleViewController: UIHostingController {
@objc required dynamic init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
+
+ func dismiss(){
+ self.dismiss(animated: true, completion: nil)
+ }
}
struct ImageInfo: Identifiable {
@@ -35,20 +39,30 @@ struct ImageInfo: Identifiable {
@available(iOS 13.0, *)
struct ImagesTableView: View {
-
+ var dismiss: (() -> Void)?
var onTapRow: ((ImageInfo)->())?
@State var images = (0...9).map{ ImageInfo(id: $0, name: "Unsplash\($0)") }
var body: some View {
- List(images) { image in
-
- HStack {
- ImageViewWrapper(name: "\(image.name)_cell", heroID: image.name)
+ VStack {
+ HStack{
+ Button(action: {
+ self.dismiss?()
+ }) {
+ Text("Back")
+ }.padding(.leading)
Spacer()
- Text("Image number \(image.id)").padding()
- }.onTapGesture {
- self.onTapRow?(image)
+ }
+
+ List(images) { image in
+ HStack {
+ ImageViewWrapper(name: "\(image.name)_cell", heroID: image.name)
+ Spacer()
+ Text("Image number \(image.id)").padding()
+ }.onTapGesture {
+ self.onTapRow?(image)
+ }
}
}
}
From 97c09de5967a126b55cebb72020e6a014f112662 Mon Sep 17 00:00:00 2001
From: Ara Gevorkian <4725661+aragevorkian@users.noreply.github.com>
Date: Tue, 24 Mar 2020 20:49:57 -0700
Subject: [PATCH 06/25] Update HeroTransition+Start.swift
https://github.com/HeroTransitions/Hero/issues/640
---
Sources/Transition/HeroTransition+Start.swift | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Sources/Transition/HeroTransition+Start.swift b/Sources/Transition/HeroTransition+Start.swift
index 504c4c28..7ff7b4bf 100644
--- a/Sources/Transition/HeroTransition+Start.swift
+++ b/Sources/Transition/HeroTransition+Start.swift
@@ -36,7 +36,9 @@ extension HeroTransition {
toView.frame = fromView.frame
}
toView.setNeedsLayout()
- toView.layoutIfNeeded()
+ if nil != toView.window {
+ toView.layoutIfNeeded()
+ }
}
if let fvc = fromViewController, let tvc = toViewController {
From 12108a2379fb8888b261a2b9da09082a584d4558 Mon Sep 17 00:00:00 2001
From: Max Medvedev
Date: Thu, 8 Nov 2018 18:08:38 +0300
Subject: [PATCH 07/25] Resuming property animator from current fraction
If you call `Hero.shared.cancel()`, UIVisualEffectView starts animation from scratch instead of the current fraction value. This commit fixed this issue.
---
Sources/Animator/HeroViewPropertyViewContext.swift | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/Sources/Animator/HeroViewPropertyViewContext.swift b/Sources/Animator/HeroViewPropertyViewContext.swift
index b20d3641..841ff5d2 100644
--- a/Sources/Animator/HeroViewPropertyViewContext.swift
+++ b/Sources/Animator/HeroViewPropertyViewContext.swift
@@ -40,11 +40,22 @@ internal class HeroViewPropertyViewContext: HeroAnimatorViewContext {
if reverse {
viewPropertyAnimator?.stopAnimation(false)
viewPropertyAnimator?.finishAnimation(at: .current)
+
viewPropertyAnimator = UIViewPropertyAnimator(duration: duration, curve: .linear) {
visualEffectView.effect = reverse ? self.startEffect : self.endEffect
}
+
+ // workaround for a bug https://openradar.appspot.com/30856746
+ viewPropertyAnimator.startAnimation()
+ viewPropertyAnimator.pauseAnimation()
+
+ viewPropertyAnimator.fractionComplete = CGFloat(1.0 - timePassed / duration)
}
- viewPropertyAnimator.startAnimation()
+
+ DispatchQueue.main.async {
+ self.viewPropertyAnimator.startAnimation()
+ }
+
return duration
}
From f737a0a75d9a721b21b62a25adf05cf05c5fa3b2 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Fortier
Date: Wed, 9 Dec 2020 15:13:52 -0500
Subject: [PATCH 08/25] Fix broken link to Interactive Transitions Tutorial
The previous link (http://lkzhao.com/2016/12/28/hero.html) was redirecting to a Page not found.
The expected page has been moved to https://lkzhao.gitbooks.io/hero/content/docs/InteractiveTransition.html.
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f94e4ba5..4e4a9517 100644
--- a/README.md
+++ b/README.md
@@ -174,7 +174,7 @@ For more up-to-date ones, please see the header-doc. (use **alt+click** in Xcode
## Interactive Transition Tutorials
-[Interactive transitions with Hero (Part 1)](http://lkzhao.com/2017/02/05/hero-interactive-transition.html)
+[Interactive transitions with Hero (Part 1)](https://lkzhao.gitbooks.io/hero/content/docs/InteractiveTransition.html)
## FAQ
From 2de8d787ac788b7afb45287a454977b46a820265 Mon Sep 17 00:00:00 2001
From: Joe Mattiello
Date: Sun, 7 Feb 2021 19:32:08 -0500
Subject: [PATCH 09/25] Swift 5.0 remix (#695)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Swift 5.0
* Podspec
* Podspec version to 1.6
* Bump version in Jazzy and xcodeproj config files
Co-authored-by: Carlos Alcalá Helguero
---
.jazzy.yaml | 4 ++--
Hero.podspec | 16 ++++++++--------
Hero.xcodeproj/project.pbxproj | 16 ++++++++--------
.../xcshareddata/xcschemes/Hero (tvOS).xcscheme | 6 +-----
.../xcshareddata/xcschemes/Hero.xcscheme | 2 +-
.../xcshareddata/WorkspaceSettings.xcsettings | 10 ++++++++++
Sources/HeroContext.swift | 4 ++--
Sources/HeroPlugin.swift | 4 ++--
...roTransition+UITabBarControllerDelegate.swift | 4 ++--
9 files changed, 36 insertions(+), 30 deletions(-)
create mode 100644 Hero.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
diff --git a/.jazzy.yaml b/.jazzy.yaml
index cef3e040..cb52011a 100644
--- a/.jazzy.yaml
+++ b/.jazzy.yaml
@@ -1,6 +1,6 @@
# ---- About ----
module: Hero
-module_version: 1.5.0
+module_version: 1.6.0
author: HeroTransitions
readme: README.md
copyright: 'See [license](https://github.com/HeroTransitions/Hero/blob/develop/LICENSE) for more details.'
@@ -9,7 +9,7 @@ copyright: 'See [license](https://github.com/HeroTransitions/Hero/blob/develop/L
author_url: https://herotransitions.github.io/Hero/
dash_url: https://herotransitions.github.io/Hero/docsets/Hero.xml
github_url: https://github.com/HeroTransitions/Hero/
-github_file_prefix: https://github.com/HeroTransitions/Hero/tree/1.5.0/
+github_file_prefix: https://github.com/HeroTransitions/Hero/tree/1.6.0/
# ---- Sources ----
podspec: Hero.podspec
diff --git a/Hero.podspec b/Hero.podspec
index a3a6b9be..fbfe5122 100644
--- a/Hero.podspec
+++ b/Hero.podspec
@@ -2,12 +2,12 @@
Pod::Spec.new do |s|
s.name = 'Hero'
- s.version = '1.5.0'
+ s.version = '1.6.0'
s.summary = 'Elegant transition library for iOS'
s.description = <<-DESC
- Hero is a library for building iOS view controller transitions.
- It provides a declarative layer on top of the UIKit's cumbersome transition APIs.
+ Hero is a library for building iOS view controller transitions.
+ It provides a declarative layer on top of the UIKit's cumbersome transition APIs.
Making custom transitions an easy task for developers.
DESC
@@ -16,21 +16,21 @@ Pod::Spec.new do |s|
s.documentation_url = 'https://herotransitions.github.io/Hero/'
s.screenshots = ['https://git.io/JeRkv', 'https://git.io/JeRke', 'https://git.io/JeRkf', 'https://git.io/JeRkJ']
s.license = { :type => 'MIT' }
- s.author = {
+ s.author = {
'Luke' => 'lzhaoyilun@gmail.com',
- 'Joe Mattiello' => 'git@joemattiello.com'
+ 'Joe Mattiello' => 'git@joemattiello.com'
}
s.source = { git: 'https://github.com/HeroTransitions/Hero.git', tag: s.version.to_s }
s.cocoapods_version = '>= 1.4.0'
- s.ios.deployment_target = '8.0'
- s.tvos.deployment_target = '9.0'
+ s.ios.deployment_target = '10.0'
+ s.tvos.deployment_target = '10.0'
s.ios.frameworks = 'UIKit', 'Foundation', 'QuartzCore', 'CoreGraphics', 'CoreMedia'
s.tvos.frameworks = 'UIKit', 'Foundation', 'QuartzCore', 'CoreGraphics', 'CoreMedia'
- s.swift_version = '4.2'
+ s.swift_version = '5.0'
s.requires_arc = true
diff --git a/Hero.xcodeproj/project.pbxproj b/Hero.xcodeproj/project.pbxproj
index 2c43bd11..7e7d5360 100644
--- a/Hero.xcodeproj/project.pbxproj
+++ b/Hero.xcodeproj/project.pbxproj
@@ -1186,7 +1186,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- MARKETING_VERSION = 1.5.0;
+ MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
SDKROOT = appletvos;
@@ -1213,7 +1213,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- MARKETING_VERSION = 1.5.0;
+ MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
SDKROOT = appletvos;
@@ -1236,7 +1236,7 @@
DEVELOPMENT_TEAM = 4VSEW78TKT;
INFOPLIST_FILE = TvOSExamples/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MARKETING_VERSION = 1.5.0;
+ MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTvOSExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
@@ -1256,7 +1256,7 @@
DEVELOPMENT_TEAM = 4VSEW78TKT;
INFOPLIST_FILE = TvOSExamples/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MARKETING_VERSION = 1.5.0;
+ MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTvOSExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
@@ -1283,7 +1283,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- MARKETING_VERSION = 1.5.0;
+ MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
SKIP_INSTALL = YES;
@@ -1310,7 +1310,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- MARKETING_VERSION = 1.5.0;
+ MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
SKIP_INSTALL = YES;
@@ -1443,7 +1443,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Examples/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MARKETING_VERSION = 1.5.0;
+ MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
@@ -1460,7 +1460,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Examples/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MARKETING_VERSION = 1.5.0;
+ MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
diff --git a/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme b/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme
index 6c24ddfa..f3bdece8 100644
--- a/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme
+++ b/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme
@@ -1,6 +1,6 @@
-
-
-
-
+
+
+
+ BuildSystemType
+ Latest
+ PreviewsEnabled
+
+
+
diff --git a/Sources/HeroContext.swift b/Sources/HeroContext.swift
index f1e1adc7..f948e789 100644
--- a/Sources/HeroContext.swift
+++ b/Sources/HeroContext.swift
@@ -167,7 +167,7 @@ extension HeroContext {
if superviewToNoSnapshotSubviewMap[superview] == nil {
superviewToNoSnapshotSubviewMap[superview] = []
}
- if let index = superview.subviews.index(of: view) {
+ if let index = superview.subviews.firstIndex(of: view) {
superviewToNoSnapshotSubviewMap[superview]!.append((index, view))
}
}
@@ -272,7 +272,7 @@ extension HeroContext {
let pairedView = pairedView(for: view),
let pairedSnapshot = snapshotViews[pairedView],
let siblingViews = pairedView.superview?.subviews,
- let index = siblingViews.index(of: pairedView) {
+ let index = siblingViews.firstIndex(of: pairedView) {
let nextSiblings = siblingViews[index+1.. Bool {
- return enabledPlugins.index(where: { return $0 == plugin}) != nil
+ return enabledPlugins.firstIndex(where: { return $0 == plugin}) != nil
}
static func enable(plugin: HeroPlugin.Type) {
@@ -166,7 +166,7 @@ internal extension HeroTransition {
}
static func disable(plugin: HeroPlugin.Type) {
- if let index = enabledPlugins.index(where: { return $0 == plugin}) {
+ if let index = enabledPlugins.firstIndex(where: { return $0 == plugin}) {
enabledPlugins.remove(at: index)
}
}
diff --git a/Sources/Transition/HeroTransition+UITabBarControllerDelegate.swift b/Sources/Transition/HeroTransition+UITabBarControllerDelegate.swift
index 0fdb957f..2fa1daf0 100644
--- a/Sources/Transition/HeroTransition+UITabBarControllerDelegate.swift
+++ b/Sources/Transition/HeroTransition+UITabBarControllerDelegate.swift
@@ -42,8 +42,8 @@ extension HeroTransition: UITabBarControllerDelegate {
public func tabBarController(_ tabBarController: UITabBarController, animationControllerForTransitionFrom fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
guard !isTransitioning else { return nil }
self.state = .notified
- let fromVCIndex = tabBarController.children.index(of: fromVC)!
- let toVCIndex = tabBarController.children.index(of: toVC)!
+ let fromVCIndex = tabBarController.children.firstIndex(of: fromVC)!
+ let toVCIndex = tabBarController.children.firstIndex(of: toVC)!
self.isPresenting = toVCIndex > fromVCIndex
self.fromViewController = fromViewController ?? fromVC
self.toViewController = toViewController ?? toVC
From 800b9d90238e385df8bb69f5e94887e2d0e7a695 Mon Sep 17 00:00:00 2001
From: Joe Mattiello
Date: Sun, 7 Feb 2021 19:37:08 -0500
Subject: [PATCH 10/25] Redo of Enables application extension API only #557
(#681)
* Enables application extension API only
* Replace UIApp...leftToRight with Locale extension
For use in Extensions that don't support UIApp
Co-authored-by: Lukas Schmidt
---
Examples/SwiftUIMatchExample.swift | 2 +-
Hero.xcodeproj/project.pbxproj | 10 ++++++++
Sources/Extensions/Locale+Hero.swift | 24 +++++++++++++++++++
.../Extensions/UIViewController+Hero.swift | 2 ++
.../Preprocessors/CascadePreprocessor.swift | 4 ++--
.../DefaultAnimationPreprocessor.swift | 12 ++++++++--
.../Transition/HeroTransition+Complete.swift | 2 ++
7 files changed, 51 insertions(+), 5 deletions(-)
create mode 100644 Sources/Extensions/Locale+Hero.swift
diff --git a/Examples/SwiftUIMatchExample.swift b/Examples/SwiftUIMatchExample.swift
index fb3f9a3a..7f3dc870 100644
--- a/Examples/SwiftUIMatchExample.swift
+++ b/Examples/SwiftUIMatchExample.swift
@@ -41,7 +41,7 @@ struct ImageInfo: Identifiable {
struct ImagesTableView: View {
var dismiss: (() -> Void)?
var onTapRow: ((ImageInfo)->())?
-
+
@State var images = (0...9).map{ ImageInfo(id: $0, name: "Unsplash\($0)") }
var body: some View {
diff --git a/Hero.xcodeproj/project.pbxproj b/Hero.xcodeproj/project.pbxproj
index 7e7d5360..2c168106 100644
--- a/Hero.xcodeproj/project.pbxproj
+++ b/Hero.xcodeproj/project.pbxproj
@@ -128,6 +128,8 @@
B1D816EC1EF5A720007B9776 /* HeroTransition+Animate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D816EA1EF5A720007B9776 /* HeroTransition+Animate.swift */; };
B1D834041F02E7C0009E1E36 /* ConditionalPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D834031F02E7C0009E1E36 /* ConditionalPreprocessor.swift */; };
B1D834051F02E7C0009E1E36 /* ConditionalPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D834031F02E7C0009E1E36 /* ConditionalPreprocessor.swift */; };
+ B35264CE2454FEF300D33861 /* Locale+Hero.swift in Sources */ = {isa = PBXBuildFile; fileRef = B35264CD2454FEF300D33861 /* Locale+Hero.swift */; };
+ B35264CF2454FEF300D33861 /* Locale+Hero.swift in Sources */ = {isa = PBXBuildFile; fileRef = B35264CD2454FEF300D33861 /* Locale+Hero.swift */; };
DBA05BB41A704A4A17967918 /* Pods_HeroTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 841FFA357ACB279D3F74CDEE /* Pods_HeroTests.framework */; };
F482F0BE235D7808002E97ED /* UIColor+HexString.swift in Sources */ = {isa = PBXBuildFile; fileRef = F482F0BD235D7808002E97ED /* UIColor+HexString.swift */; };
F482F0BF235D7808002E97ED /* UIColor+HexString.swift in Sources */ = {isa = PBXBuildFile; fileRef = F482F0BD235D7808002E97ED /* UIColor+HexString.swift */; };
@@ -285,6 +287,7 @@
B1D816E71EF5A6FE007B9776 /* HeroTransition+Complete.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "HeroTransition+Complete.swift"; sourceTree = ""; };
B1D816EA1EF5A720007B9776 /* HeroTransition+Animate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "HeroTransition+Animate.swift"; sourceTree = ""; };
B1D834031F02E7C0009E1E36 /* ConditionalPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConditionalPreprocessor.swift; sourceTree = ""; };
+ B35264CD2454FEF300D33861 /* Locale+Hero.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Locale+Hero.swift"; sourceTree = ""; };
C377744CBFF1E24426E80F55 /* Pods-HeroExamples.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HeroExamples.release.xcconfig"; path = "Pods/Target Support Files/Pods-HeroExamples/Pods-HeroExamples.release.xcconfig"; sourceTree = ""; };
C51A6465EC2CB38D82F28B93 /* Pods-HeroTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HeroTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HeroTests/Pods-HeroTests.debug.xcconfig"; sourceTree = ""; };
EEE340F89FF0A49DD23A5A6E /* Pods_HeroExamples.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HeroExamples.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -355,6 +358,7 @@
A37D7B471E2C0C9300AC1959 /* CAMediaTimingFunction+Hero.swift */,
A37D7B481E2C0C9300AC1959 /* CG+Hero.swift */,
A37D7B491E2C0C9300AC1959 /* DispatchQueue+Hero.swift */,
+ B35264CD2454FEF300D33861 /* Locale+Hero.swift */,
A37D7B4A1E2C0C9300AC1959 /* UIKit+Hero.swift */,
B101B2C91E561408007E7112 /* UIView+Hero.swift */,
B101B2CD1E561421007E7112 /* UIViewController+Hero.swift */,
@@ -981,6 +985,7 @@
2D1F7FD61E49DD18004D944B /* DispatchQueue+Hero.swift in Sources */,
2D1F7FCB1E49DD08004D944B /* HeroTargetState.swift in Sources */,
B17D888D1EF5A5500048D3E8 /* HeroTransition+UIViewControllerTransitioningDelegate.swift in Sources */,
+ B35264CF2454FEF300D33861 /* Locale+Hero.swift in Sources */,
B1D816E01EF5A5DF007B9776 /* HeroViewControllerDelegate.swift in Sources */,
B1193ABA1E525D12005B1C87 /* HeroAnimatorViewContext.swift in Sources */,
2D1F7FCA1E49DD08004D944B /* HeroPlugin.swift in Sources */,
@@ -1050,6 +1055,7 @@
A37D7B4D1E2C0C9300AC1959 /* CAMediaTimingFunction+Hero.swift in Sources */,
A37D7B5D1E2C0CBD00AC1959 /* HeroModifier.swift in Sources */,
B17D888C1EF5A5500048D3E8 /* HeroTransition+UIViewControllerTransitioningDelegate.swift in Sources */,
+ B35264CE2454FEF300D33861 /* Locale+Hero.swift in Sources */,
B1D816DF1EF5A5DF007B9776 /* HeroViewControllerDelegate.swift in Sources */,
B1193AB91E525D12005B1C87 /* HeroAnimatorViewContext.swift in Sources */,
A37D7B5B1E2C0CBD00AC1959 /* HeroDefaultAnimator.swift in Sources */,
@@ -1175,6 +1181,7 @@
2D1F7FC41E49DCB5004D944B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ APPLICATION_EXTENSION_API_ONLY = YES;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
CURRENT_PROJECT_VERSION = 1;
@@ -1203,6 +1210,7 @@
2D1F7FC51E49DCB5004D944B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ APPLICATION_EXTENSION_API_ONLY = YES;
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
@@ -1270,6 +1278,7 @@
A306D3BC1E1C7A2E00B6C23A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
@@ -1298,6 +1307,7 @@
A306D3BD1E1C7A2E00B6C23A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 1;
diff --git a/Sources/Extensions/Locale+Hero.swift b/Sources/Extensions/Locale+Hero.swift
new file mode 100644
index 00000000..3f5ea75d
--- /dev/null
+++ b/Sources/Extensions/Locale+Hero.swift
@@ -0,0 +1,24 @@
+//
+// Locale+Hero.swift
+// Hero
+//
+// Created by Joseph Mattiello on 4/25/20.
+// Copyright © 2020 Luke Zhao. All rights reserved.
+//
+
+import Foundation
+
+internal extension Locale {
+ internal static var isDeviceLanguageRightToLeft: Bool {
+ let currentLocale: Locale = Locale.current
+ guard let code: String = currentLocale.languageCode else {
+ return false
+ }
+ let direction: Locale.LanguageDirection = Locale.characterDirection(forLanguage: code)
+ return (direction == .rightToLeft)
+ }
+
+ internal static var isDeviceLanguageLeftToRight: Bool {
+ return !isDeviceLanguageRightToLeft
+ }
+}
diff --git a/Sources/Extensions/UIViewController+Hero.swift b/Sources/Extensions/UIViewController+Hero.swift
index 0fe09443..ed792477 100644
--- a/Sources/Extensions/UIViewController+Hero.swift
+++ b/Sources/Extensions/UIViewController+Hero.swift
@@ -326,7 +326,9 @@ public extension HeroExtension where Base: UIViewController {
parentVC.present(next, animated: false, completion: completion)
}
} else {
+ #if TARGET_IS_EXTENSION
UIApplication.shared.keyWindow?.rootViewController = next
+ #endif
}
}
}
diff --git a/Sources/Preprocessors/CascadePreprocessor.swift b/Sources/Preprocessors/CascadePreprocessor.swift
index 22f9f694..3c8b17ff 100644
--- a/Sources/Preprocessors/CascadePreprocessor.swift
+++ b/Sources/Preprocessors/CascadePreprocessor.swift
@@ -74,11 +74,11 @@ public enum CascadeDirection {
}
public static var leadingToTrailing: CascadeDirection {
- return UIApplication.shared.userInterfaceLayoutDirection == .leftToRight ? .leftToRight : .rightToLeft
+ return !Locale.isDeviceLanguageRightToLeft ? .leftToRight : .rightToLeft
}
public static var trailingToLeading: CascadeDirection {
- return UIApplication.shared.userInterfaceLayoutDirection == .leftToRight ? .rightToLeft : .leftToRight
+ return !Locale.isDeviceLanguageRightToLeft ? .rightToLeft : .leftToRight
}
private func topToBottomComperator(lhs: UIView, rhs: UIView) -> Bool {
diff --git a/Sources/Preprocessors/DefaultAnimationPreprocessor.swift b/Sources/Preprocessors/DefaultAnimationPreprocessor.swift
index 06feb0f9..f254beb5 100644
--- a/Sources/Preprocessors/DefaultAnimationPreprocessor.swift
+++ b/Sources/Preprocessors/DefaultAnimationPreprocessor.swift
@@ -39,12 +39,20 @@ public enum HeroDefaultAnimationType {
}
}
+ public static var leadingToTrailing: CascadeDirection {
+ return !Locale.isDeviceLanguageRightToLeft ? .leftToRight : .rightToLeft
+ }
+
+ public static var trailingToLeading: CascadeDirection {
+ return !Locale.isDeviceLanguageRightToLeft ? .rightToLeft : .leftToRight
+ }
+
public static var leading: Direction {
- return UIApplication.shared.userInterfaceLayoutDirection == .leftToRight ? .left : .right
+ return !Locale.isDeviceLanguageRightToLeft ? .left : .right
}
public static var trailing: Direction {
- return UIApplication.shared.userInterfaceLayoutDirection == .leftToRight ? .right : .left
+ return !Locale.isDeviceLanguageRightToLeft ? .right : .left
}
}
diff --git a/Sources/Transition/HeroTransition+Complete.swift b/Sources/Transition/HeroTransition+Complete.swift
index cbc2e978..208b97b5 100644
--- a/Sources/Transition/HeroTransition+Complete.swift
+++ b/Sources/Transition/HeroTransition+Complete.swift
@@ -89,7 +89,9 @@ extension HeroTransition {
if isPresenting != finished, !inContainerController, transitionContext != nil {
// only happens when present a .overFullScreen VC
// bug: http://openradar.appspot.com/radar?id=5320103646199808
+ #if TARGET_IS_EXTENSION
UIApplication.shared.keyWindow?.addSubview(isPresenting ? fromView : toView)
+ #endif
}
}
From b1a73c47b177ec86971da83204c27dc87e1edfca Mon Sep 17 00:00:00 2001
From: Joe Mattiello
Date: Sun, 7 Feb 2021 19:48:12 -0500
Subject: [PATCH 11/25] Swift 5 Migration + SwiftUI (#696)
* Run Swift 5 Migration Tool
* Inhibit warnings from CollectionKit as it is out of date
* ref #623 - add SwiftUI example
* ref #623 - revert target settings and make sure Example still works (in simulator)
* bundle install and pod install lockfiles
Co-authored-by: Nick Potts
---
.gitignore | 1 +
Hero.xcodeproj/project.pbxproj | 59 +++++++++----------
.../xcschemes/Hero (tvOS).xcscheme | 2 +-
.../xcshareddata/xcschemes/Hero.xcscheme | 2 +-
Podfile | 2 +-
Podfile.lock | 4 +-
Sources/HeroContext.swift | 2 +-
Sources/SwiftSupport.swift | 4 +-
8 files changed, 37 insertions(+), 39 deletions(-)
diff --git a/.gitignore b/.gitignore
index eaee54f0..ae8ff81a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -70,3 +70,4 @@ node_modules
_book
xcodebuild.log
.swiftpm
+/.bundle
diff --git a/Hero.xcodeproj/project.pbxproj b/Hero.xcodeproj/project.pbxproj
index 2c168106..9c8d6f07 100644
--- a/Hero.xcodeproj/project.pbxproj
+++ b/Hero.xcodeproj/project.pbxproj
@@ -780,35 +780,30 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
- LastUpgradeCheck = 0930;
+ LastUpgradeCheck = 1120;
ORGANIZATIONNAME = "Luke Zhao";
TargetAttributes = {
2D1F7FBE1E49DCB5004D944B = {
CreatedOnToolsVersion = 8.2;
- DevelopmentTeam = 4VSEW78TKT;
ProvisioningStyle = Automatic;
};
2D1F7FE11E49DD90004D944B = {
CreatedOnToolsVersion = 8.2;
- DevelopmentTeam = 4VSEW78TKT;
ProvisioningStyle = Automatic;
};
A306D3B11E1C7A2E00B6C23A = {
CreatedOnToolsVersion = 8.2.1;
- DevelopmentTeam = 4VSEW78TKT;
- LastSwiftMigration = 1000;
+ LastSwiftMigration = 1120;
ProvisioningStyle = Automatic;
};
A33E60A01DE761C90065CBD8 = {
CreatedOnToolsVersion = 8.0;
- DevelopmentTeam = 683UGRW72Z;
- LastSwiftMigration = 1000;
+ LastSwiftMigration = 1120;
ProvisioningStyle = Automatic;
};
AF1E1B501E66822C00ECE039 = {
CreatedOnToolsVersion = 8.2;
- DevelopmentTeam = 4VSEW78TKT;
- LastSwiftMigration = 1000;
+ LastSwiftMigration = 1120;
ProvisioningStyle = Automatic;
TestTargetID = A33E60A01DE761C90065CBD8;
};
@@ -816,10 +811,9 @@
};
buildConfigurationList = A33E609C1DE761C90065CBD8 /* Build configuration list for PBXProject "Hero" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
- English,
en,
Base,
);
@@ -1186,7 +1180,7 @@
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
- DEVELOPMENT_TEAM = 4VSEW78TKT;
+ DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -1214,7 +1208,7 @@
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
- DEVELOPMENT_TEAM = 4VSEW78TKT;
+ DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -1241,7 +1235,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
- DEVELOPMENT_TEAM = 4VSEW78TKT;
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = TvOSExamples/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.6.0;
@@ -1261,7 +1255,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
- DEVELOPMENT_TEAM = 4VSEW78TKT;
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = TvOSExamples/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.6.0;
@@ -1282,9 +1276,10 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
- DEVELOPMENT_TEAM = 4VSEW78TKT;
+ DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -1297,7 +1292,7 @@
PRODUCT_NAME = Hero;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 4.0;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@@ -1312,7 +1307,7 @@
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
- DEVELOPMENT_TEAM = 4VSEW78TKT;
+ DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -1324,7 +1319,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
SKIP_INSTALL = YES;
- SWIFT_VERSION = 4.0;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@@ -1335,6 +1330,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@@ -1361,7 +1357,6 @@
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -1387,7 +1382,7 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -1395,6 +1390,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@@ -1421,7 +1417,6 @@
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
@@ -1439,7 +1434,7 @@
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
@@ -1449,14 +1444,14 @@
baseConfigurationReference = 5CD4F09A588E81DA75C2BE38 /* Pods-HeroExamples.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- DEVELOPMENT_TEAM = 683UGRW72Z;
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/Examples/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
@@ -1466,14 +1461,14 @@
baseConfigurationReference = C377744CBFF1E24426E80F55 /* Pods-HeroExamples.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- DEVELOPMENT_TEAM = 683UGRW72Z;
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/Examples/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
@@ -1483,13 +1478,14 @@
baseConfigurationReference = C51A6465EC2CB38D82F28B93 /* Pods-HeroTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
- DEVELOPMENT_TEAM = 4VSEW78TKT;
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTests;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HeroExamples.app/HeroExamples";
};
name = Debug;
@@ -1499,13 +1495,14 @@
baseConfigurationReference = 5CEC69C9A9A60129002FD931 /* Pods-HeroTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
- DEVELOPMENT_TEAM = 4VSEW78TKT;
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTests;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HeroExamples.app/HeroExamples";
};
name = Release;
diff --git a/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme b/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme
index f3bdece8..942a03ee 100644
--- a/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme
+++ b/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme
@@ -1,6 +1,6 @@
true
target 'HeroTests' do
inherit! :search_paths
diff --git a/Podfile.lock b/Podfile.lock
index cff3af08..5eab3ecf 100644
--- a/Podfile.lock
+++ b/Podfile.lock
@@ -7,12 +7,12 @@ DEPENDENCIES:
- CollectionKit
SPEC REPOS:
- https://github.com/CocoaPods/Specs.git:
+ https://cdn.cocoapods.org/:
- CollectionKit
SPEC CHECKSUMS:
CollectionKit: 5caa5341860d4c9b748ebfeaab97530b2d02c7c0
-PODFILE CHECKSUM: efc6b025c2cee81dcc6fa480009618ed1af56837
+PODFILE CHECKSUM: bfa4251748617deb38237ad241be4629254392c1
COCOAPODS: 1.8.4
diff --git a/Sources/HeroContext.swift b/Sources/HeroContext.swift
index f948e789..03cc6a0d 100644
--- a/Sources/HeroContext.swift
+++ b/Sources/HeroContext.swift
@@ -272,7 +272,7 @@ extension HeroContext {
let pairedView = pairedView(for: view),
let pairedSnapshot = snapshotViews[pairedView],
let siblingViews = pairedView.superview?.subviews,
- let index = siblingViews.firstIndex(of: pairedView) {
+ let index = siblingViews.firstIndex(of: pairedView) {
let nextSiblings = siblingViews[index+1..
Date: Tue, 29 Oct 2019 02:20:07 -0400
Subject: [PATCH 12/25] Fix tvOS 13 if available markers
Signed-off-by: Joe Mattiello
---
Examples/AppStoreCardExample.swift | 2 +-
Examples/ExampleBaseViewController.swift | 2 +-
Examples/MainViewController.swift | 4 ++--
Examples/MatchExample.swift | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Examples/AppStoreCardExample.swift b/Examples/AppStoreCardExample.swift
index ae67d213..d9cc3533 100644
--- a/Examples/AppStoreCardExample.swift
+++ b/Examples/AppStoreCardExample.swift
@@ -219,7 +219,7 @@ class AppStoreViewController2: ExampleBaseViewController {
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent neque est, hendrerit vitae nibh ultrices, accumsan elementum ante. Phasellus fringilla sapien non lorem consectetur, in ullamcorper tortor condimentum. Nulla tincidunt iaculis maximus. Sed ut urna urna. Nulla at sem vel neque scelerisque imperdiet. Donec ornare luctus dapibus. Donec aliquet ante augue, at pellentesque ipsum mollis eget. Cras vulputate mauris ac eleifend sollicitudin. Vivamus ut posuere odio. Suspendisse vulputate sem vel felis vehicula iaculis. Fusce sagittis, eros quis consequat tincidunt, arcu nunc ornare nulla, non egestas dolor ex at ipsum. Cras et massa sit amet quam imperdiet viverra. Mauris vitae finibus nibh, ac vulputate sapien.
"""
- if #available(iOS 13.0, *) {
+ if #available(iOS 13.0, tvOS 13, *) {
contentCard.backgroundColor = .systemBackground
} else {
contentCard.backgroundColor = .white
diff --git a/Examples/ExampleBaseViewController.swift b/Examples/ExampleBaseViewController.swift
index 35d7999b..2232eaad 100644
--- a/Examples/ExampleBaseViewController.swift
+++ b/Examples/ExampleBaseViewController.swift
@@ -14,7 +14,7 @@ class ExampleBaseViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
- if #available(iOS 13.0, *) {
+ if #available(iOS 13.0, tvOS 13, *) {
view.backgroundColor = .systemBackground
} else {
view.backgroundColor = .white
diff --git a/Examples/MainViewController.swift b/Examples/MainViewController.swift
index 91eb8ad1..1a5249a8 100644
--- a/Examples/MainViewController.swift
+++ b/Examples/MainViewController.swift
@@ -9,7 +9,7 @@ class MainViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
- if #available(iOS 13.0, *) {
+ if #available(iOS 13.0, tvOS 13, *) {
view.backgroundColor = UIColor.systemBackground
} else {
view.backgroundColor = .white
@@ -35,7 +35,7 @@ class MainViewController: UIViewController {
let viewSource = ClosureViewSource { (label: UILabel, data: SourceData, index) in
label.text = "\(index + 1). \(data.exampleTitle)"
label.textAlignment = .center
- if #available(iOS 13.0, *) {
+ if #available(iOS 13.0, tvOS 13, *) {
label.textColor = .label
label.backgroundColor = .systemBackground
} else {
diff --git a/Examples/MatchExample.swift b/Examples/MatchExample.swift
index 3c94b9c0..fa1247e0 100644
--- a/Examples/MatchExample.swift
+++ b/Examples/MatchExample.swift
@@ -65,7 +65,7 @@ class MatchExampleViewController2: ExampleBaseViewController {
blackView.cornerRadius = 8
view.addSubview(blackView)
- if #available(iOS 13.0, *) {
+ if #available(iOS 13.0, tvOS 13, *) {
backgroundView.backgroundColor = .systemBackground
} else {
backgroundView.backgroundColor = .white
From bbcb4250ca7945dd9b46b4aed1dd70b86c1818ee Mon Sep 17 00:00:00 2001
From: Adam Cumiskey
Date: Tue, 19 Mar 2019 17:23:54 -0400
Subject: [PATCH 13/25] Support `maskedCorners` on iOS 11+
---
Sources/HeroContext.swift | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/Sources/HeroContext.swift b/Sources/HeroContext.swift
index 03cc6a0d..a8c55abe 100644
--- a/Sources/HeroContext.swift
+++ b/Sources/HeroContext.swift
@@ -141,6 +141,13 @@ extension HeroContext {
unhide(view: view)
// capture a snapshot without alpha, cornerRadius, or shadows
+ let oldMaskedCorners: CACornerMask = {
+ if #available(iOS 11, *) {
+ return view.layer.maskedCorners
+ } else {
+ return []
+ }
+ }()
let oldCornerRadius = view.layer.cornerRadius
let oldAlpha = view.alpha
let oldShadowRadius = view.layer.shadowRadius
@@ -222,6 +229,9 @@ extension HeroContext {
}
#endif
+ if #available(iOS 11, *) {
+ view.layer.maskedCorners = oldMaskedCorners
+ }
view.layer.cornerRadius = oldCornerRadius
view.alpha = oldAlpha
view.layer.shadowRadius = oldShadowRadius
@@ -241,12 +251,18 @@ extension HeroContext {
if !(view is UINavigationBar), let contentView = snapshot.subviews.get(0) {
// the Snapshot's contentView must have hold the cornerRadius value,
// since the snapshot might not have maskToBounds set
+ if #available(iOS 11, *) {
+ contentView.layer.maskedCorners = view.layer.maskedCorners
+ }
contentView.layer.cornerRadius = view.layer.cornerRadius
contentView.layer.masksToBounds = true
}
- snapshot.layer.allowsGroupOpacity = false
+ if #available(iOS 11, *) {
+ snapshot.layer.maskedCorners = view.layer.maskedCorners
+ }
snapshot.layer.cornerRadius = view.layer.cornerRadius
+ snapshot.layer.allowsGroupOpacity = false
snapshot.layer.zPosition = view.layer.zPosition
snapshot.layer.opacity = view.layer.opacity
snapshot.layer.isOpaque = view.layer.isOpaque
From 03491d57b2e63c7da8e7df22c3efe83ad9ee3af5 Mon Sep 17 00:00:00 2001
From: Joe Mattiello
Date: Sun, 7 Feb 2021 20:56:12 -0500
Subject: [PATCH 14/25] Warnings fix (#698)
* Fix available view.layer.maskedCorners on tvOS 11+
* Fix redundant privacy statements
# Conflicts:
# Sources/Extensions/CAMediaTimingFunction+Hero.swift
* Swift version bump 5.0 in demo targets
* XCode 11 suggested project settings
* Fix swiftlint warnings
* Gem update, cocoapods to 1.10
* iOS Min version to 10.0 in local targets
* .swiftlint.yml renamed variable_name to identifier_name
* Parallize command line builds
---
.swiftlint.yml | 5 +-
Gemfile | 2 +-
Gemfile.lock | 260 +++++++++++-------
Hero.xcodeproj/project.pbxproj | 109 +++++---
.../xcschemes/Hero (tvOS).xcscheme | 2 +-
.../xcshareddata/xcschemes/Hero.xcscheme | 2 +-
Podfile | 4 +-
Podfile.lock | 12 +-
.../HeroCoreAnimationViewContext.swift | 2 +
.../HeroViewPropertyViewContext.swift | 10 +-
Sources/Extensions/CALayer+Hero.swift | 1 +
Sources/Extensions/Locale+Hero.swift | 4 +-
Sources/HeroContext.swift | 8 +-
13 files changed, 258 insertions(+), 163 deletions(-)
diff --git a/.swiftlint.yml b/.swiftlint.yml
index 18dcbf10..8ac9c143 100644
--- a/.swiftlint.yml
+++ b/.swiftlint.yml
@@ -1,9 +1,8 @@
disabled_rules: # rule identifiers to exclude from running
- missing_docs
- unused_closure_parameter
- - force_cast
+ - identifier_name
- weak_delegate
- - variable_name
- cyclomatic_complexity
- function_body_length
- todo
@@ -52,7 +51,7 @@ type_name:
- T
- t
-variable_name:
+identifier_name:
min_length: # only min_length
error: 3 # only error
excluded: # excluded via string array
diff --git a/Gemfile b/Gemfile
index 29321ba5..4ee0deff 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,7 +3,7 @@
source 'https://rubygems.org'
#ruby '~> 2.5.1'
-gem 'cocoapods', '~> 1.8'
+gem 'cocoapods', '~> 1.10'
gem 'cocoapods-check'
gem 'cocoapods-generate'
gem 'cocoapods-githooks' # Sync .git-hooks across team members at `pod install` time
diff --git a/Gemfile.lock b/Gemfile.lock
index 2167f95e..ba58c9c4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,39 +1,56 @@
GIT
remote: https://github.com/jcouball/ruby-git.git
- revision: 2402674cc50168f85fdc9c8faa0ca4b9a16d5944
+ revision: 12f908c2122ac539cef04474947535a5786bd15e
specs:
- git (1.5.0)
+ git (1.7.0)
+ rchardet (~> 1.8)
GEM
remote: https://rubygems.org/
specs:
- CFPropertyList (3.0.2)
- activesupport (4.2.11.1)
- i18n (~> 0.7)
+ CFPropertyList (3.0.3)
+ activesupport (5.2.4.4)
+ concurrent-ruby (~> 1.0, >= 1.0.2)
+ i18n (>= 0.7, < 2)
minitest (~> 5.1)
- thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
- algoliasearch (1.27.1)
+ algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
+ artifactory (3.0.15)
atomos (0.1.3)
- babosa (1.0.3)
+ aws-eventstream (1.1.0)
+ aws-partitions (1.424.0)
+ aws-sdk-core (3.112.0)
+ aws-eventstream (~> 1, >= 1.0.2)
+ aws-partitions (~> 1, >= 1.239.0)
+ aws-sigv4 (~> 1.1)
+ jmespath (~> 1.0)
+ aws-sdk-kms (1.42.0)
+ aws-sdk-core (~> 3, >= 3.112.0)
+ aws-sigv4 (~> 1.1)
+ aws-sdk-s3 (1.88.0)
+ aws-sdk-core (~> 3, >= 3.112.0)
+ aws-sdk-kms (~> 1)
+ aws-sigv4 (~> 1.1)
+ aws-sigv4 (1.2.2)
+ aws-eventstream (~> 1, >= 1.0.2)
+ babosa (1.0.4)
claide (1.0.3)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
- cocoapods (1.8.4)
- activesupport (>= 4.0.2, < 5)
+ cocoapods (1.10.1)
+ addressable (~> 2.6)
claide (>= 1.0.2, < 2.0)
- cocoapods-core (= 1.8.4)
+ cocoapods-core (= 1.10.1)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
- cocoapods-downloader (>= 1.2.2, < 2.0)
+ cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
- cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.4.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
@@ -43,19 +60,23 @@ GEM
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.4)
- xcodeproj (>= 1.11.1, < 2.0)
+ xcodeproj (>= 1.19.0, < 2.0)
cocoapods-check (1.1.0)
cocoapods (~> 1.0)
- cocoapods-core (1.8.4)
- activesupport (>= 4.0.2, < 6)
+ cocoapods-core (1.10.1)
+ activesupport (> 5.0, < 6)
+ addressable (~> 2.6)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
+ netrc (~> 0.11)
+ public_suffix
+ typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.4)
cocoapods-disable-podfile-validations (0.1.1)
- cocoapods-downloader (1.3.0)
- cocoapods-generate (1.6.0)
+ cocoapods-downloader (1.4.0)
+ cocoapods-generate (2.2.1)
cocoapods-disable-podfile-validations (~> 0.1.1)
cocoapods-githooks (1.0.3)
cocoapods-packager (1.5.0)
@@ -65,27 +86,26 @@ GEM
cocoapods-repo-update (0.0.4)
cocoapods (~> 1.0, >= 1.3.0)
cocoapods-search (1.0.0)
- cocoapods-stats (1.1.0)
- cocoapods-trunk (1.4.1)
+ cocoapods-trunk (1.5.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
- cocoapods-try (1.1.0)
+ cocoapods-try (1.2.0)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
- concurrent-ruby (1.1.5)
+ concurrent-ruby (1.1.8)
cork (0.3.0)
colored2 (~> 3.1)
- danger (6.1.0)
+ danger (8.2.2)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
- faraday (~> 0.9)
+ faraday (>= 0.9.0, < 2.0)
faraday-http-cache (~> 2.0)
- git (~> 1.5)
- kramdown (~> 2.0)
+ git (~> 1.7)
+ kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (~> 4.7)
@@ -94,58 +114,64 @@ GEM
danger-plugin-api (~> 1.0)
danger-plugin-api (1.0.0)
danger (> 2.0)
- danger-swiftlint (0.23.0)
+ danger-swiftlint (0.24.5)
danger
rake (> 10)
thor (~> 0.19)
- danger-xcov (0.4.1)
+ danger-xcov (0.5.0)
danger (>= 2.1)
- xcov (>= 1.1.2)
- declarative (0.0.10)
+ xcov (>= 1.7.3)
+ declarative (0.0.20)
declarative-option (0.1.0)
- digest-crc (0.4.1)
+ digest-crc (0.6.3)
+ rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
- dotenv (2.7.5)
- emoji_regex (1.0.1)
+ dotenv (2.7.6)
+ emoji_regex (3.2.1)
escape (0.0.4)
- excon (0.70.0)
- faraday (0.17.1)
+ ethon (0.12.0)
+ ffi (>= 1.3.0)
+ excon (0.79.0)
+ faraday (1.3.0)
+ faraday-net_http (~> 1.0)
multipart-post (>= 1.2, < 3)
- faraday-cookie_jar (0.0.6)
- faraday (>= 0.7.4)
+ ruby2_keywords
+ faraday-cookie_jar (0.0.7)
+ faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
- faraday-http-cache (2.0.0)
- faraday (~> 0.8)
- faraday_middleware (0.13.1)
- faraday (>= 0.7.4, < 1.0)
- fastimage (2.1.7)
- fastlane (2.137.0)
+ faraday-http-cache (2.2.0)
+ faraday (>= 0.8)
+ faraday-net_http (1.0.1)
+ faraday_middleware (1.0.0)
+ faraday (~> 1.0)
+ fastimage (2.2.2)
+ fastlane (2.173.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
- babosa (>= 1.0.2, < 2.0.0)
+ artifactory (~> 3.0)
+ aws-sdk-s3 (~> 1.0)
+ babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
- emoji_regex (>= 0.1, < 2.0)
- excon (>= 0.45.0, < 1.0.0)
- faraday (~> 0.17)
+ emoji_regex (>= 0.1, < 4.0)
+ excon (>= 0.71.0, < 1.0.0)
+ faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
- faraday_middleware (~> 0.13.1)
+ faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
- google-api-client (>= 0.21.2, < 0.24.0)
+ google-api-client (>= 0.37.0, < 0.39.0)
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
json (< 3.0.0)
- jwt (~> 2.1.0)
+ jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
- multi_xml (~> 0.5)
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
- public_suffix (~> 2.0.0)
- rubyzip (>= 1.3.0, < 2.0.0)
+ rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
@@ -154,88 +180,111 @@ GEM
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
- xcodeproj (>= 1.8.1, < 2.0.0)
+ xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
+ ffi (1.14.2)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
git_diff_parser (3.2.0)
- google-api-client (0.23.9)
+ google-api-client (0.38.0)
+ addressable (~> 2.5, >= 2.5.1)
+ googleauth (~> 0.9)
+ httpclient (>= 2.8.1, < 3.0)
+ mini_mime (~> 1.0)
+ representable (~> 3.0)
+ retriable (>= 2.0, < 4.0)
+ signet (~> 0.12)
+ google-apis-core (0.2.1)
addressable (~> 2.5, >= 2.5.1)
- googleauth (>= 0.5, < 0.7.0)
+ googleauth (~> 0.14)
httpclient (>= 2.8.1, < 3.0)
- mime-types (~> 3.0)
+ mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
- signet (~> 0.9)
- google-cloud-core (1.4.1)
+ rexml
+ signet (~> 0.14)
+ webrick
+ google-apis-iamcredentials_v1 (0.1.0)
+ google-apis-core (~> 0.1)
+ google-apis-storage_v1 (0.1.0)
+ google-apis-core (~> 0.1)
+ google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
- google-cloud-env (1.3.0)
- faraday (~> 0.11)
- google-cloud-storage (1.16.0)
+ google-cloud-errors (~> 1.0)
+ google-cloud-env (1.4.0)
+ faraday (>= 0.17.3, < 2.0)
+ google-cloud-errors (1.0.1)
+ google-cloud-storage (1.30.0)
+ addressable (~> 2.5)
digest-crc (~> 0.4)
- google-api-client (~> 0.23)
+ google-apis-iamcredentials_v1 (~> 0.1)
+ google-apis-storage_v1 (~> 0.1)
google-cloud-core (~> 1.2)
- googleauth (>= 0.6.2, < 0.10.0)
- googleauth (0.6.7)
- faraday (~> 0.12)
+ googleauth (~> 0.9)
+ mini_mime (~> 1.0)
+ googleauth (0.15.0)
+ faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
- signet (~> 0.7)
+ signet (~> 0.14)
highline (1.7.10)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
- i18n (0.9.5)
+ i18n (1.8.8)
concurrent-ruby (~> 1.0)
- json (2.3.0)
- jwt (2.1.0)
- kramdown (2.1.0)
+ jmespath (1.4.0)
+ json (2.5.1)
+ jwt (2.2.2)
+ kramdown (2.3.0)
+ rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
memoist (0.16.2)
- mime-types (3.3)
- mime-types-data (~> 3.2015)
- mime-types-data (3.2019.1009)
- mini_magick (4.9.5)
- minitest (5.13.0)
+ mini_magick (4.11.0)
+ mini_mime (1.0.2)
+ minitest (5.14.3)
molinillo (0.6.6)
- multi_json (1.14.1)
- multi_xml (0.6.0)
+ multi_json (1.15.0)
multipart-post (2.0.0)
- nanaimo (0.2.6)
+ nanaimo (0.3.0)
nap (1.1.0)
- naturally (2.2.0)
+ naturally (2.2.1)
netrc (0.11.0)
no_proxy_fix (0.1.2)
- octokit (4.14.0)
+ octokit (4.20.0)
+ faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
- os (1.0.1)
- plist (3.5.0)
- public_suffix (2.0.5)
- rake (13.0.1)
+ os (1.1.1)
+ plist (3.6.0)
+ public_suffix (4.0.6)
+ rake (13.0.3)
+ rchardet (1.8.0)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
+ rexml (3.2.4)
rouge (2.0.7)
ruby-macho (1.4.0)
- rubyzip (1.3.0)
+ ruby2_keywords (0.0.4)
+ rubyzip (2.3.0)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
security (0.1.3)
- signet (0.12.0)
+ signet (0.14.1)
addressable (~> 2.3)
- faraday (~> 0.9)
+ faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
- simctl (1.6.6)
+ simctl (1.6.8)
CFPropertyList
naturally
slack-notifier (2.3.2)
@@ -244,29 +293,32 @@ GEM
unicode-display_width (~> 1.1, >= 1.1.1)
thor (0.20.3)
thread_safe (0.3.6)
- tty-cursor (0.7.0)
- tty-screen (0.7.0)
- tty-spinner (0.9.2)
+ tty-cursor (0.7.1)
+ tty-screen (0.8.1)
+ tty-spinner (0.9.3)
tty-cursor (~> 0.7)
- tzinfo (1.2.5)
+ typhoeus (1.4.0)
+ ethon (>= 0.9.0)
+ tzinfo (1.2.9)
thread_safe (~> 0.1)
uber (0.1.0)
unf (0.1.4)
unf_ext
- unf_ext (0.0.7.6)
- unicode-display_width (1.6.0)
+ unf_ext (0.0.7.7)
+ unicode-display_width (1.7.0)
+ webrick (1.7.0)
word_wrap (1.0.0)
- xcode-install (2.6.3)
+ xcode-install (2.6.8)
claide (>= 0.9.1, < 1.1.0)
fastlane (>= 2.1.0, < 3.0.0)
- xcodeproj (1.13.0)
+ xcodeproj (1.19.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
- nanaimo (~> 0.2.6)
- xcov (1.7.0)
- fastlane (>= 2.82.0, < 3.0.0)
+ nanaimo (~> 0.3.0)
+ xcov (1.7.5)
+ fastlane (>= 2.141.0, < 3.0.0)
multipart-post
slack-notifier
terminal-table
@@ -274,15 +326,15 @@ GEM
xcresult (~> 0.2.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
- xcpretty-travis-formatter (1.0.0)
+ xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
- xcresult (0.2.0)
+ xcresult (0.2.1)
PLATFORMS
ruby
DEPENDENCIES
- cocoapods (~> 1.8)
+ cocoapods (~> 1.10)
cocoapods-check
cocoapods-generate
cocoapods-githooks
@@ -299,4 +351,4 @@ DEPENDENCIES
xcpretty
BUNDLED WITH
- 2.0.2
+ 2.1.4
diff --git a/Hero.xcodeproj/project.pbxproj b/Hero.xcodeproj/project.pbxproj
index 9c8d6f07..6a4e5338 100644
--- a/Hero.xcodeproj/project.pbxproj
+++ b/Hero.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 46;
+ objectVersion = 53;
objects = {
/* Begin PBXBuildFile section */
@@ -779,16 +779,19 @@
A33E60991DE761C90065CBD8 /* Project object */ = {
isa = PBXProject;
attributes = {
+ BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 0820;
- LastUpgradeCheck = 1120;
- ORGANIZATIONNAME = "Luke Zhao";
+ LastUpgradeCheck = 1240;
+ ORGANIZATIONNAME = "Hero Transitions";
TargetAttributes = {
2D1F7FBE1E49DCB5004D944B = {
CreatedOnToolsVersion = 8.2;
+ LastSwiftMigration = 1240;
ProvisioningStyle = Automatic;
};
2D1F7FE11E49DD90004D944B = {
CreatedOnToolsVersion = 8.2;
+ LastSwiftMigration = 1240;
ProvisioningStyle = Automatic;
};
A306D3B11E1C7A2E00B6C23A = {
@@ -810,7 +813,7 @@
};
};
buildConfigurationList = A33E609C1DE761C90065CBD8 /* Build configuration list for PBXProject "Hero" */;
- compatibilityVersion = "Xcode 3.2";
+ compatibilityVersion = "Xcode 11.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
@@ -882,13 +885,12 @@
buildActionMask = 2147483647;
files = (
);
- inputPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-HeroExamples/Pods-HeroExamples-frameworks.sh",
- "${BUILT_PRODUCTS_DIR}/CollectionKit/CollectionKit.framework",
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-HeroExamples/Pods-HeroExamples-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
- outputPaths = (
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CollectionKit.framework",
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-HeroExamples/Pods-HeroExamples-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@@ -1186,16 +1188,20 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ "@loader_path/Frameworks",
+ );
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
- TVOS_DEPLOYMENT_TARGET = 9.0;
+ TVOS_DEPLOYMENT_TARGET = 10.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
@@ -1214,16 +1220,20 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ "@loader_path/Frameworks",
+ );
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
- TVOS_DEPLOYMENT_TARGET = 9.0;
+ TVOS_DEPLOYMENT_TARGET = 10.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
@@ -1237,15 +1247,18 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = TvOSExamples/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTvOSExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
- TVOS_DEPLOYMENT_TARGET = 9.0;
+ TVOS_DEPLOYMENT_TARGET = 10.0;
};
name = Debug;
};
@@ -1257,15 +1270,18 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = TvOSExamples/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTvOSExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
- TVOS_DEPLOYMENT_TARGET = 9.0;
+ TVOS_DEPLOYMENT_TARGET = 10.0;
};
name = Release;
};
@@ -1285,8 +1301,12 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
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";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ "@loader_path/Frameworks",
+ );
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
@@ -1313,8 +1333,12 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
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";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ "@loader_path/Frameworks",
+ );
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.Hero;
PRODUCT_NAME = Hero;
@@ -1351,6 +1375,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1375,7 +1400,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -1411,6 +1436,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1429,10 +1455,11 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
- SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
@@ -1446,8 +1473,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/Examples/Resources/Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1463,8 +1493,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/Examples/Resources/Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
MARKETING_VERSION = 1.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1482,7 +1515,11 @@
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ "@loader_path/Frameworks",
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -1499,7 +1536,11 @@
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ "@loader_path/Frameworks",
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
diff --git a/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme b/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme
index 942a03ee..75ff4994 100644
--- a/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme
+++ b/Hero.xcodeproj/xcshareddata/xcschemes/Hero (tvOS).xcscheme
@@ -1,6 +1,6 @@
true
@@ -11,6 +11,6 @@ target 'HeroExamples' do
end
target 'HeroTvOSExamples' do
- platform :tvos, '9.0'
+ platform :tvos, '10.0'
use_frameworks!
end
diff --git a/Podfile.lock b/Podfile.lock
index 5eab3ecf..729f414a 100644
--- a/Podfile.lock
+++ b/Podfile.lock
@@ -1,7 +1,7 @@
PODS:
- - CollectionKit (2.2.0):
- - CollectionKit/Core (= 2.2.0)
- - CollectionKit/Core (2.2.0)
+ - CollectionKit (2.4.0):
+ - CollectionKit/Core (= 2.4.0)
+ - CollectionKit/Core (2.4.0)
DEPENDENCIES:
- CollectionKit
@@ -11,8 +11,8 @@ SPEC REPOS:
- CollectionKit
SPEC CHECKSUMS:
- CollectionKit: 5caa5341860d4c9b748ebfeaab97530b2d02c7c0
+ CollectionKit: 8f01e7629185bb81072c4aa734d105df5c2d1c8b
-PODFILE CHECKSUM: bfa4251748617deb38237ad241be4629254392c1
+PODFILE CHECKSUM: 5c14933c915eeee6fbe5ecdd950d3da01c4a0a86
-COCOAPODS: 1.8.4
+COCOAPODS: 1.10.1
diff --git a/Sources/Animator/HeroCoreAnimationViewContext.swift b/Sources/Animator/HeroCoreAnimationViewContext.swift
index b402170c..012c67a8 100644
--- a/Sources/Animator/HeroCoreAnimationViewContext.swift
+++ b/Sources/Animator/HeroCoreAnimationViewContext.swift
@@ -234,9 +234,11 @@ internal class HeroCoreAnimationViewContext: HeroAnimatorViewContext {
case "cornerRadius", "contentsRect", "contentsScale":
addAnimation(anim, for: key, to: snapshot.layer)
if let contentLayer = contentLayer {
+ // swiftlint:disable:next force_cast
addAnimation(anim.copy() as! CAAnimation, for: key, to: contentLayer)
}
if let overlayLayer = overlayLayer {
+ // swiftlint:disable:next force_cast
addAnimation(anim.copy() as! CAAnimation, for: key, to: overlayLayer)
}
case "bounds.size":
diff --git a/Sources/Animator/HeroViewPropertyViewContext.swift b/Sources/Animator/HeroViewPropertyViewContext.swift
index 841ff5d2..11e56596 100644
--- a/Sources/Animator/HeroViewPropertyViewContext.swift
+++ b/Sources/Animator/HeroViewPropertyViewContext.swift
@@ -40,22 +40,22 @@ internal class HeroViewPropertyViewContext: HeroAnimatorViewContext {
if reverse {
viewPropertyAnimator?.stopAnimation(false)
viewPropertyAnimator?.finishAnimation(at: .current)
-
+
viewPropertyAnimator = UIViewPropertyAnimator(duration: duration, curve: .linear) {
visualEffectView.effect = reverse ? self.startEffect : self.endEffect
}
-
+
// workaround for a bug https://openradar.appspot.com/30856746
viewPropertyAnimator.startAnimation()
viewPropertyAnimator.pauseAnimation()
-
+
viewPropertyAnimator.fractionComplete = CGFloat(1.0 - timePassed / duration)
}
-
+
DispatchQueue.main.async {
self.viewPropertyAnimator.startAnimation()
}
-
+
return duration
}
diff --git a/Sources/Extensions/CALayer+Hero.swift b/Sources/Extensions/CALayer+Hero.swift
index a8ceb738..86ca09b7 100644
--- a/Sources/Extensions/CALayer+Hero.swift
+++ b/Sources/Extensions/CALayer+Hero.swift
@@ -29,6 +29,7 @@ internal extension CALayer {
// the returned value is mutable
var animations: [(String, CAAnimation)] {
if let keys = animationKeys() {
+ // swiftlint:disable:next force_cast
return keys.map { return ($0, self.animation(forKey: $0)!.copy() as! CAAnimation) }
}
return []
diff --git a/Sources/Extensions/Locale+Hero.swift b/Sources/Extensions/Locale+Hero.swift
index 3f5ea75d..11c0244b 100644
--- a/Sources/Extensions/Locale+Hero.swift
+++ b/Sources/Extensions/Locale+Hero.swift
@@ -9,7 +9,7 @@
import Foundation
internal extension Locale {
- internal static var isDeviceLanguageRightToLeft: Bool {
+ static var isDeviceLanguageRightToLeft: Bool {
let currentLocale: Locale = Locale.current
guard let code: String = currentLocale.languageCode else {
return false
@@ -18,7 +18,7 @@ internal extension Locale {
return (direction == .rightToLeft)
}
- internal static var isDeviceLanguageLeftToRight: Bool {
+ static var isDeviceLanguageLeftToRight: Bool {
return !isDeviceLanguageRightToLeft
}
}
diff --git a/Sources/HeroContext.swift b/Sources/HeroContext.swift
index a8c55abe..c98b5a4a 100644
--- a/Sources/HeroContext.swift
+++ b/Sources/HeroContext.swift
@@ -142,7 +142,7 @@ extension HeroContext {
// capture a snapshot without alpha, cornerRadius, or shadows
let oldMaskedCorners: CACornerMask = {
- if #available(iOS 11, *) {
+ if #available(iOS 11, tvOS 11, *) {
return view.layer.maskedCorners
} else {
return []
@@ -229,7 +229,7 @@ extension HeroContext {
}
#endif
- if #available(iOS 11, *) {
+ if #available(iOS 11, tvOS 11, *) {
view.layer.maskedCorners = oldMaskedCorners
}
view.layer.cornerRadius = oldCornerRadius
@@ -251,14 +251,14 @@ extension HeroContext {
if !(view is UINavigationBar), let contentView = snapshot.subviews.get(0) {
// the Snapshot's contentView must have hold the cornerRadius value,
// since the snapshot might not have maskToBounds set
- if #available(iOS 11, *) {
+ if #available(iOS 11, tvOS 11, *) {
contentView.layer.maskedCorners = view.layer.maskedCorners
}
contentView.layer.cornerRadius = view.layer.cornerRadius
contentView.layer.masksToBounds = true
}
- if #available(iOS 11, *) {
+ if #available(iOS 11, tvOS 11, *) {
snapshot.layer.maskedCorners = view.layer.maskedCorners
}
snapshot.layer.cornerRadius = view.layer.cornerRadius
From 8aae14c19e856b2955b224325e395f1a0a958e37 Mon Sep 17 00:00:00 2001
From: _ant_one
Date: Mon, 16 Sep 2019 07:37:44 -0300
Subject: [PATCH 15/25] Create FUNDING.yml
---
.github/FUNDING.yml | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 .github/FUNDING.yml
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 00000000..18f83502
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: [JoeMatt] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
From 45e05893ae03980cf6f2859f8074ae2c9cbe6a16 Mon Sep 17 00:00:00 2001
From: Joseph Mattiello
Date: Sun, 7 Feb 2021 21:14:55 -0500
Subject: [PATCH 16/25] funding.yml add opencollective group
---
.github/FUNDING.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 18f83502..52357120 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -2,7 +2,7 @@
github: [JoeMatt] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
-open_collective: # Replace with a single Open Collective username
+open_collective: herotransitions # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
From 616d9872e7c5f8da801db7455577a2dbe11def8d Mon Sep 17 00:00:00 2001
From: Joseph Mattiello
Date: Sun, 7 Feb 2021 21:25:17 -0500
Subject: [PATCH 17/25] funding.yml add admins GH usernames
---
.github/FUNDING.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 52357120..24c8faaf 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1,6 +1,6 @@
# These are supported funding model platforms
-github: [JoeMatt] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+github: [JoeMatt, lkzhao, SD10, kuyazee] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: herotransitions # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
From 504afc8ada7da45733b844ad980cc8db19171b2b Mon Sep 17 00:00:00 2001
From: Joe Mattiello
Date: Mon, 8 Feb 2021 00:10:35 -0500
Subject: [PATCH 18/25] Swift Package Manager 5 (#628)
* Update Package.swift for SPM 5
Signed-off-by: Joe Mattiello
* Add if canImport for UIKit for Swift PM
* swiftlint autocorrect
* swift pm add CLI tools
---
Package.resolved | 187 ++++++++++++++++++
Package.swift | 45 ++++-
Sources/Extensions/Array+HeroModifier.swift | 6 +-
.../CAMediaTimingFunction+Hero.swift | 4 +-
Sources/Extensions/UIColor+HexString.swift | 3 +-
.../HeroModifier+HeroStringConvertible.swift | 2 +
Sources/HeroModifier.swift | 176 +++++++++--------
Sources/HeroTargetState.swift | 5 +-
Sources/Parser/HeroStringConvertible.swift | 6 +-
Sources/SwiftSupport.swift | 6 +-
Sources/Transition/HeroProgressRunner.swift | 6 +-
.../Transition/HeroTransition+Animate.swift | 3 +-
Tests/HeroTests.swift | 1 -
13 files changed, 331 insertions(+), 119 deletions(-)
create mode 100644 Package.resolved
diff --git a/Package.resolved b/Package.resolved
new file mode 100644
index 00000000..40069492
--- /dev/null
+++ b/Package.resolved
@@ -0,0 +1,187 @@
+{
+ "object": {
+ "pins": [
+ {
+ "package": "Commandant",
+ "repositoryURL": "https://github.com/Carthage/Commandant.git",
+ "state": {
+ "branch": null,
+ "revision": "ab68611013dec67413628ac87c1f29e8427bc8e4",
+ "version": "0.17.0"
+ }
+ },
+ {
+ "package": "Files",
+ "repositoryURL": "https://github.com/JohnSundell/Files.git",
+ "state": {
+ "branch": null,
+ "revision": "a84615f4558151fab52ac38df697ce2442991f93",
+ "version": "2.3.0"
+ }
+ },
+ {
+ "package": "Komondor",
+ "repositoryURL": "https://github.com/orta/Komondor",
+ "state": {
+ "branch": null,
+ "revision": "855c74f395a4dc9e02828f58d931be6920bcbf6f",
+ "version": "1.0.6"
+ }
+ },
+ {
+ "package": "Logger",
+ "repositoryURL": "https://github.com/shibapm/Logger",
+ "state": {
+ "branch": null,
+ "revision": "53c3ecca5abe8cf46697e33901ee774236d94cce",
+ "version": "0.2.3"
+ }
+ },
+ {
+ "package": "Marathon",
+ "repositoryURL": "https://github.com/JohnSundell/Marathon",
+ "state": {
+ "branch": null,
+ "revision": "35b672e05ac411fb104e462fbfd6541f995abc17",
+ "version": "3.3.0"
+ }
+ },
+ {
+ "package": "Nimble",
+ "repositoryURL": "https://github.com/Quick/Nimble.git",
+ "state": {
+ "branch": null,
+ "revision": "7a46a5fc86cb917f69e3daf79fcb045283d8f008",
+ "version": "8.1.2"
+ }
+ },
+ {
+ "package": "OctoKit",
+ "repositoryURL": "https://github.com/nerdishbynature/octokit.swift",
+ "state": {
+ "branch": null,
+ "revision": "c391cfba4d33f3f4c7d7d8fa6708970f7d30af82",
+ "version": "0.10.1"
+ }
+ },
+ {
+ "package": "PackageConfig",
+ "repositoryURL": "https://github.com/shibapm/PackageConfig.git",
+ "state": {
+ "branch": null,
+ "revision": "bf90dc69fa0792894b08a0b74cf34029694ae486",
+ "version": "0.13.0"
+ }
+ },
+ {
+ "package": "Quick",
+ "repositoryURL": "https://github.com/Quick/Quick.git",
+ "state": {
+ "branch": null,
+ "revision": "09b3becb37cb2163919a3842a4c5fa6ec7130792",
+ "version": "2.2.1"
+ }
+ },
+ {
+ "package": "Releases",
+ "repositoryURL": "https://github.com/JohnSundell/Releases.git",
+ "state": {
+ "branch": null,
+ "revision": "ea62f33a429185b0ed21344c2355862c5bc4fcce",
+ "version": "4.0.0"
+ }
+ },
+ {
+ "package": "RequestKit",
+ "repositoryURL": "https://github.com/nerdishbynature/RequestKit.git",
+ "state": {
+ "branch": null,
+ "revision": "fd5e9e99aada7432170366c9e95967011ce13bad",
+ "version": "2.4.0"
+ }
+ },
+ {
+ "package": "Require",
+ "repositoryURL": "https://github.com/JohnSundell/Require.git",
+ "state": {
+ "branch": null,
+ "revision": "7cfbd0d8a2dede0e01f6f0d8ab2c7acef1df112e",
+ "version": "2.0.1"
+ }
+ },
+ {
+ "package": "ShellOut",
+ "repositoryURL": "https://github.com/JohnSundell/ShellOut.git",
+ "state": {
+ "branch": null,
+ "revision": "e1577acf2b6e90086d01a6d5e2b8efdaae033568",
+ "version": "2.3.0"
+ }
+ },
+ {
+ "package": "SourceKitten",
+ "repositoryURL": "https://github.com/jpsim/SourceKitten.git",
+ "state": {
+ "branch": null,
+ "revision": "c0f960f72fa1e6151695074ffa696e4da6c45ce8",
+ "version": "0.30.1"
+ }
+ },
+ {
+ "package": "danger-swift",
+ "repositoryURL": "https://github.com/danger/swift.git",
+ "state": {
+ "branch": null,
+ "revision": "33d35bf94f54155be505ffecfca745e4cc1cd0cc",
+ "version": "1.6.5"
+ }
+ },
+ {
+ "package": "SwiftFormat",
+ "repositoryURL": "https://github.com/nicklockwood/SwiftFormat",
+ "state": {
+ "branch": null,
+ "revision": "d1c8a16cc21a3dfc577fe5e881509501ed22d0ce",
+ "version": "0.47.11"
+ }
+ },
+ {
+ "package": "SwiftLint",
+ "repositoryURL": "https://github.com/Realm/SwiftLint",
+ "state": {
+ "branch": null,
+ "revision": "d53fc2664df92ef322bfa9ce5238d34f1461526a",
+ "version": "0.42.0"
+ }
+ },
+ {
+ "package": "SwiftyTextTable",
+ "repositoryURL": "https://github.com/scottrhoyt/SwiftyTextTable.git",
+ "state": {
+ "branch": null,
+ "revision": "c6df6cf533d120716bff38f8ff9885e1ce2a4ac3",
+ "version": "0.9.0"
+ }
+ },
+ {
+ "package": "SWXMLHash",
+ "repositoryURL": "https://github.com/drmohundro/SWXMLHash.git",
+ "state": {
+ "branch": null,
+ "revision": "9183170d20857753d4f331b0ca63f73c60764bf3",
+ "version": "5.0.2"
+ }
+ },
+ {
+ "package": "Yams",
+ "repositoryURL": "https://github.com/jpsim/Yams.git",
+ "state": {
+ "branch": null,
+ "revision": "9003d51672e516cc59297b7e96bff1dfdedcb4ea",
+ "version": "4.0.4"
+ }
+ }
+ ]
+ },
+ "version": 1
+}
diff --git a/Package.swift b/Package.swift
index ee5fb788..3f760756 100644
--- a/Package.swift
+++ b/Package.swift
@@ -1,15 +1,50 @@
-// swift-tools-version:4.0
+// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
+let ciDependencies: [Package.Dependency] = [
+ .package(url: "https://github.com/danger/swift.git", from: "1.0.0"),
+ .package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.35.8"),
+ .package(url: "https://github.com/Realm/SwiftLint", from: "0.28.1"),
+ .package(url: "https://github.com/orta/Komondor", from: "1.0.0")]
+
+let dependencies = ciDependencies
+
let package = Package(
name: "Hero",
+ platforms: [
+ .tvOS(.v10),
+ .iOS(.v10)
+ ],
products: [
- .library(name: "Hero", targets: ["Hero"])
+ .library(name: "Hero",
+ type: .dynamic,
+ targets: ["Hero"]),
],
- dependencies: [],
+ dependencies: dependencies,
targets: [
- .target(name: "Hero", path: "Sources")
- ]
+ .target(name: "Hero", path: "Sources"),
+ .testTarget(name: "HeroTests",
+ dependencies: [.target(name: "Hero")],
+ path: "Tests"),
+ ],
+ swiftLanguageVersions: [.v5]
)
+
+// The settings for the git hooks for our repo
+#if canImport(PackageConfig)
+ import PackageConfig
+
+ let config = PackageConfig([
+ "komondor": [
+ // When someone has run `git commit`, first run
+ // SwiftFormat and the auto-correcter for SwiftLint
+ "pre-commit": [
+ "swift run swiftformat .",
+ "swift run swiftlint autocorrect",
+ "git add .",
+ ],
+ ]
+ ])
+#endif
diff --git a/Sources/Extensions/Array+HeroModifier.swift b/Sources/Extensions/Array+HeroModifier.swift
index caf3109c..a07a86ca 100644
--- a/Sources/Extensions/Array+HeroModifier.swift
+++ b/Sources/Extensions/Array+HeroModifier.swift
@@ -20,9 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if canImport(UIKit)
-
-import UIKit
+import Foundation
internal extension Array {
func get(_ index: Int) -> Element? {
@@ -59,5 +57,3 @@ internal extension Array where Element: ExprNode {
return nil
}
}
-
-#endif
diff --git a/Sources/Extensions/CAMediaTimingFunction+Hero.swift b/Sources/Extensions/CAMediaTimingFunction+Hero.swift
index f7efd2af..478aa4e8 100644
--- a/Sources/Extensions/CAMediaTimingFunction+Hero.swift
+++ b/Sources/Extensions/CAMediaTimingFunction+Hero.swift
@@ -20,9 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if canImport(UIKit)
-
-import UIKit
+#if canImport(QuartzCore)
import QuartzCore
public extension CAMediaTimingFunction {
diff --git a/Sources/Extensions/UIColor+HexString.swift b/Sources/Extensions/UIColor+HexString.swift
index a4a693f9..673d6fbc 100644
--- a/Sources/Extensions/UIColor+HexString.swift
+++ b/Sources/Extensions/UIColor+HexString.swift
@@ -7,8 +7,7 @@
//
#if canImport(UIKit)
-
-import UIKit
+import UIKit.UIColor
extension UIColor {
convenience init?(hexString hex: String) {
diff --git a/Sources/HeroModifier+HeroStringConvertible.swift b/Sources/HeroModifier+HeroStringConvertible.swift
index 50ffe640..6d6e1c8b 100644
--- a/Sources/HeroModifier+HeroStringConvertible.swift
+++ b/Sources/HeroModifier+HeroStringConvertible.swift
@@ -59,12 +59,14 @@ extension HeroModifier: HeroStringConvertible {
return .translate(x: parameters.getCGFloat(0) ?? 0,
y: parameters.getCGFloat(1) ?? 0,
z: parameters.getCGFloat(2) ?? 0)
+ #if canImport(UIKit)
case "overlay":
return .overlay(color: UIColor(red: parameters.getCGFloat(0) ?? 1,
green: parameters.getCGFloat(1) ?? 1,
blue: parameters.getCGFloat(2) ?? 1,
alpha: 1),
opacity: parameters.getCGFloat(3) ?? 1)
+ #endif
case "duration":
if let duration = parameters.getDouble(0) {
return .duration(duration)
diff --git a/Sources/HeroModifier.swift b/Sources/HeroModifier.swift
index 7b69eb4b..0b36c3ba 100644
--- a/Sources/HeroModifier.swift
+++ b/Sources/HeroModifier.swift
@@ -21,8 +21,8 @@
// THE SOFTWARE.
#if canImport(UIKit)
-
import UIKit
+import CoreGraphics
public final class HeroModifier {
internal let apply:(inout HeroTargetState) -> Void
@@ -50,7 +50,7 @@ extension HeroModifier {
/**
Set the position for the view to animate from/to.
- Parameters:
- - position: position for the view to animate from/to
+ - position: position for the view to animate from/to
*/
public static func position(_ position: CGPoint) -> HeroModifier {
return HeroModifier { targetState in
@@ -61,7 +61,7 @@ extension HeroModifier {
/**
Set the size for the view to animate from/to.
- Parameters:
- - size: size for the view to animate from/to
+ - size: size for the view to animate from/to
*/
public static func size(_ size: CGSize) -> HeroModifier {
return HeroModifier { targetState in
@@ -75,7 +75,7 @@ extension HeroModifier {
/**
Set the transform for the view to animate from/to. Will override previous perspective, scale, translate, & rotate modifiers
- Parameters:
- - t: the CATransform3D object
+ - t: the CATransform3D object
*/
public static func transform(_ t: CATransform3D) -> HeroModifier {
return HeroModifier { targetState in
@@ -86,7 +86,7 @@ extension HeroModifier {
/**
Set the perspective on the transform. use in combination with the rotate modifier.
- Parameters:
- - perspective: set the camera distance of the transform
+ - perspective: set the camera distance of the transform
*/
public static func perspective(_ perspective: CGFloat) -> HeroModifier {
return HeroModifier { targetState in
@@ -99,9 +99,9 @@ extension HeroModifier {
/**
Scale 3d
- Parameters:
- - x: scale factor on x axis, default 1
- - y: scale factor on y axis, default 1
- - z: scale factor on z axis, default 1
+ - x: scale factor on x axis, default 1
+ - y: scale factor on y axis, default 1
+ - z: scale factor on z axis, default 1
*/
public static func scale(x: CGFloat = 1, y: CGFloat = 1, z: CGFloat = 1) -> HeroModifier {
return HeroModifier { targetState in
@@ -112,7 +112,7 @@ extension HeroModifier {
/**
Scale in x & y axis
- Parameters:
- - xy: scale factor in both x & y axis
+ - xy: scale factor in both x & y axis
*/
public static func scale(_ xy: CGFloat) -> HeroModifier {
return .scale(x: xy, y: xy)
@@ -121,9 +121,9 @@ extension HeroModifier {
/**
Translate 3d
- Parameters:
- - x: translation distance on x axis in display pixel, default 0
- - y: translation distance on y axis in display pixel, default 0
- - z: translation distance on z axis in display pixel, default 0
+ - x: translation distance on x axis in display pixel, default 0
+ - y: translation distance on y axis in display pixel, default 0
+ - z: translation distance on z axis in display pixel, default 0
*/
public static func translate(x: CGFloat = 0, y: CGFloat = 0, z: CGFloat = 0) -> HeroModifier {
return HeroModifier { targetState in
@@ -138,9 +138,9 @@ extension HeroModifier {
/**
Rotate 3d
- Parameters:
- - x: rotation on x axis in radian, default 0
- - y: rotation on y axis in radian, default 0
- - z: rotation on z axis in radian, default 0
+ - x: rotation on x axis in radian, default 0
+ - y: rotation on y axis in radian, default 0
+ - z: rotation on z axis in radian, default 0
*/
public static func rotate(x: CGFloat = 0, y: CGFloat = 0, z: CGFloat = 0) -> HeroModifier {
return HeroModifier { targetState in
@@ -157,40 +157,77 @@ extension HeroModifier {
/**
Rotate 2d
- Parameters:
- - z: rotation in radian
+ - z: rotation in radian
*/
public static func rotate(_ z: CGFloat) -> HeroModifier {
return .rotate(z: z)
}
}
+// MARK: UIKit
extension HeroModifier {
/**
- Set the opacity for the view to animate from/to.
+ Set the backgroundColor for the view to animate from/to.
- Parameters:
- - opacity: opacity for the view to animate from/to
+ - backgroundColor: backgroundColor for the view to animate from/to
*/
- public static func opacity(_ opacity: CGFloat) -> HeroModifier {
+ public static func backgroundColor(_ backgroundColor: UIColor) -> HeroModifier {
return HeroModifier { targetState in
- targetState.opacity = Float(opacity)
+ targetState.backgroundColor = backgroundColor.cgColor
}
}
/**
- Set the backgroundColor for the view to animate from/to.
+ Set the borderColor for the view to animate from/to.
- Parameters:
- - backgroundColor: backgroundColor for the view to animate from/to
+ - borderColor: borderColor for the view to animate from/to
*/
- public static func backgroundColor(_ backgroundColor: UIColor) -> HeroModifier {
+ public static func borderColor(_ borderColor: UIColor) -> HeroModifier {
return HeroModifier { targetState in
- targetState.backgroundColor = backgroundColor.cgColor
+ targetState.borderColor = borderColor.cgColor
+ }
+ }
+
+ /**
+ Set the shadowColor for the view to animate from/to.
+ - Parameters:
+ - shadowColor: shadowColor for the view to animate from/to
+ */
+ public static func shadowColor(_ shadowColor: UIColor) -> HeroModifier {
+ return HeroModifier { targetState in
+ targetState.shadowColor = shadowColor.cgColor
+ }
+ }
+
+ /**
+ Create an overlay on the animating view.
+ - Parameters:
+ - color: color of the overlay
+ - opacity: opacity of the overlay
+ */
+ public static func overlay(color: UIColor, opacity: CGFloat) -> HeroModifier {
+ return HeroModifier { targetState in
+ targetState.overlay = (color.cgColor, opacity)
+ }
+ }
+}
+
+extension HeroModifier {
+ /**
+ Set the opacity for the view to animate from/to.
+ - Parameters:
+ - opacity: opacity for the view to animate from/to
+ */
+ public static func opacity(_ opacity: CGFloat) -> HeroModifier {
+ return HeroModifier { targetState in
+ targetState.opacity = Float(opacity)
}
}
/**
Set the cornerRadius for the view to animate from/to.
- Parameters:
- - cornerRadius: cornerRadius for the view to animate from/to
+ - cornerRadius: cornerRadius for the view to animate from/to
*/
public static func cornerRadius(_ cornerRadius: CGFloat) -> HeroModifier {
return HeroModifier { targetState in
@@ -242,28 +279,6 @@ extension HeroModifier {
}
}
- /**
- Set the borderColor for the view to animate from/to.
- - Parameters:
- - borderColor: borderColor for the view to animate from/to
- */
- public static func borderColor(_ borderColor: UIColor) -> HeroModifier {
- return HeroModifier { targetState in
- targetState.borderColor = borderColor.cgColor
- }
- }
-
- /**
- Set the shadowColor for the view to animate from/to.
- - Parameters:
- - shadowColor: shadowColor for the view to animate from/to
- */
- public static func shadowColor(_ shadowColor: UIColor) -> HeroModifier {
- return HeroModifier { targetState in
- targetState.shadowColor = shadowColor.cgColor
- }
- }
-
/**
Set the shadowOpacity for the view to animate from/to.
- Parameters:
@@ -318,18 +333,6 @@ extension HeroModifier {
targetState.masksToBounds = masksToBounds
}
}
-
- /**
- Create an overlay on the animating view.
- - Parameters:
- - color: color of the overlay
- - opacity: opacity of the overlay
- */
- public static func overlay(color: UIColor, opacity: CGFloat) -> HeroModifier {
- return HeroModifier { targetState in
- targetState.overlay = (color.cgColor, opacity)
- }
- }
}
// timing modifiers
@@ -337,7 +340,7 @@ extension HeroModifier {
/**
Sets the duration of the animation for a given view. If not used, Hero will use determine the duration based on the distance and size changes.
- Parameters:
- - duration: duration of the animation
+ - duration: duration of the animation
Note: a duration of .infinity means matching the duration of the longest animation. same as .durationMatchLongest
*/
@@ -357,7 +360,7 @@ extension HeroModifier {
/**
Sets the delay of the animation for a given view.
- Parameters:
- - delay: delay of the animation
+ - delay: delay of the animation
*/
public static func delay(_ delay: TimeInterval) -> HeroModifier {
return HeroModifier { targetState in
@@ -368,7 +371,7 @@ extension HeroModifier {
/**
Sets the timing function of the animation for a given view. If not used, Hero will use determine the timing function based on whether or not the view is entering or exiting the screen.
- Parameters:
- - timingFunction: timing function of the animation
+ - timingFunction: timing function of the animation
*/
public static func timingFunction(_ timingFunction: CAMediaTimingFunction) -> HeroModifier {
return HeroModifier { targetState in
@@ -379,8 +382,8 @@ extension HeroModifier {
/**
(iOS 9+) Use spring animation with custom stiffness & damping. The duration will be automatically calculated. Will be ignored if arc, timingFunction, or duration is set.
- Parameters:
- - stiffness: stiffness of the spring
- - damping: damping of the spring
+ - stiffness: stiffness of the spring
+ - damping: damping of the spring
*/
@available(iOS 9, *)
public static func spring(stiffness: CGFloat, damping: CGFloat) -> HeroModifier {
@@ -397,25 +400,25 @@ extension HeroModifier {
Will also force the view to use global coordinate space.
The following layer properties will be animated from the given view.
-
- position
- bounds.size
- cornerRadius
- transform
- shadowColor
- shadowOpacity
- shadowOffset
- shadowRadius
- shadowPath
-
+
+ position
+ bounds.size
+ cornerRadius
+ transform
+ shadowColor
+ shadowOpacity
+ shadowOffset
+ shadowRadius
+ shadowPath
+
Note that the following properties **won't** be taken from the source view.
-
- backgroundColor
- borderWidth
- borderColor
-
+
+ backgroundColor
+ borderWidth
+ borderColor
+
- Parameters:
- - heroID: the source view's heroId.
+ - heroID: the source view's heroId.
*/
public static func source(heroID: String) -> HeroModifier {
return HeroModifier { targetState in
@@ -431,8 +434,8 @@ extension HeroModifier {
/**
Works in combination with position modifier to apply a natural curve when moving to the destination.
- Parameters:
- - intensity: a value of 1 represent a downward natural curve ╰. a value of -1 represent a upward curve ╮.
- default is 1.
+ - intensity: a value of 1 represent a downward natural curve ╰. a value of -1 represent a upward curve ╮.
+ default is 1.
*/
public static func arc(intensity: CGFloat = 1) -> HeroModifier {
return HeroModifier { targetState in
@@ -448,9 +451,9 @@ extension HeroModifier {
/**
Cascade applys increasing delay modifiers to subviews
- Parameters:
- - delta: delay in between each animation
- - direction: cascade direction
- - delayMatchedViews: whether or not to delay matched subviews until all cascading animation have started
+ - delta: delay in between each animation
+ - direction: cascade direction
+ - delayMatchedViews: whether or not to delay matched subviews until all cascading animation have started
*/
public static func cascade(delta: TimeInterval = 0.02,
direction: CascadeDirection = .topToBottom,
@@ -499,5 +502,4 @@ extension HeroModifier {
return .when({ !$0.isAppearing }, modifiers)
}
}
-
#endif
diff --git a/Sources/HeroTargetState.swift b/Sources/HeroTargetState.swift
index f2ae0c2b..449cdd78 100644
--- a/Sources/HeroTargetState.swift
+++ b/Sources/HeroTargetState.swift
@@ -21,9 +21,7 @@
// THE SOFTWARE.
#if canImport(UIKit)
-
-import QuartzCore
-import UIKit
+import CoreGraphics
public enum HeroSnapshotType {
/// Will optimize for different type of views
@@ -130,5 +128,4 @@ extension HeroTargetState: ExpressibleByArrayLiteral {
append(contentsOf: elements)
}
}
-
#endif
diff --git a/Sources/Parser/HeroStringConvertible.swift b/Sources/Parser/HeroStringConvertible.swift
index 312a413f..0ac9c4de 100644
--- a/Sources/Parser/HeroStringConvertible.swift
+++ b/Sources/Parser/HeroStringConvertible.swift
@@ -20,9 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if canImport(UIKit)
-
-import UIKit
+import Foundation
public protocol HeroStringConvertible {
static func from(node: ExprNode) -> Self?
@@ -53,5 +51,3 @@ extension String {
return parse()?.last
}
}
-
-#endif
diff --git a/Sources/SwiftSupport.swift b/Sources/SwiftSupport.swift
index 2ae0692e..2f5fe517 100644
--- a/Sources/SwiftSupport.swift
+++ b/Sources/SwiftSupport.swift
@@ -11,8 +11,6 @@ import Foundation
import CoreMedia
import CoreGraphics
-import UIKit
-
extension CMTime {
static let zero = CMTime.zero
}
@@ -28,6 +26,9 @@ enum CAMediaTimingFunctionName {
static let easeInEaseOut = kCAMediaTimingFunctionEaseInEaseOut
}
+#if canImport(UIKit)
+import UIKit
+
extension UIControl {
typealias State = UIControlState
}
@@ -41,6 +42,7 @@ extension UIViewController {
return childViewControllers
}
}
+#endif
extension RunLoop {
enum Mode {
diff --git a/Sources/Transition/HeroProgressRunner.swift b/Sources/Transition/HeroProgressRunner.swift
index b9835fb0..df8cc582 100644
--- a/Sources/Transition/HeroProgressRunner.swift
+++ b/Sources/Transition/HeroProgressRunner.swift
@@ -21,8 +21,7 @@
// THE SOFTWARE.
#if canImport(UIKit)
-
-import UIKit
+import QuartzCore
protocol HeroProgressRunnerDelegate: class {
func updateProgress(progress: Double)
@@ -37,8 +36,9 @@ class HeroProgressRunner {
}
internal var timePassed: TimeInterval = 0.0
internal var duration: TimeInterval = 0.0
+ internal var isReversed: Bool = false
+
internal var displayLink: CADisplayLink?
- internal var isReversed: Bool = false
@objc func displayUpdate(_ link: CADisplayLink) {
timePassed += isReversed ? -link.duration : link.duration
diff --git a/Sources/Transition/HeroTransition+Animate.swift b/Sources/Transition/HeroTransition+Animate.swift
index 24a3be15..87862129 100644
--- a/Sources/Transition/HeroTransition+Animate.swift
+++ b/Sources/Transition/HeroTransition+Animate.swift
@@ -21,8 +21,7 @@
// THE SOFTWARE.
#if canImport(UIKit)
-
-import Foundation
+import UIKit
extension HeroTransition {
open func animate() {
diff --git a/Tests/HeroTests.swift b/Tests/HeroTests.swift
index 8e66ced5..dd3fa2a7 100755
--- a/Tests/HeroTests.swift
+++ b/Tests/HeroTests.swift
@@ -9,7 +9,6 @@
import XCTest
import Hero
-
@discardableResult func parse(_ source: String) throws -> [ExprNode] {
let lexer = Lexer(input: source)
let tokens = lexer.tokenize()
From 3964588098ae83ab6f282dfac15356c6bc8d27c1 Mon Sep 17 00:00:00 2001
From: Andrea Miotto
Date: Tue, 19 Feb 2019 12:32:12 +0100
Subject: [PATCH 19/25] replaceViewControllers prompts the completion
extended the UINavigationController with a new setViewControllers methods that accept a completion.
Now the replaceViewControllers launch correctly the completion
---
Sources/Extensions/UIViewController+Hero.swift | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Sources/Extensions/UIViewController+Hero.swift b/Sources/Extensions/UIViewController+Hero.swift
index ed792477..7ff05b79 100644
--- a/Sources/Extensions/UIViewController+Hero.swift
+++ b/Sources/Extensions/UIViewController+Hero.swift
@@ -170,6 +170,16 @@ extension UINavigationController {
get { return hero.navigationAnimationTypeString }
set { hero.navigationAnimationTypeString = newValue }
}
+
+ /// This function call the standard setViewControllers() but it also add a completion callback.
+ func setViewControllers(viewControllers: [UIViewController], animated: Bool, completion: (() -> Void)?) {
+ setViewControllers(viewControllers, animated: animated)
+ guard animated, let coordinator = transitionCoordinator else {
+ DispatchQueue.main.async { completion?() }
+ return
+ }
+ coordinator.animate(alongsideTransition: nil) { _ in completion?() }
+ }
}
public extension HeroExtension where Base: UITabBarController {
@@ -313,7 +323,7 @@ public extension HeroExtension where Base: UIViewController {
if navigationController.hero.isEnabled {
hero.forceNotInteractive = true
}
- navigationController.setViewControllers(vcs, animated: true)
+ navigationController.setViewControllers(viewControllers: vcs, animated: true, completion: completion)
} else if let container = base.view.superview {
let parentVC = base.presentingViewController
hero.transition(from: base, to: next, in: container) { [weak base] finished in
From d9a99b07c94b4da99bb40ba44ae2033b229d13af Mon Sep 17 00:00:00 2001
From: Joseph Mattiello
Date: Mon, 8 Feb 2021 00:20:42 -0500
Subject: [PATCH 20/25] swiftlint autocorrect whitespace
---
Sources/Extensions/UIViewController+Hero.swift | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Sources/Extensions/UIViewController+Hero.swift b/Sources/Extensions/UIViewController+Hero.swift
index 7ff05b79..cc4527f1 100644
--- a/Sources/Extensions/UIViewController+Hero.swift
+++ b/Sources/Extensions/UIViewController+Hero.swift
@@ -170,7 +170,7 @@ extension UINavigationController {
get { return hero.navigationAnimationTypeString }
set { hero.navigationAnimationTypeString = newValue }
}
-
+
/// This function call the standard setViewControllers() but it also add a completion callback.
func setViewControllers(viewControllers: [UIViewController], animated: Bool, completion: (() -> Void)?) {
setViewControllers(viewControllers, animated: animated)
From 1f0cfa9c88c02b079b496ab68298c2c41581c4a5 Mon Sep 17 00:00:00 2001
From: Joe Mattiello
Date: Sun, 14 Feb 2021 22:04:49 -0500
Subject: [PATCH 21/25] Update Gems
---
Gemfile.lock | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index ba58c9c4..fe7ccd3f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -9,7 +9,7 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.3)
- activesupport (5.2.4.4)
+ activesupport (5.2.4.5)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
@@ -22,7 +22,7 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.1.0)
- aws-partitions (1.424.0)
+ aws-partitions (1.427.0)
aws-sdk-core (3.112.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
@@ -31,7 +31,7 @@ GEM
aws-sdk-kms (1.42.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
- aws-sdk-s3 (1.88.0)
+ aws-sdk-s3 (1.88.1)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
@@ -76,7 +76,7 @@ GEM
cocoapods-deintegrate (1.0.4)
cocoapods-disable-podfile-validations (0.1.1)
cocoapods-downloader (1.4.0)
- cocoapods-generate (2.2.1)
+ cocoapods-generate (2.2.2)
cocoapods-disable-podfile-validations (~> 0.1.1)
cocoapods-githooks (1.0.3)
cocoapods-packager (1.5.0)
@@ -146,7 +146,7 @@ GEM
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.2)
- fastlane (2.173.0)
+ fastlane (2.174.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
artifactory (~> 3.0)
@@ -208,7 +208,7 @@ GEM
webrick
google-apis-iamcredentials_v1 (0.1.0)
google-apis-core (~> 0.1)
- google-apis-storage_v1 (0.1.0)
+ google-apis-storage_v1 (0.2.0)
google-apis-core (~> 0.1)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
@@ -224,7 +224,7 @@ GEM
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
- googleauth (0.15.0)
+ googleauth (0.15.1)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
@@ -235,7 +235,7 @@ GEM
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
- i18n (1.8.8)
+ i18n (1.8.9)
concurrent-ruby (~> 1.0)
jmespath (1.4.0)
json (2.5.1)
From 5b3ac17fcd1ee2649cbf4ef6c94e47bbd8f4c0fb Mon Sep 17 00:00:00 2001
From: Joe Mattiello
Date: Sun, 14 Feb 2021 22:31:28 -0500
Subject: [PATCH 22/25] CI - Fix github test action (#651)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Remove duplicate iOS-legacy test.yml job
* Makefile fix test scheme name
* Add xcscheme to HeroExamples for XCode test action
* Updated SwiftUIMatchExample.swift to import Hero
* Update project to weak_link Combine and SwiftUI
Fixes “/System/Library/Frameworks/SwiftUI.framework/SwiftUI: mach-o, but not built for iOS simulator”
* Update test.yml newer XCode and iOS 13 versions
* Test.yml add Podfile.lock
* Update test.yml fix iOS version numbs
* Weak link SwiftUI.framework
resolve ci compile issue maybe
* github action test swiftpm
* test.yml update iOS versions for current ver test
* github test action non-parallel, config Debug
Signed-off-by: Joe Mattiello
* github actions tvos only active arch
Signed-off-by: Joe Mattiello
* Makefile make test for sim not device
Signed-off-by: Joe Mattiello
---
.github/workflows/test.yml | 96 ++++++++-----------
.makefiles/ios.mk | 16 ++--
Examples/SwiftUIMatchExample.swift | 1 +
Hero.xcodeproj/project.pbxproj | 60 ++++++++++++
.../xcschemes/HeroExamples.xcscheme | 88 +++++++++++++++++
Makefile | 2 +-
6 files changed, 200 insertions(+), 63 deletions(-)
create mode 100644 Hero.xcodeproj/xcshareddata/xcschemes/HeroExamples.xcscheme
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 1d4805be..eba75f01 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,6 +1,6 @@
name: Unit Test
-on:
+on:
pull_request:
paths:
- "**.swift"
@@ -9,94 +9,82 @@ on:
- "**.h"
- "**.podspec"
- "Podfile"
+ - "Podfile.lock"
- "test.yml"
jobs:
- iOS:
- name: Test iOS
+ swiftpm:
+ name: Test iOS (swiftpm)
runs-on: macOS-latest
env:
- DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer
- strategy:
- matrix:
- destination: [
- 'platform=iOS Simulator,OS=13.1,name=iPhone 11'
- ]
+ DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@master
- - name: iOS - ${{ matrix.destination }}
+ - name: iOS - Swift PM
run: |
pod install
- set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty
- bash <(curl -s https://codecov.io/bash)
- env:
- destination: ${{ matrix.destination }}
- - name: Upload Code Coverage
- run: |
- bash <(curl -s https://codecov.io/bash)
- env:
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- iOS-legacy:
+ set -o pipefail && swift test --parallel
+ iOS:
name: Test iOS
runs-on: macOS-latest
env:
- DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer
+ DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
strategy:
matrix:
destination: [
- 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7'
+ 'platform=iOS Simulator,OS=14.4,name=iPhone 12'
]
steps:
- name: Checkout
uses: actions/checkout@master
+
- name: iOS - ${{ matrix.destination }}
run: |
- xcversion simulators --install='iOS 10.3.1'
pod install
- set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty
- bash <(curl -s https://codecov.io/bash)
- env:
- destination: ${{ matrix.destination }}
- - name: Upload Code Coverage
- run: |
+ set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -configuration "Debug" -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=YES | xcpretty
bash <(curl -s https://codecov.io/bash)
env:
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- iOS-legacy:
- name: Test iOS
- runs-on: macOS-latest
- env:
- DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer
- strategy:
- matrix:
- destination: [
- 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7'
- ]
- steps:
- - name: Checkout
- uses: actions/checkout@master
- - name: iOS - ${{ matrix.destination }}
- run: |
- xcversion simulators --install='iOS 10.3.1'
- pod install
- set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty
- bash <(curl -s https://codecov.io/bash)
- env:
destination: ${{ matrix.destination }}
- name: Upload Code Coverage
run: |
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+ # iOS-legacy:
+ # name: Test iOS
+ # runs-on: macOS-latest
+ # env:
+ # DEVELOPER_DIR: /Applications/Xcode_10.3.1.app/Contents/Developer
+ # strategy:
+ # matrix:
+ # destination: [
+ # 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7'
+ # ]
+ # steps:
+ # - name: Checkout
+ # uses: actions/checkout@master
+ # - name: iOS - ${{ matrix.destination }}
+ # run: |
+ # xcversion simulators --install='iOS 10.3.1'
+ # pod install
+ # set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty
+ # bash <(curl -s https://codecov.io/bash)
+ # env:
+ # destination: ${{ matrix.destination }}
+ # - name: Upload Code Coverage
+ # run: |
+ # bash <(curl -s https://codecov.io/bash)
+ # env:
+ # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
tvOS:
name: Test tvOS
runs-on: macOS-latest
env:
- DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer
+ DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
strategy:
matrix:
destination: [
- 'platform=tvOS Simulator,OS=13.0,name=Apple TV 4K'
+ 'platform=tvOS Simulator,OS=14.3,name=Apple TV 4K'
]
steps:
@@ -105,6 +93,6 @@ jobs:
- name: tvOS - ${{ matrix.destination }}
run: |
pod install
- set -o pipefail && xcodebuild clean build -workspace Hero.xcworkspace -scheme "Hero (tvOS)" -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty
- env:
+ set -o pipefail && xcodebuild clean build -workspace Hero.xcworkspace -scheme "Hero (tvOS)" -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=YES | xcpretty
+ env:
destination: ${{ matrix.destination }}
diff --git a/.makefiles/ios.mk b/.makefiles/ios.mk
index 36833f11..e6d64710 100644
--- a/.makefiles/ios.mk
+++ b/.makefiles/ios.mk
@@ -90,7 +90,7 @@ pre_setup:
check_for_ruby:
$(info Checking for Ruby ...)
-ifeq ($(RUBY),)
+ifeq ($(RUBY),)
$(error Ruby is not installed)
endif
@@ -109,7 +109,7 @@ update_homebrew:
install_swift_lint:
$(info Install swiftlint ...)
-ifneq ($(SWIFTLINT),)
+ifneq ($(SWIFTLINT),)
brew install swiftlint
else
$(info Already have, skipping.)
@@ -132,7 +132,7 @@ install_ruby_gems:
install_carthage:
$(info Install Carthage ...)
-ifneq ($(CARTHAGE),)
+ifneq ($(CARTHAGE),)
brew install carthage
else
$(info Already have, skipping.)
@@ -141,7 +141,7 @@ endif
install_carting:
$(info Install Carting ...)
-ifneq ($(CARTING),)
+ifneq ($(CARTING),)
brew install artemnovichkov/projects/carting
else
$(info Already have, skipping.)
@@ -150,7 +150,7 @@ endif
install_swiftgen:
$(info Install Swift-Gen (https://github.com/SwiftGen/SwiftGen) ...)
-ifneq ($(SWIFTGEN),)
+ifneq ($(SWIFTGEN),)
brew install swiftgen
else
$(info Already have, skipping.)
@@ -160,7 +160,7 @@ gitpull:
$(info Pulling new commits ...)
git pull
-
+
#> -- QA Task Runners --
codecov_upload:
@@ -170,7 +170,7 @@ codecov_upload:
danger_pr:
bundle exec danger pr "$(GITHUB_URL:/=)/pull/$(PULL)"
-danger:
+danger:
bundle exec danger
#> SwiftLint autocorrect
@@ -181,7 +181,7 @@ autocorrect:
#> Run test on all targets
test:
- xcodebuild test -scheme $(TEST_SCHEME) -workspace $(WORKSPACE) | tee xcodebuild.log | xcpretty
+ xcodebuild test -scheme $(TEST_SCHEME) -workspace $(WORKSPACE) -destination 'platform=iOS Simulator,OS=14.4,name=iPhone 12' -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=YES | tee xcodebuild.log | xcpretty
#> -- Building --
diff --git a/Examples/SwiftUIMatchExample.swift b/Examples/SwiftUIMatchExample.swift
index 7f3dc870..2c7feb6e 100644
--- a/Examples/SwiftUIMatchExample.swift
+++ b/Examples/SwiftUIMatchExample.swift
@@ -2,6 +2,7 @@
import UIKit
import SwiftUI
+import Hero
@available(iOS 13.0, *)
class SwiftUIMatchExampleViewController: UIHostingController {
diff --git a/Hero.xcodeproj/project.pbxproj b/Hero.xcodeproj/project.pbxproj
index 6a4e5338..e7caea2a 100644
--- a/Hero.xcodeproj/project.pbxproj
+++ b/Hero.xcodeproj/project.pbxproj
@@ -130,6 +130,8 @@
B1D834051F02E7C0009E1E36 /* ConditionalPreprocessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D834031F02E7C0009E1E36 /* ConditionalPreprocessor.swift */; };
B35264CE2454FEF300D33861 /* Locale+Hero.swift in Sources */ = {isa = PBXBuildFile; fileRef = B35264CD2454FEF300D33861 /* Locale+Hero.swift */; };
B35264CF2454FEF300D33861 /* Locale+Hero.swift in Sources */ = {isa = PBXBuildFile; fileRef = B35264CD2454FEF300D33861 /* Locale+Hero.swift */; };
+ B383074925D1041A00B7A0D8 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B383074825D1041A00B7A0D8 /* SwiftUI.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
+ B383074B25D1042C00B7A0D8 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B383074A25D1042C00B7A0D8 /* SwiftUI.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
DBA05BB41A704A4A17967918 /* Pods_HeroTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 841FFA357ACB279D3F74CDEE /* Pods_HeroTests.framework */; };
F482F0BE235D7808002E97ED /* UIColor+HexString.swift in Sources */ = {isa = PBXBuildFile; fileRef = F482F0BD235D7808002E97ED /* UIColor+HexString.swift */; };
F482F0BF235D7808002E97ED /* UIColor+HexString.swift in Sources */ = {isa = PBXBuildFile; fileRef = F482F0BD235D7808002E97ED /* UIColor+HexString.swift */; };
@@ -288,6 +290,8 @@
B1D816EA1EF5A720007B9776 /* HeroTransition+Animate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "HeroTransition+Animate.swift"; sourceTree = ""; };
B1D834031F02E7C0009E1E36 /* ConditionalPreprocessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConditionalPreprocessor.swift; sourceTree = ""; };
B35264CD2454FEF300D33861 /* Locale+Hero.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Locale+Hero.swift"; sourceTree = ""; };
+ B383074825D1041A00B7A0D8 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; };
+ B383074A25D1042C00B7A0D8 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.3.sdk/System/Library/Frameworks/SwiftUI.framework; sourceTree = DEVELOPER_DIR; };
C377744CBFF1E24426E80F55 /* Pods-HeroExamples.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HeroExamples.release.xcconfig"; path = "Pods/Target Support Files/Pods-HeroExamples/Pods-HeroExamples.release.xcconfig"; sourceTree = ""; };
C51A6465EC2CB38D82F28B93 /* Pods-HeroTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HeroTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HeroTests/Pods-HeroTests.debug.xcconfig"; sourceTree = ""; };
EEE340F89FF0A49DD23A5A6E /* Pods_HeroExamples.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HeroExamples.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -309,6 +313,7 @@
buildActionMask = 2147483647;
files = (
2D1F7FF21E49E043004D944B /* Hero.framework in Frameworks */,
+ B383074B25D1042C00B7A0D8 /* SwiftUI.framework in Frameworks */,
A355CEC8D787CF71B0D7CBDA /* Pods_HeroTvOSExamples.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -325,6 +330,7 @@
buildActionMask = 2147483647;
files = (
A306D3B91E1C7A2E00B6C23A /* Hero.framework in Frameworks */,
+ B383074925D1041A00B7A0D8 /* SwiftUI.framework in Frameworks */,
83043017B73BC66DBB920D5C /* Pods_HeroExamples.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -343,6 +349,8 @@
0ED3C727BC790F37EE7BD698 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ B383074825D1041A00B7A0D8 /* SwiftUI.framework */,
+ B383074A25D1042C00B7A0D8 /* SwiftUI.framework */,
EEE340F89FF0A49DD23A5A6E /* Pods_HeroExamples.framework */,
FD2306FDA4E15ADA91EFED44 /* Pods_HeroTvOSExamples.framework */,
841FFA357ACB279D3F74CDEE /* Pods_HeroTests.framework */,
@@ -1479,6 +1487,19 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.6.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-framework",
+ "\"CollectionKit\"",
+ "-framework",
+ "\"Foundation\"",
+ "-framework",
+ "\"UIKit\"",
+ "-weak_framework",
+ SwiftUI,
+ "-weak_framework",
+ Combine,
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -1499,6 +1520,19 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.6.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-framework",
+ "\"CollectionKit\"",
+ "-framework",
+ "\"Foundation\"",
+ "-framework",
+ "\"UIKit\"",
+ "-weak_framework",
+ SwiftUI,
+ "-weak_framework",
+ Combine,
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroExamples;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -1520,6 +1554,19 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-framework",
+ "\"CollectionKit\"",
+ "-framework",
+ "\"Foundation\"",
+ "-framework",
+ "\"UIKit\"",
+ "-weak_framework",
+ Combine,
+ "-weak_framework",
+ SwiftUI,
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -1541,6 +1588,19 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-framework",
+ "\"CollectionKit\"",
+ "-framework",
+ "\"Foundation\"",
+ "-framework",
+ "\"UIKit\"",
+ "-weak_framework",
+ Combine,
+ "-weak_framework",
+ SwiftUI,
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.lkzhao.HeroTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
diff --git a/Hero.xcodeproj/xcshareddata/xcschemes/HeroExamples.xcscheme b/Hero.xcodeproj/xcshareddata/xcschemes/HeroExamples.xcscheme
new file mode 100644
index 00000000..c3a3a91f
--- /dev/null
+++ b/Hero.xcodeproj/xcshareddata/xcschemes/HeroExamples.xcscheme
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Makefile b/Makefile
index fdded7e2..659e900d 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ include .makefiles/bundler.mk
include .makefiles/ios.mk
PLATFORM := 'iOS'
-TEST_SCHEME := 'HeroExample'
+TEST_SCHEME := 'HeroExamples'
WORKSPACE := 'Hero.xcworkspace'
%:
From 3d7838d6a3a04cdd00651630123714eb79067916 Mon Sep 17 00:00:00 2001
From: Joe Mattiello
Date: Sun, 14 Feb 2021 22:45:08 -0500
Subject: [PATCH 23/25] CHANGELOG.md update
Signed-off-by: Joe Mattiello
---
CHANGELOG.md | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 113a9f35..9976b70c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,8 +4,29 @@ The changelog for `Hero`. Also see the [releases](https://github.com/HeroTransit
--------------------------------------
-## [1.5.0](https://github.com/HeroTransitions/Hero/releases/tag/1.5.0)
+## [1.6.0](https://github.com/HeroTransitions/Hero/releases/tag/1.6.0)
+### Added
+
+- #695 - Swift 5 support
+- #628 - Swift Package Manager Support
+- #623 - Swift UI support and example
+- #681 - Application extension target support
+- #595 - Add Accio supported badge
+- #619 - XCode 11/12 support in example
+- CI/CD improvements
+### Changed
+
+- #648 - Updated iOS version support
+- #576 - Usage guide updates
+### Fixed
+
+- #698 - Warnings fix
+- #585 - replaceViewControllers now calls the completion
+- #559 - Resuming property animator from current fraction
+- #465 - fix keyboard transition
+
+## [1.5.0](https://github.com/HeroTransitions/Hero/releases/tag/1.5.0)
### Added
- Use custom snapshot for views that implement `HeroCustomSnapshotView`.
From b5079b28cb20803eb269f092abd195673ba73c18 Mon Sep 17 00:00:00 2001
From: Joe Mattiello
Date: Sun, 14 Feb 2021 22:45:53 -0500
Subject: [PATCH 24/25] Update README.md 1.6.0 version bump
Signed-off-by: Joe Mattiello
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 4e4a9517..d178261b 100644
--- a/README.md
+++ b/README.md
@@ -151,7 +151,7 @@ let package = Package(
targets: ["MyPackage"]),
],
dependencies: [
- .package(url: "https://github.com/HeroTransitions/Hero.git", .upToNextMajor(from: "1.5.0"))
+ .package(url: "https://github.com/HeroTransitions/Hero.git", .upToNextMajor(from: "1.6.0"))
],
targets: [
.target(
From 87028b968cc2bb2129cdbbc41f7f1734aaad69f1 Mon Sep 17 00:00:00 2001
From: Joe Mattiello
Date: Sun, 14 Feb 2021 22:47:27 -0500
Subject: [PATCH 25/25] Update jazzydocs for 1.6.0
Signed-off-by: Joe Mattiello
---
docs/Classes.html | 85 +-
docs/Classes/BinaryOpNode.html | 25 +-
docs/Classes/CallNode.html | 23 +-
docs/Classes/ExprNode.html | 25 +-
docs/Classes/FunctionNode.html | 25 +-
docs/Classes/Hero.html | 17 +-
docs/Classes/HeroContext.html | 59 +-
docs/Classes/HeroDebugPlugin.html | 21 +-
docs/Classes/HeroExtension.html | 112 +-
docs/Classes/HeroModifier.html | 1004 +++----
docs/Classes/HeroPlugin.html | 63 +-
docs/Classes/HeroTransition.html | 216 +-
docs/Classes/Lexer.html | 21 +-
docs/Classes/NumberNode.html | 23 +-
docs/Classes/Parser.html | 21 +-
docs/Classes/PrototypeNode.html | 23 +-
docs/Classes/VariableNode.html | 17 +-
docs/Enums.html | 52 +-
docs/Enums/CascadeDirection.html | 35 +-
docs/Enums/HeroCoordinateSpace.html | 19 +-
docs/Enums/HeroDefaultAnimationType.html | 80 +-
.../HeroDefaultAnimationType/Direction.html | 91 +-
.../HeroDefaultAnimationType/Strategy.html | 21 +-
docs/Enums/HeroSnapshotType.html | 23 +-
docs/Enums/HeroTransitionState.html | 25 +-
docs/Enums/HeroViewOrderingStrategy.html | 21 +-
docs/Enums/ParseError.html | 31 +-
docs/Enums/Token.html | 39 +-
docs/Extensions.html | 77 +-
docs/Extensions/CAMediaTimingFunction.html | 34 +-
docs/Extensions/CATransform3D.html | 16 +-
docs/Extensions/HeroDebugView.html | 13 +-
docs/Extensions/String.html | 19 +-
docs/Extensions/UINavigationController.html | 11 +-
docs/Extensions/UITabBarController.html | 16 +-
docs/Extensions/UIView.html | 24 +-
docs/Extensions/UIViewController.html | 56 +-
docs/Functions.html | 15 +-
docs/Protocols.html | 47 +-
docs/Protocols/HeroAnimator.html | 43 +-
docs/Protocols/HeroCompatible.html | 19 +-
docs/Protocols/HeroCustomSnapshotView.html | 17 +-
docs/Protocols/HeroPreprocessor.html | 21 +-
.../Protocols/HeroProgressUpdateObserver.html | 19 +-
docs/Protocols/HeroStringConvertible.html | 21 +-
docs/Protocols/HeroTransitionDelegate.html | 23 +-
.../Protocols/HeroViewControllerDelegate.html | 45 +-
docs/Structs.html | 20 +-
docs/Structs/HeroConditionalContext.html | 43 +-
docs/Structs/HeroTargetState.html | 106 +-
docs/UsageGuide.md | 60 -
docs/css/jazzy.css | 29 +-
.../Contents/Resources/Documents/Classes.html | 85 +-
.../Documents/Classes/BinaryOpNode.html | 25 +-
.../Resources/Documents/Classes/CallNode.html | 23 +-
.../Resources/Documents/Classes/ExprNode.html | 25 +-
.../Documents/Classes/FunctionNode.html | 25 +-
.../Resources/Documents/Classes/Hero.html | 17 +-
.../Documents/Classes/HeroContext.html | 59 +-
.../Documents/Classes/HeroDebugPlugin.html | 21 +-
.../Documents/Classes/HeroExtension.html | 112 +-
.../Documents/Classes/HeroModifier.html | 1004 +++----
.../Documents/Classes/HeroPlugin.html | 63 +-
.../Documents/Classes/HeroTransition.html | 216 +-
.../Resources/Documents/Classes/Lexer.html | 21 +-
.../Documents/Classes/NumberNode.html | 23 +-
.../Resources/Documents/Classes/Parser.html | 21 +-
.../Documents/Classes/PrototypeNode.html | 23 +-
.../Documents/Classes/VariableNode.html | 17 +-
.../Contents/Resources/Documents/Enums.html | 52 +-
.../Documents/Enums/CascadeDirection.html | 35 +-
.../Documents/Enums/HeroCoordinateSpace.html | 19 +-
.../Enums/HeroDefaultAnimationType.html | 80 +-
.../HeroDefaultAnimationType/Direction.html | 91 +-
.../HeroDefaultAnimationType/Strategy.html | 21 +-
.../Documents/Enums/HeroSnapshotType.html | 23 +-
.../Documents/Enums/HeroTransitionState.html | 25 +-
.../Enums/HeroViewOrderingStrategy.html | 21 +-
.../Resources/Documents/Enums/ParseError.html | 31 +-
.../Resources/Documents/Enums/Token.html | 39 +-
.../Resources/Documents/Extensions.html | 77 +-
.../Extensions/CAMediaTimingFunction.html | 34 +-
.../Documents/Extensions/CATransform3D.html | 16 +-
.../Documents/Extensions/HeroDebugView.html | 13 +-
.../Documents/Extensions/String.html | 19 +-
.../Extensions/UINavigationController.html | 11 +-
.../Extensions/UITabBarController.html | 16 +-
.../Documents/Extensions/UIView.html | 24 +-
.../Extensions/UIViewController.html | 56 +-
.../Resources/Documents/Functions.html | 15 +-
.../Resources/Documents/Protocols.html | 47 +-
.../Documents/Protocols/HeroAnimator.html | 43 +-
.../Documents/Protocols/HeroCompatible.html | 19 +-
.../Protocols/HeroCustomSnapshotView.html | 17 +-
.../Documents/Protocols/HeroPreprocessor.html | 21 +-
.../Protocols/HeroProgressUpdateObserver.html | 19 +-
.../Protocols/HeroStringConvertible.html | 21 +-
.../Protocols/HeroTransitionDelegate.html | 23 +-
.../Protocols/HeroViewControllerDelegate.html | 45 +-
.../Contents/Resources/Documents/Structs.html | 20 +-
.../Structs/HeroConditionalContext.html | 43 +-
.../Documents/Structs/HeroTargetState.html | 106 +-
.../Resources/Documents/css/jazzy.css | 29 +-
.../Contents/Resources/Documents/index.html | 53 +-
.../Contents/Resources/Documents/js/jazzy.js | 13 +-
.../Resources/Documents/js/jquery.min.js | 4 +-
.../Resources/Documents/js/lunr.min.js | 7 +-
.../Documents/js/typeahead.jquery.js | 48 +-
.../Contents/Resources/Documents/search.json | 2 +-
.../Contents/Resources/docSet.dsidx | Bin 114688 -> 118784 bytes
docs/docsets/Hero.tgz | Bin 156627 -> 158472 bytes
docs/index.html | 53 +-
docs/js/jazzy.js | 13 +-
docs/js/jquery.min.js | 4 +-
docs/js/lunr.min.js | 7 +-
docs/js/typeahead.jquery.js | 48 +-
docs/search.json | 2 +-
docs/undocumented.json | 2295 +++++++++--------
118 files changed, 3803 insertions(+), 4708 deletions(-)
delete mode 100644 docs/UsageGuide.md
diff --git a/docs/Classes.html b/docs/Classes.html
index cf82ce64..d411cccd 100644
--- a/docs/Classes.html
+++ b/docs/Classes.html
@@ -21,7 +21,7 @@
HeroDebugView
-
- HeroDebugView
-
String
@@ -235,7 +232,7 @@
-
+
Classes
The following classes are available globally.
@@ -272,15 +269,11 @@
Declaration
-
-
-
-
-
-
-
-
-
-
-
@@ -373,19 +358,16 @@ Declaration
-
-
-
-
-
-
-
-
-
@@ -513,7 +487,7 @@ Declaration
@@ -544,7 +518,7 @@ Declaration
@@ -575,7 +549,7 @@ Declaration
@@ -606,7 +580,7 @@ Declaration
@@ -637,7 +611,7 @@ Declaration
@@ -668,15 +642,11 @@ Declaration
-
-
-
-
-
-
-
-
@@ -734,11 +700,16 @@ Declaration
Swift
open class HeroTransition : NSObject
+
extension HeroTransition: UINavigationControllerDelegate
+
extension HeroTransition: UITabBarControllerDelegate
+
extension HeroTransition: UIViewControllerTransitioningDelegate
+
extension HeroTransition: UIViewControllerAnimatedTransitioning
+
extension HeroTransition: UIViewControllerInteractiveTransitioning
@@ -777,15 +748,11 @@ Declaration
-
-
-