Skip to content

Commit

Permalink
fixes #704 SPM missing imports
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Mattiello <mail@joemattiello.com>
  • Loading branch information
JoeMatt committed Mar 2, 2021
1 parent abb8626 commit 678db91
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/Extensions/Array+HeroModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

import Foundation

#if canImport(CoreGraphics)
import CoreGraphics
#endif

internal extension Array {
func get(_ index: Int) -> Element? {
if index < count {
Expand All @@ -32,12 +36,14 @@ internal extension Array {
}

internal extension Array where Element: ExprNode {
#if canImport(CoreGraphics)
func getCGFloat(_ index: Int) -> CGFloat? {
if let s = get(index) as? NumberNode {
return CGFloat(s.value)
}
return nil
}
#endif
func getDouble(_ index: Int) -> Double? {
if let s = get(index) as? NumberNode {
return Double(s.value)
Expand Down
1 change: 1 addition & 0 deletions Sources/HeroModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#if canImport(UIKit)
import UIKit
import CoreGraphics
import QuartzCore

public final class HeroModifier {
internal let apply:(inout HeroTargetState) -> Void
Expand Down
1 change: 1 addition & 0 deletions Sources/HeroTargetState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#if canImport(UIKit)
import CoreGraphics
import QuartzCore

public enum HeroSnapshotType {
/// Will optimize for different type of views
Expand Down

0 comments on commit 678db91

Please sign in to comment.