Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minimum deployment version of ios to 11.0 #797

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = FZXCM5CJ7P;
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.exyte.Example.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -550,7 +550,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = FZXCM5CJ7P;
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.exyte.Example.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion Macaw.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/exyte/Macaw.git', :tag => s.version.to_s }
s.social_media_url = 'http://exyte.com'

s.ios.deployment_target = "9.0"
s.ios.deployment_target = "11.0"
s.osx.deployment_target = "10.12"
s.requires_arc = true
s.swift_version = "5.3"
Expand Down
10 changes: 7 additions & 3 deletions Macaw.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -677,14 +677,14 @@
A7B47E44230EA402009DD7E5 /* Graphics_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A718CD451F45C28700966E06 /* Graphics_iOS.swift */; };
A7B47E45230EA404009DD7E5 /* Common_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A718CD431F45C28200966E06 /* Common_iOS.swift */; };
A7E675561EC4213500BD9ECB /* NodeBoundsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E675551EC4213500BD9ECB /* NodeBoundsTests.swift */; };
A7F46DEA270B2219008DA1DF /* CommonError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F46DE9270B2219008DA1DF /* CommonError.swift */; };
A7F46DEB270B2219008DA1DF /* CommonError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F46DE9270B2219008DA1DF /* CommonError.swift */; };
A7F46DE0270B0EE8008DA1DF /* XMLHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F46DDD270B0EE8008DA1DF /* XMLHash.swift */; };
A7F46DE1270B0EE8008DA1DF /* XMLHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F46DDD270B0EE8008DA1DF /* XMLHash.swift */; };
A7F46DE2270B0EE8008DA1DF /* shim.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F46DDE270B0EE8008DA1DF /* shim.swift */; };
A7F46DE3270B0EE8008DA1DF /* shim.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F46DDE270B0EE8008DA1DF /* shim.swift */; };
A7F46DE4270B0EE8008DA1DF /* XMLIndexer+XMLIndexerDeserializable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F46DDF270B0EE8008DA1DF /* XMLIndexer+XMLIndexerDeserializable.swift */; };
A7F46DE5270B0EE8008DA1DF /* XMLIndexer+XMLIndexerDeserializable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F46DDF270B0EE8008DA1DF /* XMLIndexer+XMLIndexerDeserializable.swift */; };
A7F46DEA270B2219008DA1DF /* CommonError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F46DE9270B2219008DA1DF /* CommonError.swift */; };
A7F46DEB270B2219008DA1DF /* CommonError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F46DE9270B2219008DA1DF /* CommonError.swift */; };
C410148E1F834D290022EE44 /* style.svg in Resources */ = {isa = PBXBuildFile; fileRef = C410148D1F834D280022EE44 /* style.svg */; };
C4153A8F1F8793DE001BA5EE /* small-logo.png in Resources */ = {isa = PBXBuildFile; fileRef = C4153A8E1F8793DD001BA5EE /* small-logo.png */; };
C46E83551F94B20E00208037 /* transform.svg in Resources */ = {isa = PBXBuildFile; fileRef = C46E83541F94B20E00208037 /* transform.svg */; };
Expand Down Expand Up @@ -1262,10 +1262,10 @@
A74C832B229FB7690085A832 /* color-prop-04-t-manual-osx.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-04-t-manual-osx.svg"; sourceTree = "<group>"; };
A74C832D229FBA4C0085A832 /* color-prop-04-t-manual-osx.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-04-t-manual-osx.reference"; sourceTree = "<group>"; };
A7E675551EC4213500BD9ECB /* NodeBoundsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NodeBoundsTests.swift; path = Bounds/NodeBoundsTests.swift; sourceTree = "<group>"; };
A7F46DE9270B2219008DA1DF /* CommonError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonError.swift; sourceTree = "<group>"; };
A7F46DDD270B0EE8008DA1DF /* XMLHash.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XMLHash.swift; sourceTree = "<group>"; };
A7F46DDE270B0EE8008DA1DF /* shim.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = shim.swift; sourceTree = "<group>"; };
A7F46DDF270B0EE8008DA1DF /* XMLIndexer+XMLIndexerDeserializable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "XMLIndexer+XMLIndexerDeserializable.swift"; sourceTree = "<group>"; };
A7F46DE9270B2219008DA1DF /* CommonError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonError.swift; sourceTree = "<group>"; };
C410148D1F834D280022EE44 /* style.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = style.svg; sourceTree = "<group>"; };
C4153A8E1F8793DD001BA5EE /* small-logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "small-logo.png"; sourceTree = "<group>"; };
C43B064C1F9738EF00787A35 /* clip.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = clip.svg; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3205,6 +3205,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = NO;
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "";
OTHER_SWIFT_FLAGS = "-D CARTHAGE";
PRODUCT_BUNDLE_IDENTIFIER = com.exyte.Macaw;
Expand All @@ -3230,6 +3231,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = NO;
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "";
OTHER_SWIFT_FLAGS = "-D CARTHAGE";
PRODUCT_BUNDLE_IDENTIFIER = com.exyte.Macaw;
Expand All @@ -3253,6 +3255,7 @@
"$(SDKROOT)",
);
INFOPLIST_FILE = MacawTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.exyte.MacawTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -3276,6 +3279,7 @@
"$(SDKROOT)",
);
INFOPLIST_FILE = MacawTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.exyte.MacawTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let package = Package(
name: "Macaw",
platforms: [
.macOS(.v10_12),
.iOS(.v9)
.iOS(.v11)
],
products: [
.library(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ We're working hard to provide full documentation. Currently you can take a look

## Requirements

* iOS 9.0+
* iOS 11.0+
* Mac OS X 10.11+
* Xcode 7.3+

Expand Down
16 changes: 8 additions & 8 deletions Source/animation/Animation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,34 @@ public class Animation {
}

public func state() -> AnimationState {
return .initial
.initial
}

public func easing(_ easing: Easing) -> Animation {
return self
self
}

public func delay(_ delay: Double) -> Animation {
return self
self
}

public func cycle(_ count: Double) -> Animation {
return self
self
}

public func cycle() -> Animation {
return self
self
}

public func reverse() -> Animation {
return self
self
}

public func autoreversed() -> Animation {
return self
self
}

@discardableResult public func onComplete(_: @escaping (() -> Void)) -> Animation {
return self
self
}
}
10 changes: 5 additions & 5 deletions Source/animation/AnimationImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ class BasicAnimation: Animation {
}

override open func reverse() -> Animation {
return self
self
}

func getDuration() -> Double { return 0 }
func getDuration() -> Double { 0 }
}

// MARK: - Hashable
Expand All @@ -150,14 +150,14 @@ extension BasicAnimation: Hashable {
}

public static func == (lhs: BasicAnimation, rhs: BasicAnimation) -> Bool {
return lhs.ID == rhs.ID
lhs.ID == rhs.ID
}
}

// MARK: - Activity
extension BasicAnimation {
func isActive() -> Bool {
return progress > 0.0 && progress < 1.0
progress > 0.0 && progress < 1.0
}
}

Expand Down Expand Up @@ -284,6 +284,6 @@ open class AnimationDescription <T> {
}

open func t(_ duration: Double, delay: Double = 0.0) -> AnimationDescription<T> {
return AnimationDescription(valueFunc: valueFunc, duration: duration, delay: delay)
AnimationDescription(valueFunc: valueFunc, duration: duration, delay: delay)
}
}
2 changes: 1 addition & 1 deletion Source/animation/AnimationUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
class AbsoluteUtils {

class func absolutePosition(_ nodeRenderer: NodeRenderer?, _ context: AnimationContext) -> Transform {
return AbsoluteUtils.absoluteTransform(nodeRenderer, context, pos: nodeRenderer?.node.place ?? .identity)
AbsoluteUtils.absoluteTransform(nodeRenderer, context, pos: nodeRenderer?.node.place ?? .identity)
}

class func absoluteTransform(_ nodeRenderer: NodeRenderer?, _ context: AnimationContext, pos: Transform) -> Transform {
Expand Down
10 changes: 5 additions & 5 deletions Source/animation/Easing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,26 @@ open class Easing {
public static let elasticInOut: Easing = ElasticInOut()

public static func elasticOut(elasticity: Double = 10.0) -> ElasticOut {
return ElasticOut(elasticity: elasticity)
ElasticOut(elasticity: elasticity)
}
public static func elasticInOut(elasticity: Double = 10.0) -> ElasticInOut {
return ElasticInOut(elasticity: elasticity)
ElasticInOut(elasticity: elasticity)
}

open func progressFor(time: Double) -> Double {
return time
time
}
}

private class EaseIn: Easing {
override open func progressFor(time t: Double) -> Double {
return t * t
t * t
}
}

private class EaseOut: Easing {
override open func progressFor(time t: Double) -> Double {
return -(t * (t - 2))
-(t * (t - 2))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import Foundation

// swiftlint:disable trailing_closure
public func >> (a: Double, b: Double) -> OpacityAnimationDescription {
return OpacityAnimationDescription(valueFunc: { t in
OpacityAnimationDescription(valueFunc: { t in
a.interpolate(b, progress: t)
})
}

public func >> (a: Transform, b: Transform) -> TransformAnimationDescription {
return TransformAnimationDescription(valueFunc: { t in
TransformAnimationDescription(valueFunc: { t in
a.interpolate(b, progress: t)
})
}

public func >> (a: Locus, b: Locus) -> MorphingAnimationDescription {
return MorphingAnimationDescription(valueFunc: { t in
MorphingAnimationDescription(valueFunc: { t in
// return a.interpolate(b, progress: t)
if t == 0.0 {
return a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ public protocol ContentsInterpolation: Interpolable {

extension Array: ContentsInterpolation {
public func interpolate(_ endValue: Array, progress: Double) -> Array {
return self
self
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ public protocol DoubleInterpolation: Interpolable {

extension Double: DoubleInterpolation {
public func interpolate(_ endValue: Double, progress: Double) -> Double {
return self + (endValue - self) * progress
self + (endValue - self) * progress
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public protocol FillInterpolation: Interpolable {

extension Fill: FillInterpolation {
public func interpolate(_ endValue: Fill, progress: Double) -> Self {
return self
self
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ public protocol LocusInterpolation: Interpolable {

extension Locus: LocusInterpolation {
public func interpolate(_ endValue: Locus, progress: Double) -> Self {
return self
self
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public protocol ShapeInterpolation: Interpolable {

extension Shape: ShapeInterpolation {
public func interpolate(_ endValue: Shape, progress: Double) -> Self {
return self
self
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public protocol StrokeInterpolation: Interpolable {

extension Stroke: StrokeInterpolation {
public func interpolate(_ endValue: Stroke, progress: Double) -> Self {
return self
self
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public protocol TransformInterpolation: Interpolable {

extension Transform: TransformInterpolation {
public func interpolate(_ endValue: Transform, progress: Double) -> Transform {
return Transform(m11: self.m11.interpolate(endValue.m11, progress: progress),
Transform(m11: self.m11.interpolate(endValue.m11, progress: progress),
m12: self.m12.interpolate(endValue.m12, progress: progress),
m21: self.m21.interpolate(endValue.m21, progress: progress),
m22: self.m22.interpolate(endValue.m22, progress: progress),
Expand Down
2 changes: 1 addition & 1 deletion Source/animation/layer_animation/PathFunctions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
typealias Func2D = ((_ t: Double) -> (Point))

func BezierFunc2D(_ t: Double, p0: Point, p1: Point, p2: Point, p3: Point) -> Point {
return Point(
Point(
x: polynom3(t, p0: p0.x, p1: p1.x, p2: p2.x, p3: p3.x),
y: polynom3(t, p0: p0.y, p1: p1.y, p2: p2.y, p3: p3.y))
}
Expand Down
6 changes: 3 additions & 3 deletions Source/animation/types/MorphingAnimation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class MorphingAnimation: AnimationImpl<Locus> {

convenience init(animatedNode: Shape, startValue: Locus, finalValue: Locus, animationDuration: Double, delay: Double = 0.0, autostart: Bool = false, fps: UInt = 30) {

let interpolationFunc = { (t: Double) -> Locus in
let interpolationFunc = { (_: Double) -> Locus in
finalValue
}

Expand Down Expand Up @@ -43,7 +43,7 @@ public extension AnimatableVariable where T: LocusInterpolation {
}

func animation(_ desc: MorphingAnimationDescription) -> Animation {
return MorphingAnimation(animatedNode: node as! Shape, valueFunc: desc.valueFunc, animationDuration: desc.duration, delay: desc.delay, autostart: false)
MorphingAnimation(animatedNode: node as! Shape, valueFunc: desc.valueFunc, animationDuration: desc.duration, delay: desc.delay, autostart: false)
}

func animate(from: Locus? = nil, to: Locus, during: Double = 1.0, delay: Double = 0.0) {
Expand All @@ -68,7 +68,7 @@ public extension AnimatableVariable where T: LocusInterpolation {
}

func animation(_ f: @escaping (Double) -> Locus, during: Double, delay: Double = 0.0) -> Animation {
return MorphingAnimation(animatedNode: node as! Shape, valueFunc: f, animationDuration: during, delay: delay)
MorphingAnimation(animatedNode: node as! Shape, valueFunc: f, animationDuration: during, delay: delay)
}

}
Expand Down
4 changes: 2 additions & 2 deletions Source/animation/types/OpacityAnimation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public extension AnimatableVariable where T: DoubleInterpolation {
}

func animation(_ desc: OpacityAnimationDescription) -> Animation {
return OpacityAnimation(animatedNode: node!, valueFunc: desc.valueFunc, animationDuration: desc.duration, delay: desc.delay, autostart: false)
OpacityAnimation(animatedNode: node!, valueFunc: desc.valueFunc, animationDuration: desc.duration, delay: desc.delay, autostart: false)
}

func animate(from: Double? = nil, to: Double, during: Double = 1.0, delay: Double = 0.0) {
Expand All @@ -72,7 +72,7 @@ public extension AnimatableVariable where T: DoubleInterpolation {
}

func animation(_ f: @escaping ((Double) -> Double), during: Double = 1.0, delay: Double = 0.0) -> Animation {
return OpacityAnimation(animatedNode: node!, valueFunc: f, animationDuration: during, delay: delay)
OpacityAnimation(animatedNode: node!, valueFunc: f, animationDuration: during, delay: delay)
}

}
Loading