From 85c9a3fe186673788ce98d00a16e9aa1ffa318e3 Mon Sep 17 00:00:00 2001 From: manindaniil Date: Fri, 28 Sep 2018 18:16:53 +0700 Subject: [PATCH] fix titles for animation view --- .../Example-macOS.xcodeproj/project.pbxproj | 2 ++ .../Examples/Easing/EasingView.swift | 28 ++++--------------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/Example-macOS/Example-macOS.xcodeproj/project.pbxproj b/Example-macOS/Example-macOS.xcodeproj/project.pbxproj index b2d273b9..a79a7be0 100644 --- a/Example-macOS/Example-macOS.xcodeproj/project.pbxproj +++ b/Example-macOS/Example-macOS.xcodeproj/project.pbxproj @@ -438,6 +438,7 @@ baseConfigurationReference = B752613023F25BBB88A17503 /* Pods-Example-macOS.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = "Example-macOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; @@ -452,6 +453,7 @@ baseConfigurationReference = BEA3A0212E620A41C8362253 /* Pods-Example-macOS.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = "Example-macOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; diff --git a/Example-macOS/Example-macOS/Examples/Easing/EasingView.swift b/Example-macOS/Example-macOS/Examples/Easing/EasingView.swift index f4277851..fd6abdf5 100644 --- a/Example-macOS/Example-macOS/Examples/Easing/EasingView.swift +++ b/Example-macOS/Example-macOS/Examples/Easing/EasingView.swift @@ -9,12 +9,12 @@ class EasingView: MacawView { let centerX = 250.0 let fromStroke = Stroke(fill: Color.black, width: 3) - let all = [Easing.ease, Easing.linear, Easing.easeIn, Easing.easeOut, Easing.easeInOut, Easing.elasticInOut] + let all = [Easing.ease, Easing.easeIn, Easing.easeOut, Easing.easeInOut, Easing.elasticInOut] + let titles = ["Easing", "Easy In", "Easy Out", "Easy In Out", "Elastic In Out"] - for (i, easing) in all.enumerated() { - let y = Double(60 + i * 75) - let title = EasingView.title(easing: easing) - let titleText = Text(text: title, align: .mid, place: .move(dx: centerX, dy: y - 45)) + for (index, easing) in all.enumerated() { + let y = Double(80 + index * 80) + let titleText = Text(text: titles[index], align: .mid, place: .move(dx: centerX, dy: y - 45)) let fromCircle = Circle(cx: centerX - 100, cy: y, r: 20).stroke(with: fromStroke) let toPlace = fromCircle.place.move(dx: 200, dy: 0) @@ -29,22 +29,4 @@ class EasingView: MacawView { animation = mAnimations.combine().cycle() super.init(node: circlesNodes.group(), coder: aDecoder) } - - private static func title(easing: Easing) -> String { - - return "test" -// -// switch easing { -// -// case let _ = easing as? : -// return "Ease" -// case .linear: return "Linear" -// case .easeIn: return "Ease In" -// case .easeOut: return "Ease Out" -// case .easeInOut: return "Ease InOut" -// -// default: -// return "" -// } - } }