diff --git a/DemoLTMorphingLabel/DemoLTMorphingLabel.xcodeproj/project.pbxproj b/DemoLTMorphingLabel/DemoLTMorphingLabel.xcodeproj/project.pbxproj new file mode 100644 index 00000000..e1a2786d --- /dev/null +++ b/DemoLTMorphingLabel/DemoLTMorphingLabel.xcodeproj/project.pbxproj @@ -0,0 +1,384 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 90765D309D6E7B14008B1718 /* Pods_DemoLTMorphingLabel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53E77424804CF1E374C46AA0 /* Pods_DemoLTMorphingLabel.framework */; }; + A4B5F8141E308FFD005BA002 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4B5F8131E308FFD005BA002 /* AppDelegate.swift */; }; + A4B5F8161E308FFD005BA002 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4B5F8151E308FFD005BA002 /* ViewController.swift */; }; + A4B5F8191E308FFD005BA002 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A4B5F8171E308FFD005BA002 /* Main.storyboard */; }; + A4B5F81B1E308FFD005BA002 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A4B5F81A1E308FFD005BA002 /* Assets.xcassets */; }; + A4B5F81E1E308FFD005BA002 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A4B5F81C1E308FFD005BA002 /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 53E77424804CF1E374C46AA0 /* Pods_DemoLTMorphingLabel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DemoLTMorphingLabel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8F83F356FC877CFAC9759148 /* Pods-DemoLTMorphingLabel.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoLTMorphingLabel.release.xcconfig"; path = "Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.release.xcconfig"; sourceTree = ""; }; + 9D405545C6AAC49F808862B0 /* Pods-DemoLTMorphingLabel.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoLTMorphingLabel.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.debug.xcconfig"; sourceTree = ""; }; + A4B5F8101E308FFD005BA002 /* DemoLTMorphingLabel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoLTMorphingLabel.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A4B5F8131E308FFD005BA002 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + A4B5F8151E308FFD005BA002 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + A4B5F8181E308FFD005BA002 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + A4B5F81A1E308FFD005BA002 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A4B5F81D1E308FFD005BA002 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + A4B5F81F1E308FFD005BA002 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A4B5F80D1E308FFD005BA002 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 90765D309D6E7B14008B1718 /* Pods_DemoLTMorphingLabel.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 27D9CCDF498741FF012862D6 /* Pods */ = { + isa = PBXGroup; + children = ( + 9D405545C6AAC49F808862B0 /* Pods-DemoLTMorphingLabel.debug.xcconfig */, + 8F83F356FC877CFAC9759148 /* Pods-DemoLTMorphingLabel.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 2D3B78C3BD8613C33409709A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 53E77424804CF1E374C46AA0 /* Pods_DemoLTMorphingLabel.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + A4B5F8071E308FFD005BA002 = { + isa = PBXGroup; + children = ( + A4B5F8121E308FFD005BA002 /* DemoLTMorphingLabel */, + A4B5F8111E308FFD005BA002 /* Products */, + 27D9CCDF498741FF012862D6 /* Pods */, + 2D3B78C3BD8613C33409709A /* Frameworks */, + ); + sourceTree = ""; + }; + A4B5F8111E308FFD005BA002 /* Products */ = { + isa = PBXGroup; + children = ( + A4B5F8101E308FFD005BA002 /* DemoLTMorphingLabel.app */, + ); + name = Products; + sourceTree = ""; + }; + A4B5F8121E308FFD005BA002 /* DemoLTMorphingLabel */ = { + isa = PBXGroup; + children = ( + A4B5F8131E308FFD005BA002 /* AppDelegate.swift */, + A4B5F8151E308FFD005BA002 /* ViewController.swift */, + A4B5F8171E308FFD005BA002 /* Main.storyboard */, + A4B5F81A1E308FFD005BA002 /* Assets.xcassets */, + A4B5F81C1E308FFD005BA002 /* LaunchScreen.storyboard */, + A4B5F81F1E308FFD005BA002 /* Info.plist */, + ); + path = DemoLTMorphingLabel; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + A4B5F80F1E308FFD005BA002 /* DemoLTMorphingLabel */ = { + isa = PBXNativeTarget; + buildConfigurationList = A4B5F8221E308FFD005BA002 /* Build configuration list for PBXNativeTarget "DemoLTMorphingLabel" */; + buildPhases = ( + DDD49E48D9AD442C18F7E97A /* [CP] Check Pods Manifest.lock */, + A4B5F80C1E308FFD005BA002 /* Sources */, + A4B5F80D1E308FFD005BA002 /* Frameworks */, + A4B5F80E1E308FFD005BA002 /* Resources */, + 25BF4CFAFABB59AF71C443C8 /* [CP] Embed Pods Frameworks */, + 47C12B5331516D641742749A /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DemoLTMorphingLabel; + productName = DemoLTMorphingLabel; + productReference = A4B5F8101E308FFD005BA002 /* DemoLTMorphingLabel.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A4B5F8081E308FFD005BA002 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0820; + LastUpgradeCheck = 0820; + ORGANIZATIONNAME = com.icetime17; + TargetAttributes = { + A4B5F80F1E308FFD005BA002 = { + CreatedOnToolsVersion = 8.2.1; + DevelopmentTeam = GGVWN85K85; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = A4B5F80B1E308FFD005BA002 /* Build configuration list for PBXProject "DemoLTMorphingLabel" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = A4B5F8071E308FFD005BA002; + productRefGroup = A4B5F8111E308FFD005BA002 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A4B5F80F1E308FFD005BA002 /* DemoLTMorphingLabel */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + A4B5F80E1E308FFD005BA002 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A4B5F81E1E308FFD005BA002 /* LaunchScreen.storyboard in Resources */, + A4B5F81B1E308FFD005BA002 /* Assets.xcassets in Resources */, + A4B5F8191E308FFD005BA002 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 25BF4CFAFABB59AF71C443C8 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 47C12B5331516D641742749A /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + DDD49E48D9AD442C18F7E97A /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A4B5F80C1E308FFD005BA002 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A4B5F8161E308FFD005BA002 /* ViewController.swift in Sources */, + A4B5F8141E308FFD005BA002 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + A4B5F8171E308FFD005BA002 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A4B5F8181E308FFD005BA002 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + A4B5F81C1E308FFD005BA002 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A4B5F81D1E308FFD005BA002 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + A4B5F8201E308FFD005BA002 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = 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; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + A4B5F8211E308FFD005BA002 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = 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; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + A4B5F8231E308FFD005BA002 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9D405545C6AAC49F808862B0 /* Pods-DemoLTMorphingLabel.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = GGVWN85K85; + INFOPLIST_FILE = DemoLTMorphingLabel/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.icetime17.DemoLTMorphingLabel; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + A4B5F8241E308FFD005BA002 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8F83F356FC877CFAC9759148 /* Pods-DemoLTMorphingLabel.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = GGVWN85K85; + INFOPLIST_FILE = DemoLTMorphingLabel/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.icetime17.DemoLTMorphingLabel; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A4B5F80B1E308FFD005BA002 /* Build configuration list for PBXProject "DemoLTMorphingLabel" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A4B5F8201E308FFD005BA002 /* Debug */, + A4B5F8211E308FFD005BA002 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A4B5F8221E308FFD005BA002 /* Build configuration list for PBXNativeTarget "DemoLTMorphingLabel" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A4B5F8231E308FFD005BA002 /* Debug */, + A4B5F8241E308FFD005BA002 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = A4B5F8081E308FFD005BA002 /* Project object */; +} diff --git a/DemoLTMorphingLabel/DemoLTMorphingLabel.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DemoLTMorphingLabel/DemoLTMorphingLabel.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..0bfa4293 --- /dev/null +++ b/DemoLTMorphingLabel/DemoLTMorphingLabel.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DemoLTMorphingLabel/DemoLTMorphingLabel.xcworkspace/contents.xcworkspacedata b/DemoLTMorphingLabel/DemoLTMorphingLabel.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..afc44dcf --- /dev/null +++ b/DemoLTMorphingLabel/DemoLTMorphingLabel.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/DemoLTMorphingLabel/DemoLTMorphingLabel/AppDelegate.swift b/DemoLTMorphingLabel/DemoLTMorphingLabel/AppDelegate.swift new file mode 100644 index 00000000..3f38a005 --- /dev/null +++ b/DemoLTMorphingLabel/DemoLTMorphingLabel/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// DemoLTMorphingLabel +// +// Created by Chris Hu on 17/1/19. +// Copyright © 2017年 com.icetime17. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/DemoLTMorphingLabel/DemoLTMorphingLabel/Assets.xcassets/AppIcon.appiconset/Contents.json b/DemoLTMorphingLabel/DemoLTMorphingLabel/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..118c98f7 --- /dev/null +++ b/DemoLTMorphingLabel/DemoLTMorphingLabel/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/DemoLTMorphingLabel/DemoLTMorphingLabel/Base.lproj/LaunchScreen.storyboard b/DemoLTMorphingLabel/DemoLTMorphingLabel/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..fdf3f97d --- /dev/null +++ b/DemoLTMorphingLabel/DemoLTMorphingLabel/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DemoLTMorphingLabel/DemoLTMorphingLabel/Base.lproj/Main.storyboard b/DemoLTMorphingLabel/DemoLTMorphingLabel/Base.lproj/Main.storyboard new file mode 100644 index 00000000..273375fc --- /dev/null +++ b/DemoLTMorphingLabel/DemoLTMorphingLabel/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DemoLTMorphingLabel/DemoLTMorphingLabel/Info.plist b/DemoLTMorphingLabel/DemoLTMorphingLabel/Info.plist new file mode 100644 index 00000000..38e98af2 --- /dev/null +++ b/DemoLTMorphingLabel/DemoLTMorphingLabel/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/DemoLTMorphingLabel/DemoLTMorphingLabel/ViewController.swift b/DemoLTMorphingLabel/DemoLTMorphingLabel/ViewController.swift new file mode 100644 index 00000000..adeb0645 --- /dev/null +++ b/DemoLTMorphingLabel/DemoLTMorphingLabel/ViewController.swift @@ -0,0 +1,41 @@ +// +// ViewController.swift +// DemoLTMorphingLabel +// +// Created by Chris Hu on 17/1/19. +// Copyright © 2017年 com.icetime17. All rights reserved. +// + +import UIKit +import LTMorphingLabel + +class ViewController: UIViewController { + + var myLabel: LTMorphingLabel! + + override func viewDidLoad() { + super.viewDidLoad() + + view.backgroundColor = UIColor.black + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + + DispatchQueue.main.asyncAfter(deadline: .now() + 2) { + self.myLabel = LTMorphingLabel(frame: CGRect(x: 0, y: 0, width: 300, height: 50)) + self.myLabel.center = self.view.center + self.myLabel.font = UIFont.systemFont(ofSize: 30) + self.myLabel.textColor = UIColor.white + self.myLabel.textAlignment = .center + self.view.addSubview(self.myLabel) + self.myLabel.text = "LTMorphingLabel" + + self.myLabel.morphingDuration = 1.0 + self.myLabel.morphingEffect = .sparkle + } + } + + +} + diff --git a/DemoLTMorphingLabel/Podfile b/DemoLTMorphingLabel/Podfile new file mode 100644 index 00000000..f27113cf --- /dev/null +++ b/DemoLTMorphingLabel/Podfile @@ -0,0 +1,12 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +pod 'LTMorphingLabel' + +target 'DemoLTMorphingLabel' do + # Comment the next line if you're not using Swift and don't want to use dynamic frameworks + use_frameworks! + + # Pods for DemoLTMorphingLabel + +end diff --git a/DemoLTMorphingLabel/Podfile.lock b/DemoLTMorphingLabel/Podfile.lock new file mode 100644 index 00000000..3085c5be --- /dev/null +++ b/DemoLTMorphingLabel/Podfile.lock @@ -0,0 +1,12 @@ +PODS: + - LTMorphingLabel (0.4.0) + +DEPENDENCIES: + - LTMorphingLabel + +SPEC CHECKSUMS: + LTMorphingLabel: d9a85f16ac306f0e07321d6819964deb2dc69638 + +PODFILE CHECKSUM: 6f27c6ba1d24ea088391f5019dec5a80b9d7ff13 + +COCOAPODS: 1.2.0.beta.1 diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LICENSE b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LICENSE new file mode 100644 index 00000000..87fb0bbd --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) +Copyright © 2016 Lex Tang, http://lexrus.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTCharacterDiffResult.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTCharacterDiffResult.swift new file mode 100644 index 00000000..deb837a2 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTCharacterDiffResult.swift @@ -0,0 +1,80 @@ +// +// LTCharacterDiffResult.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import Foundation + +public enum LTCharacterDiffResult: CustomDebugStringConvertible, Equatable { + + case same + case add + case delete + case move(offset: Int) + case moveAndAdd(offset: Int) + case replace + + public var debugDescription: String { + switch self { + case .same: + return "The character is unchanged." + case .add: + return "A new character is ADDED." + case .delete: + return "The character is DELETED." + case .move(let offset): + return "The character is MOVED to \(offset)." + case .moveAndAdd(let offset): + return "The character is MOVED to \(offset) and a new character is ADDED." + case .replace: + return "The character is REPLACED with a new character." + } + } + +} + +public func == (lhs: LTCharacterDiffResult, rhs: LTCharacterDiffResult) -> Bool { + switch (lhs, rhs) { + case (.move(let offset0), .move(let offset1)): + return offset0 == offset1 + + case (.moveAndAdd(let offset0), .moveAndAdd(let offset1)): + return offset0 == offset1 + + case (.add, .add): + return true + + case (.delete, .delete): + return true + + case (.replace, .replace): + return true + + case (.same, .same): + return true + + default: return false + } +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTCharacterLimbo.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTCharacterLimbo.swift new file mode 100644 index 00000000..c1073bcc --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTCharacterLimbo.swift @@ -0,0 +1,46 @@ +// +// LTCharacterLimbo.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import UIKit + +public struct LTCharacterLimbo: CustomDebugStringConvertible { + + public let char: Character + public var rect: CGRect + public var alpha: CGFloat + public var size: CGFloat + public var drawingProgress: CGFloat = 0.0 + + public var debugDescription: String { + return "Character: '\(char)'" + + "drawIn (\(rect.origin.x), \(rect.origin.y), " + + "\(rect.size.width)x\(rect.size.height) " + + "with alpha \(alpha) " + + "and \(size)pt font." + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTEasing.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTEasing.swift new file mode 100644 index 00000000..090d37d3 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTEasing.swift @@ -0,0 +1,54 @@ +// +// LTEasing.swift +// LTMorphingLabelDemo +// +// Created by Lex on 7/1/14. +// Copyright (c) 2015 lexrus.com. All rights reserved. +// + +import Foundation + +// http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js +// t = currentTime +// b = beginning +// c = change +// d = duration + +public struct LTEasing { + + public static func easeOutQuint(_ t: Float, _ b: Float, _ c: Float, _ d: Float = 1.0) -> Float { + return { + return c * ($0 * $0 * $0 * $0 * $0 + 1.0) + b + }(t / d - 1.0) + } + + public static func easeInQuint(_ t: Float, _ b: Float, _ c: Float, _ d: Float = 1.0) -> Float { + return { + return c * $0 * $0 * $0 * $0 * $0 + b + }(t / d) + } + + public static func easeOutBack(_ t: Float, _ b: Float, _ c: Float, _ d: Float = 1.0) -> Float { + let s: Float = 2.70158 + let t2: Float = t / d - 1.0 + return Float(c * (t2 * t2 * ((s + 1.0) * t2 + s) + 1.0)) + b + } + + public static func easeOutBounce(_ t: Float, _ b: Float, _ c: Float, _ d: Float = 1.0) -> Float { + return { + if $0 < 1 / 2.75 { + return c * 7.5625 * $0 * $0 + b + } else if $0 < 2 / 2.75 { + let t = $0 - 1.5 / 2.75 + return c * (7.5625 * t * t + 0.75) + b + } else if $0 < 2.5 / 2.75 { + let t = $0 - 2.25 / 2.75 + return c * (7.5625 * t * t + 0.9375) + b + } else { + let t = $0 - 2.625 / 2.75 + return c * (7.5625 * t * t + 0.984375) + b + } + }(t / d) + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTEmitterView.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTEmitterView.swift new file mode 100644 index 00000000..670fd4f8 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTEmitterView.swift @@ -0,0 +1,172 @@ +// +// LTEmitterView.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import UIKit +fileprivate func < (lhs: T?, rhs: T?) -> Bool { + switch (lhs, rhs) { + case let (l?, r?): + return l < r + case (nil, _?): + return true + default: + return false + } +} + +fileprivate func > (lhs: T?, rhs: T?) -> Bool { + switch (lhs, rhs) { + case let (l?, r?): + return l > r + default: + return rhs < lhs + } +} + +public struct LTEmitter { + + let layer: CAEmitterLayer = { + let layer = CAEmitterLayer() + layer.emitterPosition = CGPoint(x: 10, y: 10) + layer.emitterSize = CGSize(width: 10, height: 1) + layer.renderMode = kCAEmitterLayerOutline + layer.emitterShape = kCAEmitterLayerLine + return layer + }() + + let cell: CAEmitterCell = { + let cell = CAEmitterCell() + cell.name = "sparkle" + cell.birthRate = 150.0 + cell.velocity = 50.0 + cell.velocityRange = -80.0 + cell.lifetime = 0.16 + cell.lifetimeRange = 0.1 + cell.emissionLongitude = CGFloat(M_PI_2 * 2.0) + cell.emissionRange = CGFloat(M_PI_2 * 2.0) + cell.scale = 0.1 + cell.yAcceleration = 100 + cell.scaleSpeed = -0.06 + cell.scaleRange = 0.1 + return cell + }() + + public var duration: Float = 0.6 + + init(name: String, particleName: String, duration: Float) { + cell.name = name + self.duration = duration + var image: UIImage? + defer { + cell.contents = image?.cgImage + } + + image = UIImage(named: particleName) + + if image != nil { + return + } + // Load from Framework + image = UIImage( + named: particleName, + in: Bundle(for: LTMorphingLabel.self), + compatibleWith: nil) + } + + public func play() { + if layer.emitterCells?.count > 0 { + return + } + + layer.emitterCells = [cell] + let d = DispatchTime.now() + Double(Int64(duration * Float(NSEC_PER_SEC))) / Double(NSEC_PER_SEC) + DispatchQueue.main.asyncAfter(deadline: d) { + self.layer.birthRate = 0.0 + } + } + + public func stop() { + if nil != layer.superlayer { + layer.removeFromSuperlayer() + } + } + + func update(_ configureClosure: LTEmitterConfigureClosure? = .none) -> LTEmitter { + configureClosure?(layer, cell) + return self + } + +} + +public typealias LTEmitterConfigureClosure = (CAEmitterLayer, CAEmitterCell) -> Void + +open class LTEmitterView: UIView { + + open lazy var emitters: [String: LTEmitter] = { + var _emitters = [String: LTEmitter]() + return _emitters + }() + + open func createEmitter( + _ name: String, + particleName: String, + duration: Float, + configureClosure: LTEmitterConfigureClosure? + ) -> LTEmitter { + + var emitter: LTEmitter + if let e = emitterByName(name) { + emitter = e + } else { + emitter = LTEmitter( + name: name, + particleName: particleName, + duration: duration + ) + + configureClosure?(emitter.layer, emitter.cell) + + layer.addSublayer(emitter.layer) + emitters.updateValue(emitter, forKey: name) + } + return emitter + } + + open func emitterByName(_ name: String) -> LTEmitter? { + if let e = emitters[name] { + return e + } + return Optional.none + } + + open func removeAllEmitters() { + for (_, emitter) in emitters { + emitter.layer.removeFromSuperlayer() + } + emitters.removeAll(keepingCapacity: false) + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingEffect.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingEffect.swift new file mode 100644 index 00000000..cd6ba92f --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingEffect.swift @@ -0,0 +1,63 @@ +// +// LTMorphingEffect.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import UIKit + +@objc public enum LTMorphingEffect: Int, CustomStringConvertible { + + case scale = 0 + case evaporate + case fall + case pixelate + case sparkle + case burn + case anvil + + public static let allValues = [ + "Scale", "Evaporate", "Fall", "Pixelate", "Sparkle", "Burn", "Anvil" + ] + + public var description: String { + switch self { + case .evaporate: + return "Evaporate" + case .fall: + return "Fall" + case .pixelate: + return "Pixelate" + case .sparkle: + return "Sparkle" + case .burn: + return "Burn" + case .anvil: + return "Anvil" + default: + return "Scale" + } + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Anvil.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Anvil.swift new file mode 100644 index 00000000..c2c1695f --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Anvil.swift @@ -0,0 +1,264 @@ +// +// LTMorphingLabel+Anvil.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import UIKit + +extension LTMorphingLabel { + + func AnvilLoad() { + + startClosures["Anvil\(LTMorphingPhases.start)"] = { + self.emitterView.removeAllEmitters() + + guard self.newRects.count > 0 else { return } + + let centerRect = self.newRects[Int(self.newRects.count / 2)] + + _ = self.emitterView.createEmitter( + "leftSmoke", + particleName: "Smoke", + duration: 0.6 + ) { (layer, cell) in + layer.emitterSize = CGSize(width: 1, height: 1) + layer.emitterPosition = CGPoint( + x: centerRect.origin.x, + y: centerRect.origin.y + centerRect.size.height / 1.3) + layer.renderMode = kCAEmitterLayerSurface + cell.emissionLongitude = CGFloat(M_PI / 2.0) + cell.scale = self.font.pointSize / 90.0 + cell.scaleSpeed = self.font.pointSize / 130 + cell.birthRate = 60 + cell.velocity = CGFloat(80 + Int(arc4random_uniform(60))) + cell.velocityRange = 100 + cell.yAcceleration = -40 + cell.xAcceleration = 70 + cell.emissionLongitude = CGFloat(-M_PI_2) + cell.emissionRange = CGFloat(M_PI_4) / 5.0 + cell.lifetime = self.morphingDuration * 2.0 + cell.spin = 10 + cell.alphaSpeed = -0.5 / self.morphingDuration + } + + _ = self.emitterView.createEmitter( + "rightSmoke", + particleName: "Smoke", + duration: 0.6 + ) { (layer, cell) in + layer.emitterSize = CGSize(width: 1, height: 1) + layer.emitterPosition = CGPoint( + x: centerRect.origin.x, + y: centerRect.origin.y + centerRect.size.height / 1.3) + layer.renderMode = kCAEmitterLayerSurface + cell.emissionLongitude = CGFloat(M_PI / 2.0) + cell.scale = self.font.pointSize / 90.0 + cell.scaleSpeed = self.font.pointSize / 130 + cell.birthRate = 60 + cell.velocity = CGFloat(80 + Int(arc4random_uniform(60))) + cell.velocityRange = 100 + cell.yAcceleration = -40 + cell.xAcceleration = -70 + cell.emissionLongitude = CGFloat(M_PI_2) + cell.emissionRange = CGFloat(-M_PI_4) / 5.0 + cell.lifetime = self.morphingDuration * 2.0 + cell.spin = -10 + cell.alphaSpeed = -0.5 / self.morphingDuration + } + + _ = self.emitterView.createEmitter( + "leftFragments", + particleName: "Fragment", + duration: 0.6 + ) { (layer, cell) in + layer.emitterSize = CGSize( + width: self.font.pointSize, + height: 1 + ) + layer.emitterPosition = CGPoint( + x: centerRect.origin.x, + y: centerRect.origin.y + centerRect.size.height / 1.3 + ) + cell.scale = self.font.pointSize / 90.0 + cell.scaleSpeed = self.font.pointSize / 40.0 + cell.color = self.textColor.cgColor + cell.birthRate = 60 + cell.velocity = 350 + cell.yAcceleration = 0 + cell.xAcceleration = CGFloat(10 * Int(arc4random_uniform(10))) + cell.emissionLongitude = CGFloat(-M_PI_2) + cell.emissionRange = CGFloat(M_PI_4) / 5.0 + cell.alphaSpeed = -2 + cell.lifetime = self.morphingDuration + } + + _ = self.emitterView.createEmitter( + "rightFragments", + particleName: "Fragment", + duration: 0.6 + ) { (layer, cell) in + layer.emitterSize = CGSize( + width: self.font.pointSize, + height: 1 + ) + layer.emitterPosition = CGPoint( + x: centerRect.origin.x, + y: centerRect.origin.y + centerRect.size.height / 1.3) + cell.scale = self.font.pointSize / 90.0 + cell.scaleSpeed = self.font.pointSize / 40.0 + cell.color = self.textColor.cgColor + cell.birthRate = 60 + cell.velocity = 350 + cell.yAcceleration = 0 + cell.xAcceleration = CGFloat(-10 * Int(arc4random_uniform(10))) + cell.emissionLongitude = CGFloat(M_PI_2) + cell.emissionRange = CGFloat(-M_PI_4) / 5.0 + cell.alphaSpeed = -2 + cell.lifetime = self.morphingDuration + } + + _ = self.emitterView.createEmitter( + "fragments", + particleName: "Fragment", + duration: 0.6 + ) { (layer, cell) in + layer.emitterSize = CGSize( + width: self.font.pointSize, + height: 1 + ) + layer.emitterPosition = CGPoint( + x: centerRect.origin.x, + y: centerRect.origin.y + centerRect.size.height / 1.3) + cell.scale = self.font.pointSize / 90.0 + cell.scaleSpeed = self.font.pointSize / 40.0 + cell.color = self.textColor.cgColor + cell.birthRate = 60 + cell.velocity = 250 + cell.velocityRange = CGFloat(Int(arc4random_uniform(20)) + 30) + cell.yAcceleration = 500 + cell.emissionLongitude = 0 + cell.emissionRange = CGFloat(M_PI_2) + cell.alphaSpeed = -1 + cell.lifetime = self.morphingDuration + } + } + + progressClosures["Anvil\(LTMorphingPhases.progress)"] = { + (index: Int, progress: Float, isNewChar: Bool) in + + if !isNewChar { + return min(1.0, max(0.0, progress)) + } + + let j = Float(sin(Float(index))) * 1.7 + return min(1.0, max(0.0001, progress + self.morphingCharacterDelay * j)) + + } + + effectClosures["Anvil\(LTMorphingPhases.disappear)"] = { + char, index, progress in + + return LTCharacterLimbo( + char: char, + rect: self.previousRects[index], + alpha: CGFloat(1.0 - progress), + size: self.font.pointSize, + drawingProgress: 0.0) + } + + effectClosures["Anvil\(LTMorphingPhases.appear)"] = { + char, index, progress in + + var rect = self.newRects[index] + + if progress < 1.0 { + let easingValue = LTEasing.easeOutBounce(progress, 0.0, 1.0) + rect.origin.y = CGFloat(Float(rect.origin.y) * easingValue) + } + + if progress > self.morphingDuration * 0.5 { + let end = self.morphingDuration * 0.55 + self.emitterView.createEmitter( + "fragments", + particleName: "Fragment", + duration: 0.6 + ) {_ in}.update { (layer, _) in + if progress > end { + layer.birthRate = 0 + } + }.play() + self.emitterView.createEmitter( + "leftFragments", + particleName: "Fragment", + duration: 0.6 + ) {_ in}.update { (layer, _) in + if progress > end { + layer.birthRate = 0 + } + }.play() + self.emitterView.createEmitter( + "rightFragments", + particleName: "Fragment", + duration: 0.6 + ) {_ in}.update { (layer, _) in + if progress > end { + layer.birthRate = 0 + } + }.play() + } + + if progress > self.morphingDuration * 0.63 { + let end = self.morphingDuration * 0.7 + self.emitterView.createEmitter( + "leftSmoke", + particleName: "Smoke", + duration: 0.6 + ) {_ in}.update { (layer, _) in + if progress > end { + layer.birthRate = 0 + } + }.play() + self.emitterView.createEmitter( + "rightSmoke", + particleName: "Smoke", + duration: 0.6 + ) {_ in}.update { (layer, _) in + if progress > end { + layer.birthRate = 0 + } + }.play() + } + + return LTCharacterLimbo( + char: char, + rect: rect, + alpha: CGFloat(self.morphingProgress), + size: self.font.pointSize, + drawingProgress: CGFloat(progress) + ) + } + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Burn.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Burn.swift new file mode 100644 index 00000000..3d864f61 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Burn.swift @@ -0,0 +1,197 @@ +// +// LTMorphingLabel+Burn.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import UIKit + +extension LTMorphingLabel { + + fileprivate func burningImageForCharLimbo( + _ charLimbo: LTCharacterLimbo, + withProgress progress: CGFloat + ) -> (UIImage, CGRect) { + let maskedHeight = charLimbo.rect.size.height * max(0.01, progress) + let maskedSize = CGSize( + width: charLimbo.rect.size.width, + height: maskedHeight + ) + UIGraphicsBeginImageContextWithOptions( + maskedSize, + false, + UIScreen.main.scale + ) + let rect = CGRect( + x: 0, + y: 0, + width: charLimbo.rect.size.width, + height: maskedHeight + ) + String(charLimbo.char).draw(in: rect, withAttributes: [ + NSFontAttributeName: self.font, + NSForegroundColorAttributeName: self.textColor + ]) + let newImage = UIGraphicsGetImageFromCurrentImageContext() + UIGraphicsEndImageContext() + let newRect = CGRect( + x: charLimbo.rect.origin.x, + y: charLimbo.rect.origin.y, + width: charLimbo.rect.size.width, + height: maskedHeight + ) + return (newImage!, newRect) + } + + func BurnLoad() { + + startClosures["Burn\(LTMorphingPhases.start)"] = { + self.emitterView.removeAllEmitters() + } + + progressClosures["Burn\(LTMorphingPhases.progress)"] = { + index, progress, isNewChar in + + if !isNewChar { + return min(1.0, max(0.0, progress)) + } + + let j = Float(sin(Float(index))) * 1.5 + return min(1.0, max(0.0001, progress + self.morphingCharacterDelay * j)) + + } + + effectClosures["Burn\(LTMorphingPhases.disappear)"] = { + char, index, progress in + + return LTCharacterLimbo( + char: char, + rect: self.previousRects[index], + alpha: CGFloat(1.0 - progress), + size: self.font.pointSize, + drawingProgress: 0.0 + ) + } + + effectClosures["Burn\(LTMorphingPhases.appear)"] = { + char, index, progress in + + if char != " " { + let rect = self.newRects[index] + let emitterPosition = CGPoint( + x: rect.origin.x + rect.size.width / 2.0, + y: CGFloat(progress) * rect.size.height / 1.2 + rect.origin.y + ) + + self.emitterView.createEmitter( + "c\(index)", + particleName: "Fire", + duration: self.morphingDuration + ) { (layer, cell) in + layer.emitterSize = CGSize( + width: rect.size.width, + height: 1 + ) + layer.renderMode = kCAEmitterLayerAdditive + layer.emitterMode = kCAEmitterLayerOutline + cell.emissionLongitude = CGFloat(M_PI / 2.0) + cell.scale = self.font.pointSize / 160.0 + cell.scaleSpeed = self.font.pointSize / 100.0 + cell.birthRate = Float(self.font.pointSize) + cell.emissionLongitude = CGFloat(arc4random_uniform(30)) + cell.emissionRange = CGFloat(M_PI_4) + cell.alphaSpeed = self.morphingDuration * -3.0 + cell.yAcceleration = 10 + cell.velocity = CGFloat(10 + Int(arc4random_uniform(3))) + cell.velocityRange = 10 + cell.spin = 0 + cell.spinRange = 0 + cell.lifetime = self.morphingDuration / 3.0 + }.update { (layer, _) in + layer.emitterPosition = emitterPosition + }.play() + + self.emitterView.createEmitter( + "s\(index)", + particleName: "Smoke", + duration: self.morphingDuration + ) { (layer, cell) in + layer.emitterSize = CGSize( + width: rect.size.width, + height: 10 + ) + layer.renderMode = kCAEmitterLayerAdditive + layer.emitterMode = kCAEmitterLayerVolume + cell.emissionLongitude = CGFloat(M_PI / 2.0) + cell.scale = self.font.pointSize / 40.0 + cell.scaleSpeed = self.font.pointSize / 100.0 + cell.birthRate = + Float(self.font.pointSize) + / Float(arc4random_uniform(10) + 10) + cell.emissionLongitude = 0 + cell.emissionRange = CGFloat(M_PI_4) + cell.alphaSpeed = self.morphingDuration * -3 + cell.yAcceleration = -5 + cell.velocity = CGFloat(20 + Int(arc4random_uniform(15))) + cell.velocityRange = 20 + cell.spin = CGFloat(Float(arc4random_uniform(30)) / 10.0) + cell.spinRange = 3 + cell.lifetime = self.morphingDuration + }.update { (layer, _) in + layer.emitterPosition = emitterPosition + }.play() + } + + return LTCharacterLimbo( + char: char, + rect: self.newRects[index], + alpha: 1.0, + size: self.font.pointSize, + drawingProgress: CGFloat(progress) + ) + } + + drawingClosures["Burn\(LTMorphingPhases.draw)"] = { + (charLimbo: LTCharacterLimbo) in + + if charLimbo.drawingProgress > 0.0 { + + let (charImage, rect) = self.burningImageForCharLimbo( + charLimbo, + withProgress: charLimbo.drawingProgress + ) + charImage.draw(in: rect) + + return true + } + + return false + } + + skipFramesClosures["Burn\(LTMorphingPhases.skipFrames)"] = { + return 1 + } + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Evaporate.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Evaporate.swift new file mode 100644 index 00000000..24727e80 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Evaporate.swift @@ -0,0 +1,73 @@ +// +// LTMorphingLabel+Evaporate.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import UIKit + +extension LTMorphingLabel { + + func EvaporateLoad() { + + progressClosures["Evaporate\(LTMorphingPhases.progress)"] = { + (index: Int, progress: Float, isNewChar: Bool) in + let j: Int = Int(round(cos(Double(index)) * 1.2)) + let delay = isNewChar ? self.morphingCharacterDelay * -1.0 : self.morphingCharacterDelay + return min(1.0, max(0.0, self.morphingProgress + delay * Float(j))) + } + + effectClosures["Evaporate\(LTMorphingPhases.disappear)"] = { + char, index, progress in + + let newProgress = LTEasing.easeOutQuint(progress, 0.0, 1.0, 1.0) + let yOffset: CGFloat = -0.8 * CGFloat(self.font.pointSize) * CGFloat(newProgress) + let currentRect = self.previousRects[index].offsetBy(dx: 0, dy: yOffset) + let currentAlpha = CGFloat(1.0 - newProgress) + + return LTCharacterLimbo( + char: char, + rect: currentRect, + alpha: currentAlpha, + size: self.font.pointSize, + drawingProgress: 0.0) + } + + effectClosures["Evaporate\(LTMorphingPhases.appear)"] = { + char, index, progress in + + let newProgress = 1.0 - LTEasing.easeOutQuint(progress, 0.0, 1.0) + let yOffset = CGFloat(self.font.pointSize) * CGFloat(newProgress) * 1.2 + + return LTCharacterLimbo( + char: char, + rect: self.newRects[index].offsetBy(dx: 0, dy: yOffset), + alpha: CGFloat(self.morphingProgress), + size: self.font.pointSize, + drawingProgress: 0.0 + ) + } + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Fall.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Fall.swift new file mode 100644 index 00000000..e74b13e7 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Fall.swift @@ -0,0 +1,149 @@ +// +// LTMorphingLabel+Fall.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import UIKit + +extension LTMorphingLabel { + + func FallLoad() { + + progressClosures["Fall\(LTMorphingPhases.progress)"] = { + (index: Int, progress: Float, isNewChar: Bool) in + + if isNewChar { + return min( + 1.0, + max( + 0.0, + progress + - self.morphingCharacterDelay + * Float(index) + / 1.7 + ) + ) + } + + let j: Float = Float(sin(Double(index))) * 1.7 + return min(1.0, max(0.0001, progress + self.morphingCharacterDelay * Float(j))) + + } + + effectClosures["Fall\(LTMorphingPhases.disappear)"] = { + char, index, progress in + + return LTCharacterLimbo( + char: char, + rect: self.previousRects[index], + alpha: CGFloat(1.0 - progress), + size: self.font.pointSize, + drawingProgress: CGFloat(progress)) + } + + effectClosures["Fall\(LTMorphingPhases.appear)"] = { + char, index, progress in + + let currentFontSize = CGFloat( + LTEasing.easeOutQuint(progress, 0.0, Float(self.font.pointSize)) + ) + let yOffset = CGFloat(self.font.pointSize - currentFontSize) + + return LTCharacterLimbo( + char: char, + rect: self.newRects[index].offsetBy(dx: 0, dy: yOffset), + alpha: CGFloat(self.morphingProgress), + size: currentFontSize, + drawingProgress: 0.0 + ) + } + + drawingClosures["Fall\(LTMorphingPhases.draw)"] = { + limbo in + + if limbo.drawingProgress > 0.0 { + let context = UIGraphicsGetCurrentContext() + var charRect = limbo.rect + context!.saveGState() + let charCenterX = charRect.origin.x + (charRect.size.width / 2.0) + var charBottomY = charRect.origin.y + charRect.size.height - self.font.pointSize / 6 + var charColor: UIColor = self.textColor + + // Fall down if drawingProgress is more than 50% + if limbo.drawingProgress > 0.5 { + let ease = CGFloat( + LTEasing.easeInQuint( + Float(limbo.drawingProgress - 0.4), + 0.0, + 1.0, + 0.5 + ) + ) + charBottomY = charBottomY + ease * 10.0 + let fadeOutAlpha = min( + 1.0, + max( + 0.0, + limbo.drawingProgress * -2.0 + 2.0 + 0.01 + ) + ) + charColor = self.textColor.withAlphaComponent(fadeOutAlpha) + } + + charRect = CGRect( + x: charRect.size.width / -2.0, + y: charRect.size.height * -1.0 + self.font.pointSize / 6, + width: charRect.size.width, + height: charRect.size.height) + context!.translateBy(x: charCenterX, y: charBottomY) + + let angle = Float(sin(Double(limbo.rect.origin.x)) > 0.5 ? 168 : -168) + let rotation = CGFloat( + LTEasing.easeOutBack( + min( + 1.0, + Float(limbo.drawingProgress) + ), + 0.0, + 1.0 + ) * angle + ) + context!.rotate(by: rotation * CGFloat(M_PI) / 180.0) + let s = String(limbo.char) + let attributes: [String: Any] = [ + NSFontAttributeName: self.font.withSize(limbo.size), + NSForegroundColorAttributeName: charColor + ] + s.draw(in: charRect, withAttributes: attributes) + context!.restoreGState() + + return true + } + + return false + } + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Pixelate.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Pixelate.swift new file mode 100644 index 00000000..7d0e4db2 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Pixelate.swift @@ -0,0 +1,100 @@ +// +// LTMorphingLabel+Pixelate.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import UIKit + +extension LTMorphingLabel { + + func PixelateLoad() { + + effectClosures["Pixelate\(LTMorphingPhases.disappear)"] = { + char, index, progress in + + return LTCharacterLimbo( + char: char, + rect: self.previousRects[index], + alpha: CGFloat(1.0 - progress), + size: self.font.pointSize, + drawingProgress: CGFloat(progress)) + } + + effectClosures["Pixelate\(LTMorphingPhases.appear)"] = { + char, index, progress in + + return LTCharacterLimbo( + char: char, + rect: self.newRects[index], + alpha: CGFloat(progress), + size: self.font.pointSize, + drawingProgress: CGFloat(1.0 - progress) + ) + } + + drawingClosures["Pixelate\(LTMorphingPhases.draw)"] = { + limbo in + + if limbo.drawingProgress > 0.0 { + + let charImage = self.pixelateImageForCharLimbo( + limbo, + withBlurRadius: limbo.drawingProgress * 6.0 + ) + + charImage.draw(in: limbo.rect) + + return true + } + + return false + } + } + + fileprivate func pixelateImageForCharLimbo( + _ charLimbo: LTCharacterLimbo, + withBlurRadius blurRadius: CGFloat + ) -> UIImage { + let scale = min(UIScreen.main.scale, 1.0 / blurRadius) + UIGraphicsBeginImageContextWithOptions(charLimbo.rect.size, false, scale) + let fadeOutAlpha = min(1.0, max(0.0, charLimbo.drawingProgress * -2.0 + 2.0 + 0.01)) + let rect = CGRect( + x: 0, + y: 0, + width: charLimbo.rect.size.width, + height: charLimbo.rect.size.height + ) + String(charLimbo.char).draw(in: rect, withAttributes: [ + NSFontAttributeName: + self.font, + NSForegroundColorAttributeName: + self.textColor.withAlphaComponent(fadeOutAlpha) + ]) + let newImage = UIGraphicsGetImageFromCurrentImageContext() + UIGraphicsEndImageContext() + return newImage! + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Sparkle.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Sparkle.swift new file mode 100644 index 00000000..73c50fcb --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Sparkle.swift @@ -0,0 +1,165 @@ +// +// LTMorphingLabel+Sparkle.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import UIKit + +extension LTMorphingLabel { + + fileprivate func maskedImageForCharLimbo( + _ charLimbo: LTCharacterLimbo, + withProgress progress: CGFloat + ) -> (UIImage, CGRect) { + let maskedHeight = charLimbo.rect.size.height * max(0.01, progress) + let maskedSize = CGSize( + width: charLimbo.rect.size.width, + height: maskedHeight + ) + UIGraphicsBeginImageContextWithOptions( + maskedSize, + false, + UIScreen.main.scale + ) + let rect = CGRect( + x: 0, + y: 0, + width: charLimbo.rect.size.width, + height: maskedHeight + ) + String(charLimbo.char).draw(in: rect, withAttributes: [ + NSFontAttributeName: self.font, + NSForegroundColorAttributeName: self.textColor + ]) + let newImage = UIGraphicsGetImageFromCurrentImageContext() + UIGraphicsEndImageContext() + let newRect = CGRect( + x: charLimbo.rect.origin.x, + y: charLimbo.rect.origin.y, + width: charLimbo.rect.size.width, + height: maskedHeight + ) + return (newImage!, newRect) + } + + func SparkleLoad() { + + startClosures["Sparkle\(LTMorphingPhases.start)"] = { + self.emitterView.removeAllEmitters() + } + + progressClosures["Sparkle\(LTMorphingPhases.progress)"] = { + (index: Int, progress: Float, isNewChar: Bool) in + + if !isNewChar { + return min(1.0, max(0.0, progress)) + } + + let j = Float(sin(Float(index))) * 1.5 + return min( + 1.0, + max( + 0.0001, + progress + self.morphingCharacterDelay * j + ) + ) + + } + + effectClosures["Sparkle\(LTMorphingPhases.disappear)"] = { + char, index, progress in + + return LTCharacterLimbo( + char: char, + rect: self.previousRects[index], + alpha: CGFloat(1.0 - progress), + size: self.font.pointSize, + drawingProgress: 0.0) + } + + effectClosures["Sparkle\(LTMorphingPhases.appear)"] = { + char, index, progress in + + if char != " " { + let rect = self.newRects[index] + let emitterPosition = CGPoint( + x: rect.origin.x + rect.size.width / 2.0, + y: CGFloat(progress) * rect.size.height * 0.9 + rect.origin.y + ) + + self.emitterView.createEmitter( + "c\(index)", + particleName: "Sparkle", + duration: self.morphingDuration + ) { (layer, cell) in + layer.emitterSize = CGSize( + width: rect.size.width, + height: 1 + ) + layer.renderMode = kCAEmitterLayerOutline + cell.emissionLongitude = CGFloat(M_PI / 2.0) + cell.scale = self.font.pointSize / 300.0 + cell.scaleSpeed = self.font.pointSize / 300.0 * -1.5 + cell.color = self.textColor.cgColor + cell.birthRate = + Float(self.font.pointSize) + * Float(arc4random_uniform(7) + 3) + }.update { (layer, _) in + layer.emitterPosition = emitterPosition + }.play() + } + + return LTCharacterLimbo( + char: char, + rect: self.newRects[index], + alpha: CGFloat(self.morphingProgress), + size: self.font.pointSize, + drawingProgress: CGFloat(progress) + ) + } + + drawingClosures["Sparkle\(LTMorphingPhases.draw)"] = { + (charLimbo: LTCharacterLimbo) in + + if charLimbo.drawingProgress > 0.0 { + + let (charImage, rect) = self.maskedImageForCharLimbo( + charLimbo, + withProgress: charLimbo.drawingProgress + ) + charImage.draw(in: rect) + + return true + } + + return false + } + + skipFramesClosures["Sparkle\(LTMorphingPhases.skipFrames)"] = { + return 1 + } + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel.h b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel.h new file mode 100644 index 00000000..3fda60c4 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel.h @@ -0,0 +1,19 @@ +// +// LTMorphingLabel.h +// LTMorphingLabel +// +// Created by Lex Tang on 1/8/15. +// Copyright (c) 2015 lexrus.com. All rights reserved. +// + +#import + +//! Project version number for LTMorphingLabel. +FOUNDATION_EXPORT double LTMorphingLabelVersionNumber; + +//! Project version string for LTMorphingLabel. +FOUNDATION_EXPORT const unsigned char LTMorphingLabelVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel.swift new file mode 100644 index 00000000..1024211d --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel.swift @@ -0,0 +1,487 @@ +// +// LTMorphingLabel.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import Foundation +import UIKit +import QuartzCore +fileprivate func < (lhs: T?, rhs: T?) -> Bool { + switch (lhs, rhs) { + case let (l?, r?): + return l < r + case (nil, _?): + return true + default: + return false + } +} + +fileprivate func >= (lhs: T?, rhs: T?) -> Bool { + switch (lhs, rhs) { + case let (l?, r?): + return l >= r + default: + return !(lhs < rhs) + } +} + +enum LTMorphingPhases: Int { + case start, appear, disappear, draw, progress, skipFrames +} + +typealias LTMorphingStartClosure = + (Void) -> Void + +typealias LTMorphingEffectClosure = + (Character, _ index: Int, _ progress: Float) -> LTCharacterLimbo + +typealias LTMorphingDrawingClosure = + (LTCharacterLimbo) -> Bool + +typealias LTMorphingManipulateProgressClosure = + (_ index: Int, _ progress: Float, _ isNewChar: Bool) -> Float + +typealias LTMorphingSkipFramesClosure = + (Void) -> Int + +@objc public protocol LTMorphingLabelDelegate { + @objc optional func morphingDidStart(_ label: LTMorphingLabel) + @objc optional func morphingDidComplete(_ label: LTMorphingLabel) + @objc optional func morphingOnProgress(_ label: LTMorphingLabel, progress: Float) +} + +// MARK: - LTMorphingLabel +@IBDesignable open class LTMorphingLabel: UILabel { + + @IBInspectable open var morphingProgress: Float = 0.0 + @IBInspectable open var morphingDuration: Float = 0.6 + @IBInspectable open var morphingCharacterDelay: Float = 0.026 + @IBInspectable open var morphingEnabled: Bool = true + + @IBOutlet open weak var delegate: LTMorphingLabelDelegate? + open var morphingEffect: LTMorphingEffect = .scale + + var startClosures = [String: LTMorphingStartClosure]() + var effectClosures = [String: LTMorphingEffectClosure]() + var drawingClosures = [String: LTMorphingDrawingClosure]() + var progressClosures = [String: LTMorphingManipulateProgressClosure]() + var skipFramesClosures = [String: LTMorphingSkipFramesClosure]() + var diffResults: LTStringDiffResult? + var previousText = "" + + var currentFrame = 0 + var totalFrames = 0 + var totalDelayFrames = 0 + + var totalWidth: Float = 0.0 + var previousRects = [CGRect]() + var newRects = [CGRect]() + var charHeight: CGFloat = 0.0 + var skipFramesCount: Int = 0 + + #if TARGET_INTERFACE_BUILDER + let presentingInIB = true + #else + let presentingInIB = false + #endif + + override open var font: UIFont! { + get { + return super.font + } + set { + super.font = newValue + setNeedsLayout() + } + } + + override open var text: String! { + get { + return super.text + } + set { + guard text != newValue else { return } + + previousText = text ?? "" + diffResults = previousText.diffWith(newValue) + super.text = newValue ?? "" + + morphingProgress = 0.0 + currentFrame = 0 + totalFrames = 0 + + setNeedsLayout() + + if !morphingEnabled { + return + } + + if presentingInIB { + morphingDuration = 0.01 + morphingProgress = 0.5 + } else if previousText != text { + displayLink.isPaused = false + let closureKey = "\(morphingEffect.description)\(LTMorphingPhases.start)" + if let closure = startClosures[closureKey] { + return closure() + } + + delegate?.morphingDidStart?(self) + } + } + } + + open override func setNeedsLayout() { + super.setNeedsLayout() + previousRects = rectsOfEachCharacter(previousText, withFont: font) + newRects = rectsOfEachCharacter(text ?? "", withFont: font) + } + + override open var bounds: CGRect { + get { + return super.bounds + } + set { + super.bounds = newValue + setNeedsLayout() + } + } + + override open var frame: CGRect { + get { + return super.frame + } + set { + super.frame = newValue + setNeedsLayout() + } + } + + fileprivate lazy var displayLink: CADisplayLink = { + let displayLink = CADisplayLink( + target: self, + selector: #selector(LTMorphingLabel.displayFrameTick)) + displayLink.add( + to: RunLoop.current, + forMode: RunLoopMode.commonModes) + return displayLink + }() + + lazy var emitterView: LTEmitterView = { + let emitterView = LTEmitterView(frame: self.bounds) + self.addSubview(emitterView) + return emitterView + }() +} + +// MARK: - Animation extension +extension LTMorphingLabel { + + func displayFrameTick() { + if displayLink.duration > 0.0 && totalFrames == 0 { + let frameRate = Float(displayLink.duration) / Float(displayLink.frameInterval) + totalFrames = Int(ceil(morphingDuration / frameRate)) + + let totalDelay = Float((text!).characters.count) * morphingCharacterDelay + totalDelayFrames = Int(ceil(totalDelay / frameRate)) + } + + currentFrame += 1 + + if previousText != text && currentFrame < totalFrames + totalDelayFrames + 5 { + morphingProgress += 1.0 / Float(totalFrames) + + let closureKey = "\(morphingEffect.description)\(LTMorphingPhases.skipFrames)" + if let closure = skipFramesClosures[closureKey] { + skipFramesCount += 1 + if skipFramesCount > closure() { + skipFramesCount = 0 + setNeedsDisplay() + } + } else { + setNeedsDisplay() + } + + if let onProgress = delegate?.morphingOnProgress { + onProgress(self, morphingProgress) + } + } else { + displayLink.isPaused = true + + delegate?.morphingDidComplete?(self) + } + } + + // Could be enhanced by kerning text: + // http://stackoverflow.com/questions/21443625/core-text-calculate-letter-frame-in-ios + func rectsOfEachCharacter(_ textToDraw: String, withFont font: UIFont) -> [CGRect] { + var charRects = [CGRect]() + var leftOffset: CGFloat = 0.0 + + charHeight = "Leg".size(attributes: [NSFontAttributeName: font]).height + + let topOffset = (bounds.size.height - charHeight) / 2.0 + + for (_, char) in textToDraw.characters.enumerated() { + let charSize = String(char).size(attributes: [NSFontAttributeName: font]) + charRects.append( + CGRect( + origin: CGPoint( + x: leftOffset, + y: topOffset + ), + size: charSize + ) + ) + leftOffset += charSize.width + } + + totalWidth = Float(leftOffset) + + var stringLeftOffSet: CGFloat = 0.0 + + switch textAlignment { + case .center: + stringLeftOffSet = CGFloat((Float(bounds.size.width) - totalWidth) / 2.0) + case .right: + stringLeftOffSet = CGFloat(Float(bounds.size.width) - totalWidth) + default: + () + } + + var offsetedCharRects = [CGRect]() + + for r in charRects { + offsetedCharRects.append(r.offsetBy(dx: stringLeftOffSet, dy: 0.0)) + } + + return offsetedCharRects + } + + func limboOfOriginalCharacter( + _ char: Character, + index: Int, + progress: Float) -> LTCharacterLimbo { + + var currentRect = previousRects[index] + let oriX = Float(currentRect.origin.x) + var newX = Float(currentRect.origin.x) + let diffResult = diffResults!.0[index] + var currentFontSize: CGFloat = font.pointSize + var currentAlpha: CGFloat = 1.0 + + switch diffResult { + // Move the character that exists in the new text to current position + case .same: + newX = Float(newRects[index].origin.x) + currentRect.origin.x = CGFloat( + LTEasing.easeOutQuint(progress, oriX, newX - oriX) + ) + case .move(let offset): + newX = Float(newRects[index + offset].origin.x) + currentRect.origin.x = CGFloat( + LTEasing.easeOutQuint(progress, oriX, newX - oriX) + ) + case .moveAndAdd(let offset): + newX = Float(newRects[index + offset].origin.x) + currentRect.origin.x = CGFloat( + LTEasing.easeOutQuint(progress, oriX, newX - oriX) + ) + default: + // Otherwise, remove it + + // Override morphing effect with closure in extenstions + if let closure = effectClosures[ + "\(morphingEffect.description)\(LTMorphingPhases.disappear)" + ] { + return closure(char, index, progress) + } else { + // And scale it by default + let fontEase = CGFloat( + LTEasing.easeOutQuint( + progress, 0, Float(font.pointSize) + ) + ) + // For emojis + currentFontSize = max(0.0001, font.pointSize - fontEase) + currentAlpha = CGFloat(1.0 - progress) + currentRect = previousRects[index].offsetBy( + dx: 0, + dy: CGFloat(font.pointSize - currentFontSize) + ) + } + } + + return LTCharacterLimbo( + char: char, + rect: currentRect, + alpha: currentAlpha, + size: currentFontSize, + drawingProgress: 0.0 + ) + } + + func limboOfNewCharacter( + _ char: Character, + index: Int, + progress: Float) -> LTCharacterLimbo { + + let currentRect = newRects[index] + var currentFontSize = CGFloat( + LTEasing.easeOutQuint(progress, 0, Float(font.pointSize)) + ) + + if let closure = effectClosures[ + "\(morphingEffect.description)\(LTMorphingPhases.appear)" + ] { + return closure(char, index, progress) + } else { + currentFontSize = CGFloat( + LTEasing.easeOutQuint(progress, 0.0, Float(font.pointSize)) + ) + // For emojis + currentFontSize = max(0.0001, currentFontSize) + + let yOffset = CGFloat(font.pointSize - currentFontSize) + + return LTCharacterLimbo( + char: char, + rect: currentRect.offsetBy(dx: 0, dy: yOffset), + alpha: CGFloat(morphingProgress), + size: currentFontSize, + drawingProgress: 0.0 + ) + } + } + + func limboOfCharacters() -> [LTCharacterLimbo] { + var limbo = [LTCharacterLimbo]() + + // Iterate original characters + for (i, character) in previousText.characters.enumerated() { + var progress: Float = 0.0 + + if let closure = progressClosures[ + "\(morphingEffect.description)\(LTMorphingPhases.progress)" + ] { + progress = closure(i, morphingProgress, false) + } else { + progress = min(1.0, max(0.0, morphingProgress + morphingCharacterDelay * Float(i))) + } + + let limboOfCharacter = limboOfOriginalCharacter(character, index: i, progress: progress) + limbo.append(limboOfCharacter) + } + + // Add new characters + for (i, character) in (text!).characters.enumerated() { + if i >= diffResults?.0.count { + break + } + + var progress: Float = 0.0 + + if let closure = progressClosures[ + "\(morphingEffect.description)\(LTMorphingPhases.progress)" + ] { + progress = closure(i, morphingProgress, true) + } else { + progress = min(1.0, max(0.0, morphingProgress - morphingCharacterDelay * Float(i))) + } + + // Don't draw character that already exists + if diffResults?.skipDrawingResults[i] == true { + continue + } + + if let diffResult = diffResults?.0[i] { + switch diffResult { + case .moveAndAdd, .replace, .add, .delete: + let limboOfCharacter = limboOfNewCharacter( + character, + index: i, + progress: progress + ) + limbo.append(limboOfCharacter) + default: + () + } + } + } + + return limbo + } + +} + +// MARK: - Drawing extension +extension LTMorphingLabel { + + override open func didMoveToSuperview() { + if let s = text { + text = s + } + + // Load all morphing effects + for effectName: String in LTMorphingEffect.allValues { + let effectFunc = Selector("\(effectName)Load") + if responds(to: effectFunc) { + perform(effectFunc) + } + } + } + + override open func drawText(in rect: CGRect) { + if !morphingEnabled || limboOfCharacters().count == 0 { + super.drawText(in: rect) + return + } + + for charLimbo in limboOfCharacters() { + let charRect = charLimbo.rect + + let willAvoidDefaultDrawing: Bool = { + if let closure = drawingClosures[ + "\(morphingEffect.description)\(LTMorphingPhases.draw)" + ] { + return closure($0) + } + return false + }(charLimbo) + + if !willAvoidDefaultDrawing { + let s = String(charLimbo.char) + s.draw(in: charRect, withAttributes: [ + NSFontAttributeName: + UIFont.init(name: font.fontName, size: charLimbo.size)!, + NSForegroundColorAttributeName: + textColor.withAlphaComponent(charLimbo.alpha) + ]) + } + } + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTStringDiffResult.swift b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTStringDiffResult.swift new file mode 100644 index 00000000..cadd11df --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/LTStringDiffResult.swift @@ -0,0 +1,102 @@ +// +// LTStringDiffResult.swift +// https://github.com/lexrus/LTMorphingLabel +// +// The MIT License (MIT) +// Copyright (c) 2016 Lex Tang, http://lexrus.com +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files +// (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import Foundation + +public typealias LTStringDiffResult = ([LTCharacterDiffResult], skipDrawingResults: [Bool]) + +public extension String { + + public func diffWith(_ anotherString: String?) -> LTStringDiffResult { + + guard let anotherString = anotherString else { + let diffResults: [LTCharacterDiffResult] = + Array(repeating: .delete, count: characters.count) + let skipDrawingResults: [Bool] = Array(repeating: false, count: characters.count) + return (diffResults, skipDrawingResults) + } + + let newChars = anotherString.characters.enumerated() + let lhsLength = characters.count + let rhsLength = anotherString.characters.count + var skipIndexes = [Int]() + let leftChars = Array(characters) + + let maxLength = max(lhsLength, rhsLength) + var diffResults: [LTCharacterDiffResult] = Array(repeating: .add, count: maxLength) + var skipDrawingResults: [Bool] = Array(repeating: false, count: maxLength) + + for i in 0.. lhsLength - 1 { + continue + } + + let leftChar = leftChars[i] + + // Search left character in the new string + var foundCharacterInRhs = false + for (j, newChar) in newChars { + if skipIndexes.contains(j) || leftChar != newChar { + continue + } + + skipIndexes.append(j) + foundCharacterInRhs = true + if i == j { + // Character not changed + diffResults[i] = .same + } else { + // foundCharacterInRhs and move + let offset = j - i + + if i <= rhsLength - 1 { + // Move to a new index and add a new character to new original place + diffResults[i] = .moveAndAdd(offset: offset) + } else { + diffResults[i] = .move(offset: offset) + } + + skipDrawingResults[j] = true + } + break + } + + if !foundCharacterInRhs { + if i < rhsLength - 1 { + diffResults[i] = .replace + } else { + diffResults[i] = .delete + } + } + } + + return (diffResults, skipDrawingResults) + + } + +} diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Fire.png b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Fire.png new file mode 100644 index 00000000..ece07410 Binary files /dev/null and b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Fire.png differ diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Fragment.png b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Fragment.png new file mode 100644 index 00000000..c5a5a7d4 Binary files /dev/null and b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Fragment.png differ diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Smoke.png b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Smoke.png new file mode 100644 index 00000000..ba457594 Binary files /dev/null and b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Smoke.png differ diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Sparkle.png b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Sparkle.png new file mode 100644 index 00000000..397168b1 Binary files /dev/null and b/DemoLTMorphingLabel/Pods/LTMorphingLabel/LTMorphingLabel/Particles/Sparkle.png differ diff --git a/DemoLTMorphingLabel/Pods/LTMorphingLabel/README.md b/DemoLTMorphingLabel/Pods/LTMorphingLabel/README.md new file mode 100644 index 00000000..c88fe23c --- /dev/null +++ b/DemoLTMorphingLabel/Pods/LTMorphingLabel/README.md @@ -0,0 +1,78 @@ +# LTMorphingLabel + +[![Travis](https://img.shields.io/travis/lexrus/LTMorphingLabel.svg)](https://travis-ci.org/lexrus/LTMorphingLabel) +![Language](https://img.shields.io/badge/language-Swift%203-orange.svg) +[![CocoaPods](https://img.shields.io/cocoapods/v/LTMorphingLabel.svg?style=flat)](https://github.com/lexrus/LTMorphingLabel) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +![License](https://img.shields.io/github/license/lexrus/LTMorphingLabel.svg?style=flat) + +A morphing UILabel subclass written in Swift. +The ```.Scale``` effect mimicked [Apple's QuickType animation of iOS 8](https://youtu.be/w87fOAG8fjk?t=3451) in WWDC 2014. New morphing effects are available as Swift extensions. + +## enum LTMorphingEffect: Int, Printable + +#### .Scale - _default_ +LTMorphingLabel + +#### [.Evaporate](https://github.com/lexrus/LTMorphingLabel/blob/master/LTMorphingLabel/LTMorphingLabel%2BEvaporate.swift) +LTMorphingLabel-Evaporate + +#### [.Fall](https://github.com/lexrus/LTMorphingLabel/blob/master/LTMorphingLabel/LTMorphingLabel%2BFall.swift) +LTMorphingLabel-Fall + +#### [.Pixelate](https://github.com/lexrus/LTMorphingLabel/blob/master/LTMorphingLabel/LTMorphingLabel%2BPixelate.swift) +LTMorphingLabel-Pixelate + +#### [.Sparkle](https://github.com/lexrus/LTMorphingLabel/blob/master/LTMorphingLabel/LTMorphingLabel%2BSparkle.swift) +LTMorphingLabel-Sparkle + +```.Sparkle``` is built on top of QuartzCore.CAEmitterLayer. There's also a [SpriteKit powered version here](https://github.com/lexrus/LTMorphingLabel/blob/spritekit-sparkle/LTMorphingLabel/LTMorphingLabel%2BSparkle.swift). + +#### [.Burn](https://github.com/lexrus/LTMorphingLabel/blob/master/LTMorphingLabel/LTMorphingLabel%2BBurn.swift) +LTMorphingLabel-Burn + +#### [.Anvil](https://github.com/lexrus/LTMorphingLabel/blob/master/LTMorphingLabel/LTMorphingLabel%2BAnvil.swift) +LTMorphingLabel-Anvil + +## Requirements + +1. Xcode 8 +2. iOS 8.0+ + +## Installation + +### [Carthage](https://github.com/Carthage/Carthage) + +1. Add this line to your Cartfile: `github "lexrus/LTMorphingLabel"` +2. Read the [official instruction](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) + +### [CocoaPods](http://cocoapods.org) + +1. Install the latest release of CocoaPods: `gem install cocoapods` +2. Add this line to your Podfile: `pod 'LTMorphingLabel'` +3. Install the pod: `pod install` + +## Usage + +1. Change the class of a label from UILabel to LTMorphingLabel; +2. Programmatically set a new String to its text property. + +## Unit tests + +Open the project with Xcode then press command + u. + +## Alternative + +Even though this lib was used in +[a few products on App Store](https://github.com/lexrus/LTMorphingLabel/wiki/Apps-using-LTMorphingLabel), +it’s still an experimental project. Frankly, there’re some nice competitors out +there guarantee both compatibility and stability. +And the most outstanding one is +[ZCAnimatedLabel](https://github.com/overboming/ZCAnimatedLabel). +I’d like to recommend it for production use. + +And finally, [an Android port](https://github.com/hanks-zyh/HTextView). + +## License + +This code is distributed under the terms and conditions of the MIT license. diff --git a/DemoLTMorphingLabel/Pods/Manifest.lock b/DemoLTMorphingLabel/Pods/Manifest.lock new file mode 100644 index 00000000..3085c5be --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Manifest.lock @@ -0,0 +1,12 @@ +PODS: + - LTMorphingLabel (0.4.0) + +DEPENDENCIES: + - LTMorphingLabel + +SPEC CHECKSUMS: + LTMorphingLabel: d9a85f16ac306f0e07321d6819964deb2dc69638 + +PODFILE CHECKSUM: 6f27c6ba1d24ea088391f5019dec5a80b9d7ff13 + +COCOAPODS: 1.2.0.beta.1 diff --git a/DemoLTMorphingLabel/Pods/Pods.xcodeproj/project.pbxproj b/DemoLTMorphingLabel/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 00000000..91e63b1c --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,629 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 04CAC0E5075BD1177EFE2B0A99FC551D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BF675A168132FD52AED630F977FE906 /* UIKit.framework */; }; + 220A91F8CE8669B742B00CD3C81C3910 /* LTMorphingLabel+Anvil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 935BC116EC667A44D9AE452BF32AB4FA /* LTMorphingLabel+Anvil.swift */; }; + 2534806772D59757EC8F1CC16528B9D1 /* LTStringDiffResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83DE977C6FEABD932EE0F618C2F581BD /* LTStringDiffResult.swift */; }; + 3663AD5A53A399294F616BBB090BC98C /* LTMorphingLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = A4ED472E425F9B9E59C3B9A9FE180C68 /* LTMorphingLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3C7D728E5057D9937D5489945D257304 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E0203FCF2E38F9E0B8C4E69853543A3E /* QuartzCore.framework */; }; + 3F8B0A80A2276127C916C8EF2CB92C07 /* LTMorphingLabel+Evaporate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17308C462A87E3457E801B85DC31573B /* LTMorphingLabel+Evaporate.swift */; }; + 435090E3FE50A2A659F6F29E79B57B16 /* LTMorphingEffect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF13D1D216458723A4724835FF89189 /* LTMorphingEffect.swift */; }; + 503F70FCC6E8D6394B5243A4FA2BB520 /* LTMorphingLabel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B23ACB4541D5EA6A6B1B8B8B2AD73A3 /* LTMorphingLabel-dummy.m */; }; + 514B3CCCC0F8433D22686E596FC967E8 /* Fire.png in Resources */ = {isa = PBXBuildFile; fileRef = 42545526F0E22224DF576E314F2E1312 /* Fire.png */; }; + 556D33B99B64976B2F45B25C99B5923E /* LTMorphingLabel+Burn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79BE6A6E63A0C630C0B3BCD168CF0157 /* LTMorphingLabel+Burn.swift */; }; + 6C2F96F1D97CEE4C463FF67DE81791A2 /* LTMorphingLabel+Sparkle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A110ACB40F0605CB69CC3EEED0E9C9E /* LTMorphingLabel+Sparkle.swift */; }; + 6C4F33723E922B3668D02B9DB0DDA879 /* LTEmitterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3B0F0FCEE503709EC2FF34D6A22399D /* LTEmitterView.swift */; }; + 713768DA2CB74E729CF215D49E6B6005 /* LTCharacterLimbo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 220CDD16C1E9C851669B859B1FD1B226 /* LTCharacterLimbo.swift */; }; + 775D8254FE776122D5DD0347C913C48E /* Pods-DemoLTMorphingLabel-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DF6A722EE7759A473CB6AEAE5ACDAA6E /* Pods-DemoLTMorphingLabel-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7D15D8DD9BC19EAF886F9E3BF14279DD /* LTCharacterDiffResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3782F275F387D0DD7916B7C9778F2006 /* LTCharacterDiffResult.swift */; }; + 861281D2AED3C4F7A05C98BD2E496575 /* LTEasing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 001568D53E060D334E1CDFC866327A36 /* LTEasing.swift */; }; + 8930D2E1B4D16AF38BE05EDF2E57D1C8 /* Pods-DemoLTMorphingLabel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D7BB6CDB23D3C0BD0A8CED9674A7CCC /* Pods-DemoLTMorphingLabel-dummy.m */; }; + 9C1F2A5C483E99BD4D1C7E2ABF21B5FC /* LTMorphingLabel+Fall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A4606DBA0E1612CDA79581A72F0C2C4 /* LTMorphingLabel+Fall.swift */; }; + A1CC109324B697DEB92AE17364D4BFCA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC32878090C4B2B93381956161EC0930 /* Foundation.framework */; }; + A2EFE55E2C0A1C10C7A5367B47C7D562 /* LTMorphingLabel+Pixelate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6465BA67DD94E5A5127D9F74F1899 /* LTMorphingLabel+Pixelate.swift */; }; + A82CAB41E30E1A5D25B22F5B5C9CC8F1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC32878090C4B2B93381956161EC0930 /* Foundation.framework */; }; + B03B5CC4D259EEC129F8DCF35675ECDD /* LTMorphingLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE227B395EC2DEA31BFD0AEBF34A30BA /* LTMorphingLabel.swift */; }; + BB2873D1E6440D5510A3E40A1F0D38A3 /* LTMorphingLabel-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 10B5A8D43686544BC53894473092D9C1 /* LTMorphingLabel-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C025052F8819DF1149FDFA278F08ABE7 /* Fragment.png in Resources */ = {isa = PBXBuildFile; fileRef = F33DBD5FAFDEE74C0DEF451713E35AAC /* Fragment.png */; }; + C3B9F1C5F59FBDA935751CA952D09330 /* Smoke.png in Resources */ = {isa = PBXBuildFile; fileRef = 598F8282593666A59E1C9DFD645F5EBD /* Smoke.png */; }; + F95D41C5B434547597F053486620C965 /* Sparkle.png in Resources */ = {isa = PBXBuildFile; fileRef = 1BEE9708A7B6470BCC57933D5891A4E8 /* Sparkle.png */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 3093DD950923BF711604D55ACAF52C79 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4C69BF3EF4CE81852226B9442B0C2DF4; + remoteInfo = LTMorphingLabel; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 001568D53E060D334E1CDFC866327A36 /* LTEasing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LTEasing.swift; path = LTMorphingLabel/LTEasing.swift; sourceTree = ""; }; + 0AF13D1D216458723A4724835FF89189 /* LTMorphingEffect.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LTMorphingEffect.swift; path = LTMorphingLabel/LTMorphingEffect.swift; sourceTree = ""; }; + 0F299706441B5689BDE60E44F10ECE52 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 10B5A8D43686544BC53894473092D9C1 /* LTMorphingLabel-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LTMorphingLabel-umbrella.h"; sourceTree = ""; }; + 17308C462A87E3457E801B85DC31573B /* LTMorphingLabel+Evaporate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "LTMorphingLabel+Evaporate.swift"; path = "LTMorphingLabel/LTMorphingLabel+Evaporate.swift"; sourceTree = ""; }; + 18CE67B37494E2078B0E5CCA97E22B2E /* LTMorphingLabel.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = LTMorphingLabel.modulemap; sourceTree = ""; }; + 1A110ACB40F0605CB69CC3EEED0E9C9E /* LTMorphingLabel+Sparkle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "LTMorphingLabel+Sparkle.swift"; path = "LTMorphingLabel/LTMorphingLabel+Sparkle.swift"; sourceTree = ""; }; + 1A4606DBA0E1612CDA79581A72F0C2C4 /* LTMorphingLabel+Fall.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "LTMorphingLabel+Fall.swift"; path = "LTMorphingLabel/LTMorphingLabel+Fall.swift"; sourceTree = ""; }; + 1BEE9708A7B6470BCC57933D5891A4E8 /* Sparkle.png */ = {isa = PBXFileReference; includeInIndex = 1; name = Sparkle.png; path = LTMorphingLabel/Particles/Sparkle.png; sourceTree = ""; }; + 220CDD16C1E9C851669B859B1FD1B226 /* LTCharacterLimbo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LTCharacterLimbo.swift; path = LTMorphingLabel/LTCharacterLimbo.swift; sourceTree = ""; }; + 2D7BB6CDB23D3C0BD0A8CED9674A7CCC /* Pods-DemoLTMorphingLabel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DemoLTMorphingLabel-dummy.m"; sourceTree = ""; }; + 2F9AD57B7836C67FE89A7AE3792C6A85 /* LTMorphingLabel.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = LTMorphingLabel.xcconfig; sourceTree = ""; }; + 3782F275F387D0DD7916B7C9778F2006 /* LTCharacterDiffResult.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LTCharacterDiffResult.swift; path = LTMorphingLabel/LTCharacterDiffResult.swift; sourceTree = ""; }; + 42545526F0E22224DF576E314F2E1312 /* Fire.png */ = {isa = PBXFileReference; includeInIndex = 1; name = Fire.png; path = LTMorphingLabel/Particles/Fire.png; sourceTree = ""; }; + 427C1560B3E9A577A5F397D5EBBC5266 /* Pods-DemoLTMorphingLabel.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoLTMorphingLabel.debug.xcconfig"; sourceTree = ""; }; + 49FE3D96949F29046B4E2B11EE4F69FD /* Pods-DemoLTMorphingLabel-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoLTMorphingLabel-frameworks.sh"; sourceTree = ""; }; + 4B23ACB4541D5EA6A6B1B8B8B2AD73A3 /* LTMorphingLabel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "LTMorphingLabel-dummy.m"; sourceTree = ""; }; + 598F8282593666A59E1C9DFD645F5EBD /* Smoke.png */ = {isa = PBXFileReference; includeInIndex = 1; name = Smoke.png; path = LTMorphingLabel/Particles/Smoke.png; sourceTree = ""; }; + 59FE61F45C0A24F71019F1E4FE7125BE /* Pods_DemoLTMorphingLabel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_DemoLTMorphingLabel.framework; path = "Pods-DemoLTMorphingLabel.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5BF675A168132FD52AED630F977FE906 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 79BE6A6E63A0C630C0B3BCD168CF0157 /* LTMorphingLabel+Burn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "LTMorphingLabel+Burn.swift"; path = "LTMorphingLabel/LTMorphingLabel+Burn.swift"; sourceTree = ""; }; + 7EE6465BA67DD94E5A5127D9F74F1899 /* LTMorphingLabel+Pixelate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "LTMorphingLabel+Pixelate.swift"; path = "LTMorphingLabel/LTMorphingLabel+Pixelate.swift"; sourceTree = ""; }; + 83DE977C6FEABD932EE0F618C2F581BD /* LTStringDiffResult.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LTStringDiffResult.swift; path = LTMorphingLabel/LTStringDiffResult.swift; sourceTree = ""; }; + 935BC116EC667A44D9AE452BF32AB4FA /* LTMorphingLabel+Anvil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "LTMorphingLabel+Anvil.swift"; path = "LTMorphingLabel/LTMorphingLabel+Anvil.swift"; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9D19A693A5E987FC5011E70D8B57FFDD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A3B0F0FCEE503709EC2FF34D6A22399D /* LTEmitterView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LTEmitterView.swift; path = LTMorphingLabel/LTEmitterView.swift; sourceTree = ""; }; + A4ED472E425F9B9E59C3B9A9FE180C68 /* LTMorphingLabel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = LTMorphingLabel.h; path = LTMorphingLabel/LTMorphingLabel.h; sourceTree = ""; }; + B7D967334A4AFCDC136AB595A1B7C668 /* Pods-DemoLTMorphingLabel.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoLTMorphingLabel.release.xcconfig"; sourceTree = ""; }; + CEF8057E6F545F76449DF01690A4D628 /* LTMorphingLabel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = LTMorphingLabel.framework; path = LTMorphingLabel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DF6A722EE7759A473CB6AEAE5ACDAA6E /* Pods-DemoLTMorphingLabel-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-DemoLTMorphingLabel-umbrella.h"; sourceTree = ""; }; + E0203FCF2E38F9E0B8C4E69853543A3E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; + E1C4E6471D3DFD0B045879D2D9C4A975 /* Pods-DemoLTMorphingLabel-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DemoLTMorphingLabel-acknowledgements.markdown"; sourceTree = ""; }; + E27510F0E0D0ABA614E77EEB08F5ECEB /* Pods-DemoLTMorphingLabel.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-DemoLTMorphingLabel.modulemap"; sourceTree = ""; }; + EC32878090C4B2B93381956161EC0930 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + F33DBD5FAFDEE74C0DEF451713E35AAC /* Fragment.png */ = {isa = PBXFileReference; includeInIndex = 1; name = Fragment.png; path = LTMorphingLabel/Particles/Fragment.png; sourceTree = ""; }; + F4A0890132A7963B8D19C631E62CDB90 /* Pods-DemoLTMorphingLabel-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoLTMorphingLabel-resources.sh"; sourceTree = ""; }; + FA68FED6623AF4632CD9B1D5B36E3A88 /* Pods-DemoLTMorphingLabel-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DemoLTMorphingLabel-acknowledgements.plist"; sourceTree = ""; }; + FBD47CAA74728C988F19F08CAB4647B2 /* LTMorphingLabel-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "LTMorphingLabel-prefix.pch"; sourceTree = ""; }; + FE227B395EC2DEA31BFD0AEBF34A30BA /* LTMorphingLabel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LTMorphingLabel.swift; path = LTMorphingLabel/LTMorphingLabel.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1F62AFC08895AB254D46B4ECC6931D36 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A82CAB41E30E1A5D25B22F5B5C9CC8F1 /* Foundation.framework in Frameworks */, + 3C7D728E5057D9937D5489945D257304 /* QuartzCore.framework in Frameworks */, + 04CAC0E5075BD1177EFE2B0A99FC551D /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 68B8FF839C62640283B38577E1C973B6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1CC109324B697DEB92AE17364D4BFCA /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 03C6DBD4F348A38D3D340E6A609860F7 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + E59058D5355ACCF729C9E9BA3270316C /* Pods-DemoLTMorphingLabel */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 122DA2E5084A4393C29BE363C764795C /* Frameworks */ = { + isa = PBXGroup; + children = ( + E5E9260013FA223D81B907D9285F6EA1 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 3FE1373298615DCBACA3122DEA54DE5A /* Products */ = { + isa = PBXGroup; + children = ( + CEF8057E6F545F76449DF01690A4D628 /* LTMorphingLabel.framework */, + 59FE61F45C0A24F71019F1E4FE7125BE /* Pods_DemoLTMorphingLabel.framework */, + ); + name = Products; + sourceTree = ""; + }; + 4FE35F4E5EA438ACC4A8E95F3B601430 /* Support Files */ = { + isa = PBXGroup; + children = ( + 9D19A693A5E987FC5011E70D8B57FFDD /* Info.plist */, + 18CE67B37494E2078B0E5CCA97E22B2E /* LTMorphingLabel.modulemap */, + 2F9AD57B7836C67FE89A7AE3792C6A85 /* LTMorphingLabel.xcconfig */, + 4B23ACB4541D5EA6A6B1B8B8B2AD73A3 /* LTMorphingLabel-dummy.m */, + FBD47CAA74728C988F19F08CAB4647B2 /* LTMorphingLabel-prefix.pch */, + 10B5A8D43686544BC53894473092D9C1 /* LTMorphingLabel-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/LTMorphingLabel"; + sourceTree = ""; + }; + 5BE945AA4726FE5C9589952898220ECA /* LTMorphingLabel */ = { + isa = PBXGroup; + children = ( + 3782F275F387D0DD7916B7C9778F2006 /* LTCharacterDiffResult.swift */, + 220CDD16C1E9C851669B859B1FD1B226 /* LTCharacterLimbo.swift */, + 001568D53E060D334E1CDFC866327A36 /* LTEasing.swift */, + A3B0F0FCEE503709EC2FF34D6A22399D /* LTEmitterView.swift */, + 0AF13D1D216458723A4724835FF89189 /* LTMorphingEffect.swift */, + A4ED472E425F9B9E59C3B9A9FE180C68 /* LTMorphingLabel.h */, + FE227B395EC2DEA31BFD0AEBF34A30BA /* LTMorphingLabel.swift */, + 935BC116EC667A44D9AE452BF32AB4FA /* LTMorphingLabel+Anvil.swift */, + 79BE6A6E63A0C630C0B3BCD168CF0157 /* LTMorphingLabel+Burn.swift */, + 17308C462A87E3457E801B85DC31573B /* LTMorphingLabel+Evaporate.swift */, + 1A4606DBA0E1612CDA79581A72F0C2C4 /* LTMorphingLabel+Fall.swift */, + 7EE6465BA67DD94E5A5127D9F74F1899 /* LTMorphingLabel+Pixelate.swift */, + 1A110ACB40F0605CB69CC3EEED0E9C9E /* LTMorphingLabel+Sparkle.swift */, + 83DE977C6FEABD932EE0F618C2F581BD /* LTStringDiffResult.swift */, + B7779B21D94A6C2B60A6D8498C271699 /* Resources */, + 4FE35F4E5EA438ACC4A8E95F3B601430 /* Support Files */, + ); + name = LTMorphingLabel; + path = LTMorphingLabel; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + 122DA2E5084A4393C29BE363C764795C /* Frameworks */, + D1EBAE3FFDBB2009CE12D43A017F0A5C /* Pods */, + 3FE1373298615DCBACA3122DEA54DE5A /* Products */, + 03C6DBD4F348A38D3D340E6A609860F7 /* Targets Support Files */, + ); + sourceTree = ""; + }; + B7779B21D94A6C2B60A6D8498C271699 /* Resources */ = { + isa = PBXGroup; + children = ( + 42545526F0E22224DF576E314F2E1312 /* Fire.png */, + F33DBD5FAFDEE74C0DEF451713E35AAC /* Fragment.png */, + 598F8282593666A59E1C9DFD645F5EBD /* Smoke.png */, + 1BEE9708A7B6470BCC57933D5891A4E8 /* Sparkle.png */, + ); + name = Resources; + sourceTree = ""; + }; + D1EBAE3FFDBB2009CE12D43A017F0A5C /* Pods */ = { + isa = PBXGroup; + children = ( + 5BE945AA4726FE5C9589952898220ECA /* LTMorphingLabel */, + ); + name = Pods; + sourceTree = ""; + }; + E59058D5355ACCF729C9E9BA3270316C /* Pods-DemoLTMorphingLabel */ = { + isa = PBXGroup; + children = ( + 0F299706441B5689BDE60E44F10ECE52 /* Info.plist */, + E27510F0E0D0ABA614E77EEB08F5ECEB /* Pods-DemoLTMorphingLabel.modulemap */, + E1C4E6471D3DFD0B045879D2D9C4A975 /* Pods-DemoLTMorphingLabel-acknowledgements.markdown */, + FA68FED6623AF4632CD9B1D5B36E3A88 /* Pods-DemoLTMorphingLabel-acknowledgements.plist */, + 2D7BB6CDB23D3C0BD0A8CED9674A7CCC /* Pods-DemoLTMorphingLabel-dummy.m */, + 49FE3D96949F29046B4E2B11EE4F69FD /* Pods-DemoLTMorphingLabel-frameworks.sh */, + F4A0890132A7963B8D19C631E62CDB90 /* Pods-DemoLTMorphingLabel-resources.sh */, + DF6A722EE7759A473CB6AEAE5ACDAA6E /* Pods-DemoLTMorphingLabel-umbrella.h */, + 427C1560B3E9A577A5F397D5EBBC5266 /* Pods-DemoLTMorphingLabel.debug.xcconfig */, + B7D967334A4AFCDC136AB595A1B7C668 /* Pods-DemoLTMorphingLabel.release.xcconfig */, + ); + name = "Pods-DemoLTMorphingLabel"; + path = "Target Support Files/Pods-DemoLTMorphingLabel"; + sourceTree = ""; + }; + E5E9260013FA223D81B907D9285F6EA1 /* iOS */ = { + isa = PBXGroup; + children = ( + EC32878090C4B2B93381956161EC0930 /* Foundation.framework */, + E0203FCF2E38F9E0B8C4E69853543A3E /* QuartzCore.framework */, + 5BF675A168132FD52AED630F977FE906 /* UIKit.framework */, + ); + name = iOS; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D2E599A4D40F5F772B27A75EAF8F3034 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 775D8254FE776122D5DD0347C913C48E /* Pods-DemoLTMorphingLabel-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E19D0AD0562BD9B880571349E087F2A3 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + BB2873D1E6440D5510A3E40A1F0D38A3 /* LTMorphingLabel-umbrella.h in Headers */, + 3663AD5A53A399294F616BBB090BC98C /* LTMorphingLabel.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 0B16A8167BDA7656A1E179C3B5429AE0 /* Pods-DemoLTMorphingLabel */ = { + isa = PBXNativeTarget; + buildConfigurationList = 88BE704F3A4F01B56C00899F291E11E1 /* Build configuration list for PBXNativeTarget "Pods-DemoLTMorphingLabel" */; + buildPhases = ( + 3BE051AFD8798C0F3247D33E0AB4C03D /* Sources */, + 68B8FF839C62640283B38577E1C973B6 /* Frameworks */, + D2E599A4D40F5F772B27A75EAF8F3034 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 85DC49D3CEEB8BF871855A0E4244DCB2 /* PBXTargetDependency */, + ); + name = "Pods-DemoLTMorphingLabel"; + productName = "Pods-DemoLTMorphingLabel"; + productReference = 59FE61F45C0A24F71019F1E4FE7125BE /* Pods_DemoLTMorphingLabel.framework */; + productType = "com.apple.product-type.framework"; + }; + 4C69BF3EF4CE81852226B9442B0C2DF4 /* LTMorphingLabel */ = { + isa = PBXNativeTarget; + buildConfigurationList = C1291CF685CE0226B8EB9F5347779246 /* Build configuration list for PBXNativeTarget "LTMorphingLabel" */; + buildPhases = ( + 4075A2D82A70F8CBB84F0FF3D77F44AA /* Sources */, + 1F62AFC08895AB254D46B4ECC6931D36 /* Frameworks */, + E19D0AD0562BD9B880571349E087F2A3 /* Headers */, + 8737DBC96075980D465A9943ED820602 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LTMorphingLabel; + productName = LTMorphingLabel; + productReference = CEF8057E6F545F76449DF01690A4D628 /* LTMorphingLabel.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0700; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = 3FE1373298615DCBACA3122DEA54DE5A /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4C69BF3EF4CE81852226B9442B0C2DF4 /* LTMorphingLabel */, + 0B16A8167BDA7656A1E179C3B5429AE0 /* Pods-DemoLTMorphingLabel */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8737DBC96075980D465A9943ED820602 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 514B3CCCC0F8433D22686E596FC967E8 /* Fire.png in Resources */, + C025052F8819DF1149FDFA278F08ABE7 /* Fragment.png in Resources */, + C3B9F1C5F59FBDA935751CA952D09330 /* Smoke.png in Resources */, + F95D41C5B434547597F053486620C965 /* Sparkle.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3BE051AFD8798C0F3247D33E0AB4C03D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8930D2E1B4D16AF38BE05EDF2E57D1C8 /* Pods-DemoLTMorphingLabel-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4075A2D82A70F8CBB84F0FF3D77F44AA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7D15D8DD9BC19EAF886F9E3BF14279DD /* LTCharacterDiffResult.swift in Sources */, + 713768DA2CB74E729CF215D49E6B6005 /* LTCharacterLimbo.swift in Sources */, + 861281D2AED3C4F7A05C98BD2E496575 /* LTEasing.swift in Sources */, + 6C4F33723E922B3668D02B9DB0DDA879 /* LTEmitterView.swift in Sources */, + 435090E3FE50A2A659F6F29E79B57B16 /* LTMorphingEffect.swift in Sources */, + 220A91F8CE8669B742B00CD3C81C3910 /* LTMorphingLabel+Anvil.swift in Sources */, + 556D33B99B64976B2F45B25C99B5923E /* LTMorphingLabel+Burn.swift in Sources */, + 3F8B0A80A2276127C916C8EF2CB92C07 /* LTMorphingLabel+Evaporate.swift in Sources */, + 9C1F2A5C483E99BD4D1C7E2ABF21B5FC /* LTMorphingLabel+Fall.swift in Sources */, + A2EFE55E2C0A1C10C7A5367B47C7D562 /* LTMorphingLabel+Pixelate.swift in Sources */, + 6C2F96F1D97CEE4C463FF67DE81791A2 /* LTMorphingLabel+Sparkle.swift in Sources */, + 503F70FCC6E8D6394B5243A4FA2BB520 /* LTMorphingLabel-dummy.m in Sources */, + B03B5CC4D259EEC129F8DCF35675ECDD /* LTMorphingLabel.swift in Sources */, + 2534806772D59757EC8F1CC16528B9D1 /* LTStringDiffResult.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 85DC49D3CEEB8BF871855A0E4244DCB2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = LTMorphingLabel; + target = 4C69BF3EF4CE81852226B9442B0C2DF4 /* LTMorphingLabel */; + targetProxy = 3093DD950923BF711604D55ACAF52C79 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 673254EEAF0B5BF4596080C749645884 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 7B685F946D3AC9C48CE2B345BF735E41 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2F9AD57B7836C67FE89A7AE3792C6A85 /* LTMorphingLabel.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/LTMorphingLabel/LTMorphingLabel-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LTMorphingLabel/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/LTMorphingLabel/LTMorphingLabel.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = LTMorphingLabel; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 9652FAC8678C7EFB5E7577A0B91E0B8A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B7D967334A4AFCDC136AB595A1B7C668 /* Pods-DemoLTMorphingLabel.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-DemoLTMorphingLabel/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_DemoLTMorphingLabel; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + D58F76445200F6097078744D3E36EE07 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2F9AD57B7836C67FE89A7AE3792C6A85 /* LTMorphingLabel.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/LTMorphingLabel/LTMorphingLabel-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/LTMorphingLabel/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/LTMorphingLabel/LTMorphingLabel.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = LTMorphingLabel; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + D8A85C3A20AE66B26AD079CD4D5CC143 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 427C1560B3E9A577A5F397D5EBBC5266 /* Pods-DemoLTMorphingLabel.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-DemoLTMorphingLabel/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_DemoLTMorphingLabel; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + E4F26E6EB105713A6A7E7E2E283AC2DF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E4F26E6EB105713A6A7E7E2E283AC2DF /* Debug */, + 673254EEAF0B5BF4596080C749645884 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 88BE704F3A4F01B56C00899F291E11E1 /* Build configuration list for PBXNativeTarget "Pods-DemoLTMorphingLabel" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D8A85C3A20AE66B26AD079CD4D5CC143 /* Debug */, + 9652FAC8678C7EFB5E7577A0B91E0B8A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C1291CF685CE0226B8EB9F5347779246 /* Build configuration list for PBXNativeTarget "LTMorphingLabel" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7B685F946D3AC9C48CE2B345BF735E41 /* Debug */, + D58F76445200F6097078744D3E36EE07 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/Info.plist b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/Info.plist new file mode 100644 index 00000000..53e4061e --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.4.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel-dummy.m b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel-dummy.m new file mode 100644 index 00000000..ca1a0c5e --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_LTMorphingLabel : NSObject +@end +@implementation PodsDummy_LTMorphingLabel +@end diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel-prefix.pch b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel-prefix.pch new file mode 100644 index 00000000..beb2a244 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel-umbrella.h b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel-umbrella.h new file mode 100644 index 00000000..3f791001 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "LTMorphingLabel.h" + +FOUNDATION_EXPORT double LTMorphingLabelVersionNumber; +FOUNDATION_EXPORT const unsigned char LTMorphingLabelVersionString[]; + diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel.modulemap b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel.modulemap new file mode 100644 index 00000000..460b3d01 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel.modulemap @@ -0,0 +1,6 @@ +framework module LTMorphingLabel { + umbrella header "LTMorphingLabel-umbrella.h" + + export * + module * { export * } +} diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel.xcconfig b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel.xcconfig new file mode 100644 index 00000000..5d4f60ce --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/LTMorphingLabel/LTMorphingLabel.xcconfig @@ -0,0 +1,11 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/LTMorphingLabel +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -framework "Foundation" -framework "QuartzCore" -framework "UIKit" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/LTMorphingLabel +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Info.plist b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Info.plist new file mode 100644 index 00000000..2243fe6e --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-acknowledgements.markdown b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-acknowledgements.markdown new file mode 100644 index 00000000..419eba74 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-acknowledgements.markdown @@ -0,0 +1,27 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## LTMorphingLabel + +The MIT License (MIT) +Copyright © 2016 Lex Tang, http://lexrus.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Generated by CocoaPods - https://cocoapods.org diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-acknowledgements.plist b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-acknowledgements.plist new file mode 100644 index 00000000..3ce116a8 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-acknowledgements.plist @@ -0,0 +1,59 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) +Copyright © 2016 Lex Tang, http://lexrus.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + License + MIT + Title + LTMorphingLabel + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-dummy.m b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-dummy.m new file mode 100644 index 00000000..70af51e4 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_DemoLTMorphingLabel : NSObject +@end +@implementation PodsDummy_Pods_DemoLTMorphingLabel +@end diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-frameworks.sh b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-frameworks.sh new file mode 100755 index 00000000..5f2d5b5e --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-frameworks.sh @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1"" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/LTMorphingLabel/LTMorphingLabel.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/LTMorphingLabel/LTMorphingLabel.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-resources.sh b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-resources.sh new file mode 100755 index 00000000..4602c68a --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-resources.sh @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-umbrella.h b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-umbrella.h new file mode 100644 index 00000000..50228dea --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_DemoLTMorphingLabelVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_DemoLTMorphingLabelVersionString[]; + diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.debug.xcconfig b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.debug.xcconfig new file mode 100644 index 00000000..caf28423 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.debug.xcconfig @@ -0,0 +1,10 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/LTMorphingLabel" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/LTMorphingLabel/LTMorphingLabel.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "LTMorphingLabel" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.modulemap b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.modulemap new file mode 100644 index 00000000..c55c5c90 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.modulemap @@ -0,0 +1,6 @@ +framework module Pods_DemoLTMorphingLabel { + umbrella header "Pods-DemoLTMorphingLabel-umbrella.h" + + export * + module * { export * } +} diff --git a/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.release.xcconfig b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.release.xcconfig new file mode 100644 index 00000000..caf28423 --- /dev/null +++ b/DemoLTMorphingLabel/Pods/Target Support Files/Pods-DemoLTMorphingLabel/Pods-DemoLTMorphingLabel.release.xcconfig @@ -0,0 +1,10 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/LTMorphingLabel" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/LTMorphingLabel/LTMorphingLabel.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "LTMorphingLabel" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods