diff --git a/Riot/Modules/LaunchLoading/ElementView.swift b/Riot/Modules/LaunchLoading/ElementView.swift index dd2a87866..697061efe 100644 --- a/Riot/Modules/LaunchLoading/ElementView.swift +++ b/Riot/Modules/LaunchLoading/ElementView.swift @@ -8,13 +8,12 @@ import UIKit @IBDesignable public class ElementView: UIView { public struct Defaults { - public static let size = CGSize(width: 130.22, height: 130.02) - public static let backgroundColor = UIColor(displayP3Red: 0.052, green: 0.743, blue: 0.543, alpha: 0) + public static let size = CGSize(width: 130.16, height: 127.75) + public static let backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0.021) } - public var element: UIView! - public var rectangle: ShapeView! - public var element_1: UIView! + public var icon: UIView! + public var _10242x: UIView! public var path: ShapeView! public var path_1: ShapeView! public var path_2: ShapeView! @@ -61,9 +60,8 @@ public class ElementView: UIView { private func createViews() { CATransaction.suppressAnimations { - createElement() - createRectangle() - createElement1() + createIcon() + create_10242x() createPath() createPath1() createPath2() @@ -71,54 +69,35 @@ public class ElementView: UIView { } } - private func createElement() { - element = UIView(frame: CGRect(x: 66, y: 65, width: 120, height: 120)) - element.backgroundColor = UIColor.clear - element.layer.shadowOffset = CGSize(width: 0, height: 0) - element.layer.shadowColor = UIColor.clear.cgColor - element.layer.shadowOpacity = 1 - element.layer.position = CGPoint(x: 66, y: 65) - element.layer.bounds = CGRect(x: 0, y: 0, width: 120, height: 120) - element.layer.masksToBounds = false + private func createIcon() { + icon = UIView(frame: CGRect(x: 65.21, y: 63.27, width: 120.77, height: 120.77)) + icon.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0) + icon.layer.shadowOffset = CGSize(width: 0, height: 0) + icon.layer.shadowColor = UIColor.clear.cgColor + icon.layer.shadowOpacity = 1 + icon.layer.position = CGPoint(x: 65.21, y: 63.27) + icon.layer.bounds = CGRect(x: 0, y: 0, width: 120.77, height: 120.77) + icon.layer.masksToBounds = false } - private func createRectangle() { - rectangle = ShapeView(frame: CGRect(x: 60, y: 60, width: 120.4, height: 120.4)) - rectangle.backgroundColor = UIColor.clear - rectangle.alpha = 0 - rectangle.layer.shadowOffset = CGSize(width: 0, height: 0) - rectangle.layer.shadowColor = UIColor.clear.cgColor - rectangle.layer.shadowOpacity = 1 - rectangle.layer.position = CGPoint(x: 60, y: 60) - rectangle.layer.bounds = CGRect(x: 0, y: 0, width: 120.4, height: 120.4) - rectangle.layer.masksToBounds = false - rectangle.shapeLayer.fillRule = CAShapeLayerFillRule.evenOdd - rectangle.shapeLayer.fillColor = nil - rectangle.shapeLayer.lineDashPattern = [] - rectangle.shapeLayer.lineDashPhase = 0 - rectangle.shapeLayer.lineWidth = 0 - rectangle.shapeLayer.path = CGPathCreateWithSVGString("M0.003,0.003l120.4,0 0,120.4 -120.4,0 0,-120.4zM0.003,0.003")! - - } - - private func createElement1() { - element_1 = UIView(frame: CGRect(x: 60, y: 60, width: 120, height: 120)) - element_1.backgroundColor = UIColor.clear - element_1.layer.shadowOffset = CGSize(width: 0, height: 0) - element_1.layer.shadowColor = UIColor.clear.cgColor - element_1.layer.shadowOpacity = 1 - element_1.layer.position = CGPoint(x: 60, y: 60) - element_1.layer.bounds = CGRect(x: 0, y: 0, width: 120, height: 120) - element_1.layer.masksToBounds = false + private func create_10242x() { + _10242x = UIView(frame: CGRect(x: 60.39, y: 60.39, width: 120, height: 120)) + _10242x.backgroundColor = UIColor.clear + _10242x.layer.shadowOffset = CGSize(width: 0, height: 0) + _10242x.layer.shadowColor = UIColor.clear.cgColor + _10242x.layer.shadowOpacity = 1 + _10242x.layer.position = CGPoint(x: 60.39, y: 60.39) + _10242x.layer.bounds = CGRect(x: 0, y: 0, width: 120, height: 120) + _10242x.layer.masksToBounds = false } private func createPath() { - path = ShapeView(frame: CGRect(x: 70.8, y: 27.6, width: 55.2, height: 55.2)) + path = ShapeView(frame: CGRect(x: 70.81, y: 27.59, width: 55.2, height: 55.2)) path.backgroundColor = UIColor.clear path.layer.shadowOffset = CGSize(width: 0, height: 0) path.layer.shadowColor = UIColor.clear.cgColor path.layer.shadowOpacity = 1 - path.layer.position = CGPoint(x: 70.8, y: 27.6) + path.layer.position = CGPoint(x: 70.81, y: 27.59) path.layer.bounds = CGRect(x: 0, y: 0, width: 55.2, height: 55.2) path.layer.masksToBounds = false path.shapeLayer.fillRule = CAShapeLayerFillRule.evenOdd @@ -131,12 +110,12 @@ public class ElementView: UIView { } private func createPath1() { - path_1 = ShapeView(frame: CGRect(x: 49.2, y: 92.4, width: 55.2, height: 55.2)) + path_1 = ShapeView(frame: CGRect(x: 49.2, y: 92.41, width: 55.2, height: 55.2)) path_1.backgroundColor = UIColor.clear path_1.layer.shadowOffset = CGSize(width: 0, height: 0) path_1.layer.shadowColor = UIColor.clear.cgColor path_1.layer.shadowOpacity = 1 - path_1.layer.position = CGPoint(x: 49.2, y: 92.4) + path_1.layer.position = CGPoint(x: 49.2, y: 92.41) path_1.layer.bounds = CGRect(x: 0, y: 0, width: 55.2, height: 55.2) path_1.layer.masksToBounds = false path_1.shapeLayer.fillRule = CAShapeLayerFillRule.evenOdd @@ -149,12 +128,12 @@ public class ElementView: UIView { } private func createPath2() { - path_2 = ShapeView(frame: CGRect(x: 27.6, y: 49.2, width: 55.2, height: 55.2)) + path_2 = ShapeView(frame: CGRect(x: 27.59, y: 49.2, width: 55.2, height: 55.2)) path_2.backgroundColor = UIColor.clear path_2.layer.shadowOffset = CGSize(width: 0, height: 0) path_2.layer.shadowColor = UIColor.clear.cgColor path_2.layer.shadowOpacity = 1 - path_2.layer.position = CGPoint(x: 27.6, y: 49.2) + path_2.layer.position = CGPoint(x: 27.59, y: 49.2) path_2.layer.bounds = CGRect(x: 0, y: 0, width: 55.2, height: 55.2) path_2.layer.masksToBounds = false path_2.shapeLayer.fillRule = CAShapeLayerFillRule.evenOdd @@ -167,12 +146,12 @@ public class ElementView: UIView { } private func createPath3() { - path_3 = ShapeView(frame: CGRect(x: 92.4, y: 70.8, width: 55.2, height: 55.2)) + path_3 = ShapeView(frame: CGRect(x: 92.41, y: 70.81, width: 55.2, height: 55.2)) path_3.backgroundColor = UIColor.clear path_3.layer.shadowOffset = CGSize(width: 0, height: 0) path_3.layer.shadowColor = UIColor.clear.cgColor path_3.layer.shadowOpacity = 1 - path_3.layer.position = CGPoint(x: 92.4, y: 70.8) + path_3.layer.position = CGPoint(x: 92.41, y: 70.81) path_3.layer.bounds = CGRect(x: 0, y: 0, width: 55.2, height: 55.2) path_3.layer.masksToBounds = false path_3.shapeLayer.fillRule = CAShapeLayerFillRule.evenOdd @@ -185,12 +164,11 @@ public class ElementView: UIView { } private func addSubviews() { - element_1.addSubview(path) - element_1.addSubview(path_1) - element_1.addSubview(path_2) - element_1.addSubview(path_3) - element.addSubview(rectangle) - element.addSubview(element_1) - addSubview(element) + _10242x.addSubview(path) + _10242x.addSubview(path_1) + _10242x.addSubview(path_2) + _10242x.addSubview(path_3) + icon.addSubview(_10242x) + addSubview(icon) } } diff --git a/Riot/Modules/LaunchLoading/Flow/ElementView.swift b/Riot/Modules/LaunchLoading/Flow/ElementView.swift deleted file mode 100644 index c786c47e9..000000000 --- a/Riot/Modules/LaunchLoading/Flow/ElementView.swift +++ /dev/null @@ -1,196 +0,0 @@ -// Made With Flow. -// -// DO NOT MODIFY, your changes will be lost when this file is regenerated. -// - -import UIKit - -@IBDesignable -public class ElementView: UIView { - public struct Defaults { - public static let size = CGSize(width: 130.22, height: 130.02) - public static let backgroundColor = UIColor(DisplayP3Red: 0.052, green: 0.743, blue: 0.543, alpha: 0) - } - - public var element: UIView! - public var rectangle: ShapeView! - public var element_1: UIView! - public var path: ShapeView! - public var path_1: ShapeView! - public var path_2: ShapeView! - public var path_3: ShapeView! - - public override var intrinsicContentSize: CGSize { - return Defaults.size - } - - public override init(frame: CGRect) { - super.init(frame: frame) - setup() - } - - public required init?(coder: NSCoder) { - super.init(coder: coder) - setup() - } - - private func setup() { - backgroundColor = Defaults.backgroundColor - clipsToBounds = false - createViews() - addSubviews() - //scale(to: frame.size) - } - - /// Scales `self` and its subviews to `size`. - /// - /// - Parameter size: The size `self` is scaled to. - /// - /// UIKit specifies: "In iOS 8.0 and later, the transform property does not affect Auto Layout. Auto layout - /// calculates a view's alignment rectangle based on its untransformed frame." - /// - /// see: https://developer.apple.com/documentation/uikit/uiview/1622459-transform - /// - /// If there are any constraints in IB affecting the frame of `self`, this method will have consequences on - /// layout / rendering. To properly scale an animation, you will have to position the view manually. - public func scale(to size: CGSize) { - let x = size.width / Defaults.size.width - let y = size.height / Defaults.size.height - transform = CGAffineTransform(scaleX: x, y: y) - } - - private func createViews() { - CATransaction.suppressAnimations { - createElement() - createRectangle() - createElement1() - createPath() - createPath1() - createPath2() - createPath3() - } - } - - private func createElement() { - element = UIView(frame: CGRect(x: 66, y: 65, width: 120, height: 120)) - element.backgroundColor = UIColor.clear - element.layer.shadowOffset = CGSize(width: 0, height: 0) - element.layer.shadowColor = UIColor.clear.cgColor - element.layer.shadowOpacity = 1 - element.layer.position = CGPoint(x: 66, y: 65) - element.layer.bounds = CGRect(x: 0, y: 0, width: 120, height: 120) - element.layer.masksToBounds = false - } - - private func createRectangle() { - rectangle = ShapeView(frame: CGRect(x: 60, y: 60, width: 120.4, height: 120.4)) - rectangle.backgroundColor = UIColor.clear - rectangle.alpha = 0 - rectangle.layer.shadowOffset = CGSize(width: 0, height: 0) - rectangle.layer.shadowColor = UIColor.clear.cgColor - rectangle.layer.shadowOpacity = 1 - rectangle.layer.position = CGPoint(x: 60, y: 60) - rectangle.layer.bounds = CGRect(x: 0, y: 0, width: 120.4, height: 120.4) - rectangle.layer.masksToBounds = false - rectangle.shapeLayer.fillRule = CAShapeLayerFillRule.evenOdd - rectangle.shapeLayer.fillColor = nil - rectangle.shapeLayer.lineDashPattern = [] - rectangle.shapeLayer.lineDashPhase = 0 - rectangle.shapeLayer.lineWidth = 0 - rectangle.shapeLayer.path = CGPathCreateWithSVGString("M0.003,0.003l120.4,0 0,120.4 -120.4,0 0,-120.4zM0.003,0.003")! - - } - - private func createElement1() { - element_1 = UIView(frame: CGRect(x: 60, y: 60, width: 120, height: 120)) - element_1.backgroundColor = UIColor.clear - element_1.layer.shadowOffset = CGSize(width: 0, height: 0) - element_1.layer.shadowColor = UIColor.clear.cgColor - element_1.layer.shadowOpacity = 1 - element_1.layer.position = CGPoint(x: 60, y: 60) - element_1.layer.bounds = CGRect(x: 0, y: 0, width: 120, height: 120) - element_1.layer.masksToBounds = false - } - - private func createPath() { - path = ShapeView(frame: CGRect(x: 70.8, y: 27.6, width: 55.2, height: 55.2)) - path.backgroundColor = UIColor.clear - path.layer.shadowOffset = CGSize(width: 0, height: 0) - path.layer.shadowColor = UIColor.clear.cgColor - path.layer.shadowOpacity = 1 - path.layer.position = CGPoint(x: 70.8, y: 27.6) - path.layer.bounds = CGRect(x: 0, y: 0, width: 55.2, height: 55.2) - path.layer.masksToBounds = false - path.shapeLayer.fillRule = CAShapeLayerFillRule.evenOdd - path.shapeLayer.fillColor = UIColor(DisplayP3Red: 0.052, green: 0.743, blue: 0.543, alpha: 1).cgColor - path.shapeLayer.lineDashPattern = [] - path.shapeLayer.lineDashPhase = 0 - path.shapeLayer.lineWidth = 0 - path.shapeLayer.path = CGPathCreateWithSVGString("M0,7.2c0,-3.976,3.224,-7.2,7.2,-7.2 26.51,0,48,21.49,48,48 0,3.976,-3.224,7.2,-7.2,7.2 -3.976,0,-7.2,-3.224,-7.2,-7.2 0,-18.557,-15.043,-33.6,-33.6,-33.6 -3.976,0,-7.2,-3.224,-7.2,-7.2zM0,7.2")! - - } - - private func createPath1() { - path_1 = ShapeView(frame: CGRect(x: 49.2, y: 92.4, width: 55.2, height: 55.2)) - path_1.backgroundColor = UIColor.clear - path_1.layer.shadowOffset = CGSize(width: 0, height: 0) - path_1.layer.shadowColor = UIColor.clear.cgColor - path_1.layer.shadowOpacity = 1 - path_1.layer.position = CGPoint(x: 49.2, y: 92.4) - path_1.layer.bounds = CGRect(x: 0, y: 0, width: 55.2, height: 55.2) - path_1.layer.masksToBounds = false - path_1.shapeLayer.fillRule = CAShapeLayerFillRule.evenOdd - path_1.shapeLayer.fillColor = UIColor(DisplayP3Red: 0.052, green: 0.743, blue: 0.543, alpha: 1).cgColor - path_1.shapeLayer.lineDashPattern = [] - path_1.shapeLayer.lineDashPhase = 0 - path_1.shapeLayer.lineWidth = 0 - path_1.shapeLayer.path = CGPathCreateWithSVGString("M55.2,48c0,3.976,-3.224,7.2,-7.2,7.2 -26.51,0,-48,-21.49,-48,-48 0,-3.976,3.224,-7.2,7.2,-7.2 3.976,0,7.2,3.224,7.2,7.2 0,18.557,15.043,33.6,33.6,33.6 3.976,0,7.2,3.224,7.2,7.2zM55.2,48")! - - } - - private func createPath2() { - path_2 = ShapeView(frame: CGRect(x: 27.6, y: 49.2, width: 55.2, height: 55.2)) - path_2.backgroundColor = UIColor.clear - path_2.layer.shadowOffset = CGSize(width: 0, height: 0) - path_2.layer.shadowColor = UIColor.clear.cgColor - path_2.layer.shadowOpacity = 1 - path_2.layer.position = CGPoint(x: 27.6, y: 49.2) - path_2.layer.bounds = CGRect(x: 0, y: 0, width: 55.2, height: 55.2) - path_2.layer.masksToBounds = false - path_2.shapeLayer.fillRule = CAShapeLayerFillRule.evenOdd - path_2.shapeLayer.fillColor = UIColor(DisplayP3Red: 0.052, green: 0.743, blue: 0.543, alpha: 1).cgColor - path_2.shapeLayer.lineDashPattern = [] - path_2.shapeLayer.lineDashPhase = 0 - path_2.shapeLayer.lineWidth = 0 - path_2.shapeLayer.path = CGPathCreateWithSVGString("M7.2,55.2c-3.976,0,-7.2,-3.224,-7.2,-7.2 0,-26.51,21.49,-48,48,-48 3.976,0,7.2,3.224,7.2,7.2 0,3.976,-3.224,7.2,-7.2,7.2 -18.557,0,-33.6,15.043,-33.6,33.6 0,3.976,-3.224,7.2,-7.2,7.2zM7.2,55.2")! - - } - - private func createPath3() { - path_3 = ShapeView(frame: CGRect(x: 92.4, y: 70.8, width: 55.2, height: 55.2)) - path_3.backgroundColor = UIColor.clear - path_3.layer.shadowOffset = CGSize(width: 0, height: 0) - path_3.layer.shadowColor = UIColor.clear.cgColor - path_3.layer.shadowOpacity = 1 - path_3.layer.position = CGPoint(x: 92.4, y: 70.8) - path_3.layer.bounds = CGRect(x: 0, y: 0, width: 55.2, height: 55.2) - path_3.layer.masksToBounds = false - path_3.shapeLayer.fillRule = CAShapeLayerFillRule.evenOdd - path_3.shapeLayer.fillColor = UIColor(DisplayP3Red: 0.052, green: 0.743, blue: 0.543, alpha: 1).cgColor - path_3.shapeLayer.lineDashPattern = [] - path_3.shapeLayer.lineDashPhase = 0 - path_3.shapeLayer.lineWidth = 0 - path_3.shapeLayer.path = CGPathCreateWithSVGString("M48,0c3.976,0,7.2,3.224,7.2,7.2 0,26.51,-21.49,48,-48,48 -3.976,0,-7.2,-3.224,-7.2,-7.2 0,-3.976,3.224,-7.2,7.2,-7.2 18.557,0,33.6,-15.043,33.6,-33.6 0,-3.976,3.224,-7.2,7.2,-7.2zM48,0")! - - } - - private func addSubviews() { - element_1.addSubview(path) - element_1.addSubview(path_1) - element_1.addSubview(path_2) - element_1.addSubview(path_3) - element.addSubview(rectangle) - element.addSubview(element_1) - addSubview(element) - } -} diff --git a/Riot/Modules/LaunchLoading/Flow/ElementViewController.swift b/Riot/Modules/LaunchLoading/Flow/ElementViewController.swift deleted file mode 100644 index 52a352ea2..000000000 --- a/Riot/Modules/LaunchLoading/Flow/ElementViewController.swift +++ /dev/null @@ -1,29 +0,0 @@ -// Made With Flow. -// -// DO NOT MODIFY, your changes will be lost when this file is regenerated. -// - -import UIKit - -public class ElementViewController: UIViewController { - @IBOutlet public weak var element: ElementView! - public var timeline: Timeline_1! - - public override func viewDidLoad() { - super.viewDidLoad() - timeline = Timeline_1(view: element, duration: 2) - - timeline.play() - DispatchQueue.main.asyncAfter(deadline: .now() + timeline.duration) { - self.showStartViewController() - } - } - - private func showStartViewController() { - let storyboard = UIStoryboard(name: "Main", bundle: nil) - let startViewController = storyboard.instantiateViewController(withIdentifier: "StartViewController") - startViewController.modalPresentationStyle = .custom - startViewController.modalTransitionStyle = .crossDissolve - present(startViewController, animated: true, completion: nil) - } -} diff --git a/Riot/Modules/LaunchLoading/Flow/Timeline_1.swift b/Riot/Modules/LaunchLoading/Flow/Timeline_1.swift deleted file mode 100644 index 7ae60a6bd..000000000 --- a/Riot/Modules/LaunchLoading/Flow/Timeline_1.swift +++ /dev/null @@ -1,149 +0,0 @@ -// Made With Flow. -// -// DO NOT MODIFY, your changes will be lost when this file is regenerated. -// -// swiftlint:disable all - -import UIKit - -public class Timeline_1: Timeline { - public convenience init(view: ElementView, duration: TimeInterval, autoreverses: Bool = false, repeatCount: Float = 0) { - let animationsByLayer = Timeline_1.animationsByLayer(view: view, duration: duration) - self.init(view: view, animationsByLayer: animationsByLayer, sounds: [], duration: duration, autoreverses: autoreverses, repeatCount: repeatCount) - } - private static func animationsByLayer(view: ElementView, duration: TimeInterval) -> [CALayer: [CAKeyframeAnimation]] { - // Keyframe Animations for element - let position_x_element: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "position.x" - keyframeAnimation.values = [66, 65.65] - keyframeAnimation.keyTimes = [0, 1] - keyframeAnimation.timingFunctions = [.easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - let position_y_element: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "position.y" - keyframeAnimation.values = [65, 65.5] - keyframeAnimation.keyTimes = [0, 1] - keyframeAnimation.timingFunctions = [.easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - let transform_rotation_z_element: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "transform.rotation.z" - keyframeAnimation.values = [0, 3.14159, 6.28319] - keyframeAnimation.keyTimes = [0, 0.5, 1] - keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - let bounds_size_width_element: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "bounds.size.width" - keyframeAnimation.values = [120, 120, 201] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - let bounds_size_height_element: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "bounds.size.height" - keyframeAnimation.values = [120, 120, 201] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - - // Keyframe Animations for rectangle - let position_x_rectangle: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "position.x" - keyframeAnimation.values = [60, 60.2, 100.84] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - let position_y_rectangle: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "position.y" - keyframeAnimation.values = [60, 60.2, 100.84] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - let bounds_size_width_rectangle: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "bounds.size.width" - keyframeAnimation.values = [120.4, 120.4, 201.67] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - let bounds_size_height_rectangle: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "bounds.size.height" - keyframeAnimation.values = [120.4, 120.4, 201.67] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - let path_rectangle: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "path" - keyframeAnimation.values = [CGPathCreateWithSVGString("M0.003,0.003l120.4,0 0,120.4 -120.4,0 0,-120.4zM0.003,0.003")!, CGPathCreateWithSVGString("M0.003,0.003l120.4,0 0,120.4 -120.4,0 0,-120.4zM0.003,0.003")!, CGPathCreateWithSVGString("M0.005,0.005l201.67,0 0,201.67 -201.67,0 0,-201.67zM0.005,0.005")!] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - - // Keyframe Animations for element_1 - let position_x_element_1: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "position.x" - keyframeAnimation.values = [60, 60, 100.5] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - let position_y_element_1: CAKeyframeAnimation = { - let keyframeAnimation = CAKeyframeAnimation() - keyframeAnimation.keyPath = "position.y" - keyframeAnimation.values = [60, 60, 100.5] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] - keyframeAnimation.duration = duration - - return keyframeAnimation - }() - - // Organize CAKeyframeAnimations by CALayer - var animationsByLayer = [CALayer: [CAKeyframeAnimation]]() - animationsByLayer[view.rectangle.layer] = [position_x_rectangle, bounds_size_height_rectangle, bounds_size_width_rectangle, path_rectangle, position_y_rectangle] - animationsByLayer[view.element_1.layer] = [position_x_element_1, position_y_element_1] - animationsByLayer[view.element.layer] = [position_x_element, bounds_size_height_element, bounds_size_width_element, position_y_element, transform_rotation_z_element] - - return animationsByLayer - } -} diff --git a/Riot/Modules/LaunchLoading/Timeline_1.swift b/Riot/Modules/LaunchLoading/Timeline_1.swift index 308fe3eab..49b5d209d 100644 --- a/Riot/Modules/LaunchLoading/Timeline_1.swift +++ b/Riot/Modules/LaunchLoading/Timeline_1.swift @@ -12,127 +12,313 @@ public class Timeline_1: Timeline { self.init(view: view, animationsByLayer: animationsByLayer, sounds: [], duration: duration, autoreverses: autoreverses, repeatCount: repeatCount) } private static func animationsByLayer(view: ElementView, duration: TimeInterval) -> [CALayer: [CAKeyframeAnimation]] { - // Keyframe Animations for element - let position_x_element: CAKeyframeAnimation = { + // Keyframe Animations for icon + let position_x_icon: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "position.x" - keyframeAnimation.values = [66, 65.65] - keyframeAnimation.keyTimes = [0, 1] - keyframeAnimation.timingFunctions = [.easeInEaseOut] + keyframeAnimation.values = [65.21, 65.06, 65, 64.63] + keyframeAnimation.keyTimes = [0, 0.5, 0.96, 1] + keyframeAnimation.timingFunctions = [.easeIn, .easeOut, .easeInEaseOut] keyframeAnimation.duration = duration return keyframeAnimation }() - let position_y_element: CAKeyframeAnimation = { + let position_y_icon: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "position.y" - keyframeAnimation.values = [65, 65.5] - keyframeAnimation.keyTimes = [0, 1] - keyframeAnimation.timingFunctions = [.easeInEaseOut] + keyframeAnimation.values = [63.27, 63.43, 63, 63.29] + keyframeAnimation.keyTimes = [0, 0.5, 0.96, 1] + keyframeAnimation.timingFunctions = [.easeIn, .easeOut, .easeInEaseOut] keyframeAnimation.duration = duration return keyframeAnimation }() - let transform_rotation_z_element: CAKeyframeAnimation = { + let transform_rotation_z_icon: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "transform.rotation.z" keyframeAnimation.values = [0, 3.14159, 6.28319] - keyframeAnimation.keyTimes = [0, 0.5, 1] - keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeIn, .easeOut] keyframeAnimation.duration = duration return keyframeAnimation }() - let bounds_size_width_element: CAKeyframeAnimation = { + let bounds_size_width_icon: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "bounds.size.width" - keyframeAnimation.values = [120, 120, 201] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] + keyframeAnimation.values = [120.77, 141.91, 120.77] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeIn, .easeOut] keyframeAnimation.duration = duration return keyframeAnimation }() - let bounds_size_height_element: CAKeyframeAnimation = { + let bounds_size_height_icon: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "bounds.size.height" - keyframeAnimation.values = [120, 120, 201] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] + keyframeAnimation.values = [120.77, 141.91, 120.77] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeIn, .easeOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let backgroundcolor_icon: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "backgroundColor" + keyframeAnimation.values = [UIColor(red: 1, green: 1, blue: 1, alpha: 0).cgColor, UIColor.clear.cgColor] + keyframeAnimation.keyTimes = [0, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut] keyframeAnimation.duration = duration return keyframeAnimation }() - // Keyframe Animations for rectangle - let position_x_rectangle: CAKeyframeAnimation = { + // Keyframe Animations for _10242x + let position_x__10242x: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "position.x" - keyframeAnimation.values = [60, 60.2, 100.84] - keyframeAnimation.keyTimes = [0, 0.125, 1] + keyframeAnimation.values = [60.39, 70.96, 60.39] + keyframeAnimation.keyTimes = [0, 0.5, 1] keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] keyframeAnimation.duration = duration return keyframeAnimation }() - let position_y_rectangle: CAKeyframeAnimation = { + let position_y__10242x: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "position.y" - keyframeAnimation.values = [60, 60.2, 100.84] - keyframeAnimation.keyTimes = [0, 0.125, 1] + keyframeAnimation.values = [60.39, 70.96, 60.39] + keyframeAnimation.keyTimes = [0, 0.5, 1] keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] keyframeAnimation.duration = duration return keyframeAnimation }() - let bounds_size_width_rectangle: CAKeyframeAnimation = { + let bounds_size_width__10242x: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "bounds.size.width" - keyframeAnimation.values = [120.4, 120.4, 201.67] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] + keyframeAnimation.values = [120, 141.96, 120] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] keyframeAnimation.duration = duration return keyframeAnimation }() - let bounds_size_height_rectangle: CAKeyframeAnimation = { + let bounds_size_height__10242x: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "bounds.size.height" - keyframeAnimation.values = [120.4, 120.4, 201.67] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] + keyframeAnimation.values = [120, 141.96, 120] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] keyframeAnimation.duration = duration return keyframeAnimation }() - let path_rectangle: CAKeyframeAnimation = { + + // Keyframe Animations for path + let position_x_path: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "position.x" + keyframeAnimation.values = [70.81, 83.73, 70.81] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let position_y_path: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "position.y" + keyframeAnimation.values = [27.59, 32.64, 27.59] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let bounds_size_width_path: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "bounds.size.width" + keyframeAnimation.values = [55.2, 65.27, 55.2] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let bounds_size_height_path: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "bounds.size.height" + keyframeAnimation.values = [55.2, 65.27, 55.2] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let path_path: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "path" - keyframeAnimation.values = [CGPathCreateWithSVGString("M0.003,0.003l120.4,0 0,120.4 -120.4,0 0,-120.4zM0.003,0.003")!, CGPathCreateWithSVGString("M0.003,0.003l120.4,0 0,120.4 -120.4,0 0,-120.4zM0.003,0.003")!, CGPathCreateWithSVGString("M0.005,0.005l201.67,0 0,201.67 -201.67,0 0,-201.67zM0.005,0.005")!] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] + keyframeAnimation.values = [CGPathCreateWithSVGString("M0,7.2c0,-3.976,3.224,-7.2,7.2,-7.2 26.51,0,48,21.49,48,48 0,3.976,-3.224,7.2,-7.2,7.2 -3.976,0,-7.2,-3.224,-7.2,-7.2 0,-18.557,-15.043,-33.6,-33.6,-33.6 -3.976,0,-7.2,-3.224,-7.2,-7.2zM0,7.2")!, CGPathCreateWithSVGString("M0,8.513c0,-4.702,3.812,-8.513,8.513,-8.513 31.346,0,56.757,25.411,56.757,56.757 0,4.702,-3.812,8.513,-8.513,8.513 -4.702,0,-8.513,-3.812,-8.513,-8.513 0,-21.942,-17.787,-39.73,-39.73,-39.73 -4.702,0,-8.513,-3.812,-8.513,-8.513zM0,8.513")!, CGPathCreateWithSVGString("M0,7.2c0,-3.976,3.224,-7.2,7.2,-7.2 26.51,0,48,21.49,48,48 0,3.976,-3.224,7.2,-7.2,7.2 -3.976,0,-7.2,-3.224,-7.2,-7.2 0,-18.557,-15.043,-33.6,-33.6,-33.6 -3.976,0,-7.2,-3.224,-7.2,-7.2zM0,7.2")!] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] keyframeAnimation.duration = duration return keyframeAnimation }() - // Keyframe Animations for element_1 - let position_x_element_1: CAKeyframeAnimation = { + // Keyframe Animations for path_1 + let position_x_path_1: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "position.x" - keyframeAnimation.values = [60, 60, 100.5] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] + keyframeAnimation.values = [49.2, 58.19, 49.2] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] keyframeAnimation.duration = duration return keyframeAnimation }() - let position_y_element_1: CAKeyframeAnimation = { + let position_y_path_1: CAKeyframeAnimation = { let keyframeAnimation = CAKeyframeAnimation() keyframeAnimation.keyPath = "position.y" - keyframeAnimation.values = [60, 60, 100.5] - keyframeAnimation.keyTimes = [0, 0.125, 1] - keyframeAnimation.timingFunctions = [.linear, .easeInEaseOut] + keyframeAnimation.values = [92.41, 109.27, 92.41] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let bounds_size_width_path_1: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "bounds.size.width" + keyframeAnimation.values = [55.2, 65.27, 55.2] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let bounds_size_height_path_1: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "bounds.size.height" + keyframeAnimation.values = [55.2, 65.27, 55.2] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let path_path_1: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "path" + keyframeAnimation.values = [CGPathCreateWithSVGString("M55.2,48c0,3.976,-3.224,7.2,-7.2,7.2 -26.51,0,-48,-21.49,-48,-48 0,-3.976,3.224,-7.2,7.2,-7.2 3.976,0,7.2,3.224,7.2,7.2 0,18.557,15.043,33.6,33.6,33.6 3.976,0,7.2,3.224,7.2,7.2zM55.2,48")!, CGPathCreateWithSVGString("M65.27,56.757c0,4.702,-3.812,8.513,-8.513,8.513 -31.346,0,-56.757,-25.411,-56.757,-56.757 0,-4.702,3.812,-8.513,8.513,-8.513 4.702,0,8.513,3.812,8.513,8.513 0,21.942,17.787,39.73,39.73,39.73 4.702,0,8.513,3.812,8.513,8.513zM65.27,56.757")!, CGPathCreateWithSVGString("M55.2,48c0,3.976,-3.224,7.2,-7.2,7.2 -26.51,0,-48,-21.49,-48,-48 0,-3.976,3.224,-7.2,7.2,-7.2 3.976,0,7.2,3.224,7.2,7.2 0,18.557,15.043,33.6,33.6,33.6 3.976,0,7.2,3.224,7.2,7.2zM55.2,48")!] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + + // Keyframe Animations for path_2 + let position_x_path_2: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "position.x" + keyframeAnimation.values = [27.59, 32.64, 27.59] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let position_y_path_2: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "position.y" + keyframeAnimation.values = [49.2, 58.19, 49.2] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let bounds_size_width_path_2: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "bounds.size.width" + keyframeAnimation.values = [55.2, 65.27, 55.2] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let bounds_size_height_path_2: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "bounds.size.height" + keyframeAnimation.values = [55.2, 65.27, 55.2] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let path_path_2: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "path" + keyframeAnimation.values = [CGPathCreateWithSVGString("M7.2,55.2c-3.976,0,-7.2,-3.224,-7.2,-7.2 0,-26.51,21.49,-48,48,-48 3.976,0,7.2,3.224,7.2,7.2 0,3.976,-3.224,7.2,-7.2,7.2 -18.557,0,-33.6,15.043,-33.6,33.6 0,3.976,-3.224,7.2,-7.2,7.2zM7.2,55.2")!, CGPathCreateWithSVGString("M8.513,65.27c-4.702,0,-8.513,-3.812,-8.513,-8.513 0,-31.346,25.411,-56.757,56.757,-56.757 4.702,0,8.513,3.812,8.513,8.513 0,4.702,-3.812,8.513,-8.513,8.513 -21.942,0,-39.73,17.787,-39.73,39.73 0,4.702,-3.812,8.513,-8.513,8.513zM8.513,65.27")!, CGPathCreateWithSVGString("M7.2,55.2c-3.976,0,-7.2,-3.224,-7.2,-7.2 0,-26.51,21.49,-48,48,-48 3.976,0,7.2,3.224,7.2,7.2 0,3.976,-3.224,7.2,-7.2,7.2 -18.557,0,-33.6,15.043,-33.6,33.6 0,3.976,-3.224,7.2,-7.2,7.2zM7.2,55.2")!] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + + // Keyframe Animations for path_3 + let position_x_path_3: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "position.x" + keyframeAnimation.values = [92.41, 109.27, 92.41] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let position_y_path_3: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "position.y" + keyframeAnimation.values = [70.81, 83.73, 70.81] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let bounds_size_width_path_3: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "bounds.size.width" + keyframeAnimation.values = [55.2, 65.27, 55.2] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let bounds_size_height_path_3: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "bounds.size.height" + keyframeAnimation.values = [55.2, 65.27, 55.2] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] + keyframeAnimation.duration = duration + + return keyframeAnimation + }() + let path_path_3: CAKeyframeAnimation = { + let keyframeAnimation = CAKeyframeAnimation() + keyframeAnimation.keyPath = "path" + keyframeAnimation.values = [CGPathCreateWithSVGString("M48,0c3.976,0,7.2,3.224,7.2,7.2 0,26.51,-21.49,48,-48,48 -3.976,0,-7.2,-3.224,-7.2,-7.2 0,-3.976,3.224,-7.2,7.2,-7.2 18.557,0,33.6,-15.043,33.6,-33.6 0,-3.976,3.224,-7.2,7.2,-7.2zM48,0")!, CGPathCreateWithSVGString("M56.757,0c4.702,0,8.513,3.812,8.513,8.513 0,31.346,-25.411,56.757,-56.757,56.757 -4.702,0,-8.513,-3.812,-8.513,-8.513 0,-4.702,3.812,-8.513,8.513,-8.513 21.942,0,39.73,-17.787,39.73,-39.73 0,-4.702,3.812,-8.513,8.513,-8.513zM56.757,0")!, CGPathCreateWithSVGString("M48,0c3.976,0,7.2,3.224,7.2,7.2 0,26.51,-21.49,48,-48,48 -3.976,0,-7.2,-3.224,-7.2,-7.2 0,-3.976,3.224,-7.2,7.2,-7.2 18.557,0,33.6,-15.043,33.6,-33.6 0,-3.976,3.224,-7.2,7.2,-7.2zM48,0")!] + keyframeAnimation.keyTimes = [0, 0.5, 1] + keyframeAnimation.timingFunctions = [.easeInEaseOut, .easeInEaseOut] keyframeAnimation.duration = duration return keyframeAnimation @@ -140,10 +326,13 @@ public class Timeline_1: Timeline { // Organize CAKeyframeAnimations by CALayer var animationsByLayer = [CALayer: [CAKeyframeAnimation]]() - animationsByLayer[view.rectangle.layer] = [position_x_rectangle, bounds_size_height_rectangle, bounds_size_width_rectangle, path_rectangle, position_y_rectangle] - animationsByLayer[view.element_1.layer] = [position_x_element_1, position_y_element_1] - animationsByLayer[view.element.layer] = [position_x_element, bounds_size_height_element, bounds_size_width_element, position_y_element, transform_rotation_z_element] + animationsByLayer[view._10242x.layer] = [position_x__10242x, position_y__10242x, bounds_size_height__10242x, bounds_size_width__10242x] + animationsByLayer[view.path.layer] = [position_y_path, bounds_size_height_path, bounds_size_width_path, position_x_path, path_path] + animationsByLayer[view.path_1.layer] = [position_y_path_1, bounds_size_width_path_1, bounds_size_height_path_1, position_x_path_1, path_path_1] + animationsByLayer[view.path_2.layer] = [position_y_path_2, bounds_size_height_path_2, position_x_path_2, bounds_size_width_path_2, path_path_2] + animationsByLayer[view.icon.layer] = [backgroundcolor_icon, bounds_size_width_icon, position_x_icon, position_y_icon, bounds_size_height_icon, transform_rotation_z_icon] + animationsByLayer[view.path_3.layer] = [position_y_path_3, bounds_size_height_path_3, bounds_size_width_path_3, position_x_path_3, path_path_3] - return animationsByLayer + return animationsByLayer } }