From 3cbadbf41f05b7b6d332d1d21cf7b4d93718a2ca Mon Sep 17 00:00:00 2001 From: YuriFox Date: Tue, 2 Oct 2018 16:29:27 +0300 Subject: [PATCH] v1.2 - Full code refactoring - Converted to Swift 4.2 - Availability for iOS 8+ - Added a lot of new animations such as: - none - flipFromLeft - flipFromRight - flipFromBottom - curlUp - curlDown - zoomOut - zoomIn - sliceVertical - sliceHorizontal - and already existing: fade, fromLeft, fromRight, fromTop, fromBottom --- .swift-version | 2 +- .../project.pbxproj | 361 ------------------ .../AppDelegate.swift | 21 - .../Base.lproj/Main.storyboard | 179 --------- .../Controllers/MainViewController.swift | 62 --- .../Controllers/SuccesViewController.swift | 33 -- Example/UIWindowTransitionExample/Info.plist | 43 --- .../AppIcon.appiconset/Contents.json | 98 ----- .../Base.lproj/LaunchScreen.storyboard | 25 -- README.md | 16 +- Source/CHANGELOG | 16 + Source/Info.plist | 22 ++ Source/UIWindowTransition.h | 19 + Source/UIWindowTransition.swift | 252 ++++++++++++ Source/UIWindowTransitionOptions.swift | 129 ------- UIWindowTransition.podspec | 4 +- UIWindowTransition.xcodeproj/project.pbxproj | 353 +++++++++++++++++ .../contents.xcworkspacedata | 2 +- .../xcshareddata/IDEWorkspaceChecks.plist | 8 + 19 files changed, 682 insertions(+), 963 deletions(-) delete mode 100644 Example/UIWindowTransitionExample.xcodeproj/project.pbxproj delete mode 100644 Example/UIWindowTransitionExample/AppDelegate.swift delete mode 100644 Example/UIWindowTransitionExample/Base.lproj/Main.storyboard delete mode 100644 Example/UIWindowTransitionExample/Controllers/MainViewController.swift delete mode 100644 Example/UIWindowTransitionExample/Controllers/SuccesViewController.swift delete mode 100644 Example/UIWindowTransitionExample/Info.plist delete mode 100644 Example/UIWindowTransitionExample/Support/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 Example/UIWindowTransitionExample/Support/Base.lproj/LaunchScreen.storyboard create mode 100644 Source/CHANGELOG create mode 100644 Source/Info.plist create mode 100644 Source/UIWindowTransition.h create mode 100644 Source/UIWindowTransition.swift delete mode 100644 Source/UIWindowTransitionOptions.swift create mode 100644 UIWindowTransition.xcodeproj/project.pbxproj rename {Example/UIWindowTransitionExample.xcodeproj => UIWindowTransition.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (64%) create mode 100644 UIWindowTransition.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/.swift-version b/.swift-version index 9f55b2c..bf77d54 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0 +4.2 diff --git a/Example/UIWindowTransitionExample.xcodeproj/project.pbxproj b/Example/UIWindowTransitionExample.xcodeproj/project.pbxproj deleted file mode 100644 index c7488fe..0000000 --- a/Example/UIWindowTransitionExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,361 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - DAA25CE320224B96002F70AE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAA25CE220224B96002F70AE /* AppDelegate.swift */; }; - DAA25CE520224B96002F70AE /* SuccesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAA25CE420224B96002F70AE /* SuccesViewController.swift */; }; - DAA25CE820224B96002F70AE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAA25CE620224B96002F70AE /* Main.storyboard */; }; - DAA25CEA20224B96002F70AE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DAA25CE920224B96002F70AE /* Assets.xcassets */; }; - DAA25CED20224B96002F70AE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAA25CEB20224B96002F70AE /* LaunchScreen.storyboard */; }; - DAA25CF520224C29002F70AE /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAA25CF420224C29002F70AE /* MainViewController.swift */; }; - DAA25CFE202260B1002F70AE /* UIWindowTransitionOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAA25CFD202260B1002F70AE /* UIWindowTransitionOptions.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - DAA25CDF20224B96002F70AE /* UIWindowTransitionExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIWindowTransitionExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DAA25CE220224B96002F70AE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - DAA25CE420224B96002F70AE /* SuccesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SuccesViewController.swift; sourceTree = ""; }; - DAA25CE720224B96002F70AE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - DAA25CE920224B96002F70AE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - DAA25CEC20224B96002F70AE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - DAA25CEE20224B96002F70AE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DAA25CF420224C29002F70AE /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; - DAA25CFD202260B1002F70AE /* UIWindowTransitionOptions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = UIWindowTransitionOptions.swift; path = ../../../Source/UIWindowTransitionOptions.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - DAA25CDC20224B96002F70AE /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - DAA25CD620224B96002F70AE = { - isa = PBXGroup; - children = ( - DAA25CE120224B96002F70AE /* UIWindowTransitionExample */, - DAA25CE020224B96002F70AE /* Products */, - ); - sourceTree = ""; - }; - DAA25CE020224B96002F70AE /* Products */ = { - isa = PBXGroup; - children = ( - DAA25CDF20224B96002F70AE /* UIWindowTransitionExample.app */, - ); - name = Products; - sourceTree = ""; - }; - DAA25CE120224B96002F70AE /* UIWindowTransitionExample */ = { - isa = PBXGroup; - children = ( - DAA25CE220224B96002F70AE /* AppDelegate.swift */, - DAA25CE620224B96002F70AE /* Main.storyboard */, - DAA25CFB20224CD0002F70AE /* Controllers */, - DAA25CFA20224CCA002F70AE /* Source */, - DAA25CFC20224CD9002F70AE /* Support */, - DAA25CEE20224B96002F70AE /* Info.plist */, - ); - path = UIWindowTransitionExample; - sourceTree = ""; - }; - DAA25CFA20224CCA002F70AE /* Source */ = { - isa = PBXGroup; - children = ( - DAA25CFD202260B1002F70AE /* UIWindowTransitionOptions.swift */, - ); - path = Source; - sourceTree = ""; - }; - DAA25CFB20224CD0002F70AE /* Controllers */ = { - isa = PBXGroup; - children = ( - DAA25CF420224C29002F70AE /* MainViewController.swift */, - DAA25CE420224B96002F70AE /* SuccesViewController.swift */, - ); - path = Controllers; - sourceTree = ""; - }; - DAA25CFC20224CD9002F70AE /* Support */ = { - isa = PBXGroup; - children = ( - DAA25CE920224B96002F70AE /* Assets.xcassets */, - DAA25CEB20224B96002F70AE /* LaunchScreen.storyboard */, - ); - path = Support; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - DAA25CDE20224B96002F70AE /* UIWindowTransitionExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = DAA25CF120224B96002F70AE /* Build configuration list for PBXNativeTarget "UIWindowTransitionExample" */; - buildPhases = ( - DAA25CDB20224B96002F70AE /* Sources */, - DAA25CDC20224B96002F70AE /* Frameworks */, - DAA25CDD20224B96002F70AE /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = UIWindowTransitionExample; - productName = UIWindowTransitionExample; - productReference = DAA25CDF20224B96002F70AE /* UIWindowTransitionExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - DAA25CD720224B96002F70AE /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 0920; - ORGANIZATIONNAME = "Yuri Lysytsia Developer"; - TargetAttributes = { - DAA25CDE20224B96002F70AE = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = DAA25CDA20224B96002F70AE /* Build configuration list for PBXProject "UIWindowTransitionExample" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = DAA25CD620224B96002F70AE; - productRefGroup = DAA25CE020224B96002F70AE /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - DAA25CDE20224B96002F70AE /* UIWindowTransitionExample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - DAA25CDD20224B96002F70AE /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DAA25CED20224B96002F70AE /* LaunchScreen.storyboard in Resources */, - DAA25CEA20224B96002F70AE /* Assets.xcassets in Resources */, - DAA25CE820224B96002F70AE /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - DAA25CDB20224B96002F70AE /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DAA25CF520224C29002F70AE /* MainViewController.swift in Sources */, - DAA25CE520224B96002F70AE /* SuccesViewController.swift in Sources */, - DAA25CE320224B96002F70AE /* AppDelegate.swift in Sources */, - DAA25CFE202260B1002F70AE /* UIWindowTransitionOptions.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - DAA25CE620224B96002F70AE /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - DAA25CE720224B96002F70AE /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - DAA25CEB20224B96002F70AE /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - DAA25CEC20224B96002F70AE /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - DAA25CEF20224B96002F70AE /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = 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_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - 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 = 11.2; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - DAA25CF020224B96002F70AE /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = 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_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "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 = gnu11; - 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 = 11.2; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - DAA25CF220224B96002F70AE /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = XJ2USXCGT4; - INFOPLIST_FILE = UIWindowTransitionExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = Yuri.Lysytsia.UIWindowTransitionExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - DAA25CF320224B96002F70AE /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = XJ2USXCGT4; - INFOPLIST_FILE = UIWindowTransitionExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = Yuri.Lysytsia.UIWindowTransitionExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - DAA25CDA20224B96002F70AE /* Build configuration list for PBXProject "UIWindowTransitionExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DAA25CEF20224B96002F70AE /* Debug */, - DAA25CF020224B96002F70AE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DAA25CF120224B96002F70AE /* Build configuration list for PBXNativeTarget "UIWindowTransitionExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DAA25CF220224B96002F70AE /* Debug */, - DAA25CF320224B96002F70AE /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = DAA25CD720224B96002F70AE /* Project object */; -} diff --git a/Example/UIWindowTransitionExample/AppDelegate.swift b/Example/UIWindowTransitionExample/AppDelegate.swift deleted file mode 100644 index ac6f51e..0000000 --- a/Example/UIWindowTransitionExample/AppDelegate.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// AppDelegate.swift -// UIWindowTransitionExample -// -// Created by Yuri Fox on 31.01.2018. -// Copyright © 2018 Yuri Lysytsia Developer. 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 - } - -} diff --git a/Example/UIWindowTransitionExample/Base.lproj/Main.storyboard b/Example/UIWindowTransitionExample/Base.lproj/Main.storyboard deleted file mode 100644 index d6a60fd..0000000 --- a/Example/UIWindowTransitionExample/Base.lproj/Main.storyboard +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/UIWindowTransitionExample/Controllers/MainViewController.swift b/Example/UIWindowTransitionExample/Controllers/MainViewController.swift deleted file mode 100644 index bf911f2..0000000 --- a/Example/UIWindowTransitionExample/Controllers/MainViewController.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// MainViewController.swift -// UIWindowTransitionExample -// -// Created by Yuri Fox on 31.01.2018. -// Copyright © 2018 Yuri Lysytsia Developer. All rights reserved. -// - -import UIKit - -class MainViewController: UIViewController { - - static var controller: UIViewController { - let storyboard = UIStoryboard(name: "Main", bundle: nil) - let controller = storyboard.instantiateViewController(withIdentifier: "MainViewController") - return controller - } - - @IBAction func buttonDidTap(_ sender: UIButton) { - - // Window which need set root view controller - guard let window = UIApplication.shared.windows.first else { return } - - /* - Animation for UIWindow transition: - - Fade: center -> center (animated change alpha) - - zoom: center -> center (scale from `scale` to 1.0) - - toTop: bottom -> top - - toBottom: top -> bottom - - toLeft: right -> left - - toRight: left -> right - */ - let animation: UIWindowTransitionOptions.Transition - - switch sender.tag { - case 0: animation = .fade - case 1: animation = .zoom(scale: 0.5) - case 2: animation = .zoom(scale: 1.5) - case 3: animation = .toTop - case 4: animation = .toBottom - case 5: animation = .toLeft - case 6: animation = .toRight - default: return - } - - // You can create options if you would like animated set root view controller. - var options = UIWindowTransitionOptions(transition: animation) - options.duration = 0.4 // Set custom duration in seconds if need. Default is 0.25s - options.curve = .easeIn // Set custom curve if need. Default is linear - - // New root view controller - let controller = SuccesViewController.controller - - /* - controller - new rootViewController - transitionOptions - options for transition. If you put `nil`, viewController will change without animation - */ - window.setRootViewController(controller, transitionOptions: options) - - } - -} diff --git a/Example/UIWindowTransitionExample/Controllers/SuccesViewController.swift b/Example/UIWindowTransitionExample/Controllers/SuccesViewController.swift deleted file mode 100644 index 609e1a3..0000000 --- a/Example/UIWindowTransitionExample/Controllers/SuccesViewController.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// SuccesViewController.swift -// UIWindowTransitionExample -// -// Created by Yuri Fox on 31.01.2018. -// Copyright © 2018 Yuri Lysytsia Developer. All rights reserved. -// - -import UIKit - -class SuccesViewController: UIViewController { - - static var controller: UIViewController { - let storyboard = UIStoryboard(name: "Main", bundle: nil) - let controller = storyboard.instantiateViewController(withIdentifier: "SuccesViewController") - return controller - } - - override func viewDidLoad() { - super.viewDidLoad() - - let tap = UITapGestureRecognizer.init(target: self, action: #selector(self.viewDidTap)) - self.view.addGestureRecognizer(tap) - - } - - @objc private func viewDidTap() { - guard let window = UIApplication.shared.windows.first else { return } - let controller = MainViewController.controller - window.setRootViewController(controller, transitionOptions: nil) - } - -} diff --git a/Example/UIWindowTransitionExample/Info.plist b/Example/UIWindowTransitionExample/Info.plist deleted file mode 100644 index 89d7858..0000000 --- a/Example/UIWindowTransitionExample/Info.plist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - 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 - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Example/UIWindowTransitionExample/Support/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/UIWindowTransitionExample/Support/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d8db8d6..0000000 --- a/Example/UIWindowTransitionExample/Support/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "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" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - }, - { - "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/UIWindowTransitionExample/Support/Base.lproj/LaunchScreen.storyboard b/Example/UIWindowTransitionExample/Support/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f83f6fd..0000000 --- a/Example/UIWindowTransitionExample/Support/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/README.md b/README.md index bf34109..f410ef0 100644 --- a/README.md +++ b/README.md @@ -5,23 +5,23 @@ [![language](https://img.shields.io/badge/pod-4.0.0-blue.svg)]() [![license](https://img.shields.io/badge/license-MIT-lightgray.svg)]() -UIWindowTransition is easy to use source for change UIWindow RootViewController with animation. UIWindowTransition written in Swift 4.0 +UIWindowTransition is easy to use source for change UIWindow RootViewController with animation. UIWindowTransition written in Swift 4.0. -- [Requirements](#requirements) +!!! ATTENTION !!! +The documentation is not accurate because the sources are updated. +- [Requirements](#requirements) - [Installation](#installation) -- [CocoaPods](#CocoaPods) -- [Manually](#Manually) - + - [CocoaPods](#CocoaPods) + - [Manually](#Manually) - [Usage](#usage) - - [License](#license) ## Requirements - iOS 8.0+ -- Xcode 8.3+ -- Swift 3.1+ +- Xcode 9.0+ +- Swift 4.0+ ## Installation ### CocoaPods diff --git a/Source/CHANGELOG b/Source/CHANGELOG new file mode 100644 index 0000000..0725985 --- /dev/null +++ b/Source/CHANGELOG @@ -0,0 +1,16 @@ +=== v1.2 === +- Full code refactoring +- Converted to Swift 4.2 +- Availability for iOS 8+ +- Added a lot of new animations such as: + - none + - flipFromLeft + - flipFromRight + - flipFromBottom + - curlUp + - curlDown + - zoomOut + - zoomIn + - sliceVertical + - sliceHorizontal + - and already existing: fade, fromLeft, fromRight, fromTop, fromBottom diff --git a/Source/Info.plist b/Source/Info.plist new file mode 100644 index 0000000..c701d98 --- /dev/null +++ b/Source/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.2 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/Source/UIWindowTransition.h b/Source/UIWindowTransition.h new file mode 100644 index 0000000..a3e498b --- /dev/null +++ b/Source/UIWindowTransition.h @@ -0,0 +1,19 @@ +// +// UIWindowTransition.h +// UIWindowTransition +// +// Created by Yuri Fox on 10/2/18. +// Copyright © 2018 Yuri Lysytsia. All rights reserved. +// + +//#import + +//! Project version number for UIWindowTransition. +//FOUNDATION_EXPORT double UIWindowTransitionVersionNumber; + +//! Project version string for UIWindowTransition. +//FOUNDATION_EXPORT const unsigned char UIWindowTransitionVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Source/UIWindowTransition.swift b/Source/UIWindowTransition.swift new file mode 100644 index 0000000..4f829fe --- /dev/null +++ b/Source/UIWindowTransition.swift @@ -0,0 +1,252 @@ +// +// UIWindowTransition.swift +// UIWindowTransition +// +// Created by Yuri Fox on 10/2/18. +// Copyright © 2018 Yuri Lysytsia. All rights reserved. +// + +import class UIKit.UIWindow +import class UIKit.UIView +import class UIKit.UIViewController +import class UIKit.UIImageView +import class UIKit.UIImage +import class UIKit.UIApplication +import func UIKit.UIRectClip +import func UIKit.UIGraphicsBeginImageContext +import func UIKit.UIGraphicsGetCurrentContext +import func UIKit.UIGraphicsGetImageFromCurrentImageContext +import func UIKit.UIGraphicsEndImageContext +import class QuartzCore.CATransition +import class QuartzCore.CAMediaTimingFunction +import struct QuartzCore.CATransform3D +import func QuartzCore.CATransform3DMakeScale +import func QuartzCore.CATransform3DMakeTranslation +import var QuartzCore.CATransform3DIdentity +import var QuartzCore.CALayer.kCATransition +import struct Foundation.TimeInterval +import struct CoreGraphics.CGFloat +import struct CoreGraphics.CGRect + + +extension UIWindow { + + /// Options for window root view controller transition + public struct Transition { + + /// Style of the transition animation (default is .none) + public var style: TransitionStyle + + /// Duration of the transition animation (default is 0.3) + public var duration: TimeInterval + + public init(style: TransitionStyle = .none, duration: TimeInterval = 0.3) { + self.style = style + self.duration = duration + } + + } + + /// Style for window root view controller transition + public enum TransitionStyle: Int, CaseIterable { + case none = 0 + case fade = 1 + case flipFromLeft = 2 + case flipFromRight = 3 + case flipFromTop = 4 + case flipFromBottom = 5 + case curlUp = 6 + case curlDown = 7 + case fromLeft = 10 + case fromRight = 11 + case fromTop = 12 + case fromBottom = 13 + case zoomOut = 20 + case zoomIn = 21 + case sliceVertical = 30 + case sliceHorizontal = 31 + } + + /// Set the root view controller of this window with transition + /// + /// - Parameters: + /// - transition: options of the transition + /// - viewController: new root view controller to set + public func transition(_ transition: Transition, to viewController: UIViewController) { + let style = transition.style + let duration = transition.duration + + switch style { + case .none: + self.rootViewController = viewController + + case .fromLeft, .fromRight, .fromTop, .fromBottom: + let animation = CATransition() + animation.duration = duration + animation.timingFunction = CAMediaTimingFunction(name: .linear) + animation.type = .push + switch style { + case .fromLeft: animation.subtype = .fromLeft + case .fromRight: animation.subtype = .fromRight + case .fromTop: animation.subtype = .fromTop + case .fromBottom: animation.subtype = .fromBottom + default: fatalError("It's impossible. But if it's happened tell developer about that") + } + self.layer.add(animation, forKey: kCATransition) + self.rootViewController = viewController + + case .zoomOut, .zoomIn: + guard let snapshot = snapshotView(afterScreenUpdates: true) else { + self.rootViewController = viewController + return + } + + let scale: CGFloat = style == .zoomIn ? 0.01 : 1.5 + + viewController.view.addSubview(snapshot) + self.rootViewController = viewController + + UIView.animate(withDuration: duration, animations: { + snapshot.layer.opacity = 0.00 + snapshot.layer.transform = CATransform3DMakeScale(scale, scale, scale) + }) { _ in + snapshot.removeFromSuperview() + } + + case .sliceVertical: + let width = viewController.view.frame.width + let halfHeight = viewController.view.frame.height/2 + let aboveRect = CGRect(x: 0, y: 0, width: width, height: halfHeight) + let belowRect = CGRect(x: 0, y: halfHeight, width: width, height: halfHeight) + + let aboveImageView = UIImageView(image: self.clippedImage(rect: aboveRect)) + let belowImageView = UIImageView(image: self.clippedImage(rect: belowRect)) + + viewController.view.addSubview(aboveImageView) + viewController.view.addSubview(belowImageView) + self.rootViewController = viewController + + viewController.view.layer.transform = CATransform3DMakeScale(0.98, 0.98, 1) + + UIView.animate(withDuration: duration, animations: { + aboveImageView.layer.transform = CATransform3DMakeTranslation(0, -halfHeight, 0) + belowImageView.layer.transform = CATransform3DMakeTranslation(0, halfHeight, 0) + viewController.view.layer.transform = CATransform3DIdentity + }) { _ in + aboveImageView.removeFromSuperview() + belowImageView.removeFromSuperview() + } + + case .sliceHorizontal: + let halfWidth = viewController.view.frame.width/2 + let wholeHeight = viewController.view.frame.height + let leftRect = CGRect(x: 0, y: 0, width: halfWidth, height: wholeHeight) + let rightRect = CGRect(x: halfWidth, y: 0, width: halfWidth, height: wholeHeight) + + let leftImageView = UIImageView(image: self.clippedImage(rect: leftRect)) + let rightImageView = UIImageView(image: self.clippedImage(rect: rightRect)) + + viewController.view.addSubview(leftImageView) + viewController.view.addSubview(rightImageView) + self.rootViewController = viewController + + viewController.view.layer.transform = CATransform3DMakeScale(0.98, 0.98, 1) + + UIView.animate(withDuration: duration, animations: { + leftImageView.layer.transform = CATransform3DMakeTranslation(-halfWidth, 0, 0) + rightImageView.layer.transform = CATransform3DMakeTranslation(halfWidth * 2, 0, 0) + viewController.view.layer.transform = CATransform3DIdentity + }) { _ in + leftImageView.removeFromSuperview() + rightImageView.removeFromSuperview() + } + + default: + + let options: UIView.AnimationOptions = { + switch style { + case .fade: return .transitionCrossDissolve + case .flipFromLeft: return .transitionFlipFromLeft + case .flipFromRight: return .transitionFlipFromRight + case .flipFromTop: return .transitionFlipFromTop + case .flipFromBottom: return .transitionFlipFromBottom + case .curlUp: return .transitionCurlUp + case .curlDown: return .transitionCurlDown + default: fatalError("It's impossible. But if it's happened tell developer about that") + } + }() + + UIView.transition(with: self, duration: duration, options: options, animations: { [weak self] in + self?.rootViewController = viewController + }, completion: nil) + + } + } + + /// Set the root view controller of this window with transition style + /// + /// - Parameters: + /// - viewController: new root view controller to set + /// - style: style of the transition + public func transition(to viewController: UIViewController, with style: TransitionStyle) { + let transition = Transition(style: style) + self.transition(transition, to: viewController) + } + + /// Set the root view controller of this window with random transition + /// + /// - Parameter viewController: new root view controller to set + public func randomTransition(to viewController: UIViewController) { + let style = TransitionStyle.allCases.randomElement() ?? .none + self.transition(to: viewController, with: style) + } + +} + +extension UIApplication { + + /// Set the root view controller of main application window with transition + /// + /// - Parameters: + /// - newRootController: new root view controller to set + /// - transition: options of the transition + /// - Returns: if true the transition was successful + @discardableResult + public func setRootViewController(_ newRootController: UIViewController, transition: UIWindow.Transition) -> Bool { + + guard let window = self.windows.first ?? self.keyWindow else { return false } + window.transition(transition, to: newRootController) + return true + + } + + /// Set the root view controller of main application window with transition style + /// + /// - Parameters: + /// - newRootController: new root view controller to set + /// - style: style of the transition + /// - Returns: if true the transition was successful + @discardableResult + public func setRootViewController(_ newRootController: UIViewController, style: UIWindow.TransitionStyle) -> Bool { + + let transition = UIWindow.Transition(style: style) + return self.setRootViewController(newRootController, transition: transition) + + } + +} + +extension UIView { + + fileprivate func clippedImage(rect: CGRect) -> UIImage { + UIGraphicsBeginImageContext(self.frame.size) + let context = UIGraphicsGetCurrentContext() + context!.saveGState() + UIRectClip(rect) + self.layer.render(in: context!) + let output = UIGraphicsGetImageFromCurrentImageContext() + UIGraphicsEndImageContext() + return output! + } + +} diff --git a/Source/UIWindowTransitionOptions.swift b/Source/UIWindowTransitionOptions.swift deleted file mode 100644 index 234cdd2..0000000 --- a/Source/UIWindowTransitionOptions.swift +++ /dev/null @@ -1,129 +0,0 @@ -// -// UIWindowTransitionOptions.swift -// UIWindowTransition -// -// Created by Yuri Fox on 31.01.2018. -// Copyright © 2018 Yuri Lysytsia Developer. All rights reserved. -// - -import UIKit - -/// Transition options to set root view controller -public struct UIWindowTransitionOptions { - - /// Transition of the animation - public enum Transition { - case fade, toTop, toBottom, toLeft, toRight - case zoom(scale: CGFloat) - } - - /// Animation of the transition - public var transition: Transition - - /// Duration of the animation (default is 0.25) - public var duration: TimeInterval = 0.25 - - /// Curve of the transition (default is `linear`) - public var curve: UIViewAnimationCurve = .linear - - /// Initialize a new options object with given direction, curve and duration - public init(transition: Transition) { - self.transition = transition - } - - /// Return the animation to perform for given options object - var transitionAnimation: CATransition { - let transition = CATransition() - transition.duration = self.duration - - switch self.curve { - case .linear: transition.timingFunction = - CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear) - case .easeIn: transition.timingFunction = - CAMediaTimingFunction(name:kCAMediaTimingFunctionEaseIn) - case .easeOut: transition.timingFunction = CAMediaTimingFunction(name:kCAMediaTimingFunctionEaseOut) - case .easeInOut: transition.timingFunction = - CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) - } - - switch self.transition { - case .fade: - transition.type = kCATransitionFade - transition.subtype = nil - case .toLeft: - transition.type = kCATransitionPush - transition.subtype = kCATransitionFromRight - case .toRight: - transition.type = kCATransitionPush - transition.subtype = kCATransitionFromLeft - case .toTop: - transition.type = kCATransitionPush - transition.subtype = kCATransitionFromTop - case .toBottom: - transition.type = kCATransitionPush - transition.subtype = kCATransitionFromBottom - default: - return transition - } - - return transition - - } - -} - -public extension UIWindow { - - /// Change the root view controller of the window - /// - /// - Parameters: - /// - controller: controller to set - /// - options: options of the transition - public func setRootViewController(_ controller: UIViewController, transitionOptions: UIWindowTransitionOptions?) { - - guard let options = transitionOptions else { - self.rootViewController = controller - return - } - - switch options.transition { - case .fade, .toBottom, .toTop, .toRight, .toLeft: - self.layer.add(options.transitionAnimation, forKey: kCATransition) - self.rootViewController = controller - self.makeKeyAndVisible() - - case .zoom(scale: let scale): - guard - let snapshot = controller.view.snapshotView(afterScreenUpdates: true), - let currentViewController = self.rootViewController - else { return } - - currentViewController.view.addSubview(snapshot) - snapshot.transform = CGAffineTransform(scaleX: scale, y: scale) - - UIView.transition(with: controller.view, duration: options.duration, options: options.curve.animationOption, animations: { - snapshot.transform = .identity - }) { [weak self] _ in - snapshot.removeFromSuperview() - self?.rootViewController = controller - } - - } - - } - -} - -extension UIViewAnimationCurve { - - var animationOption: UIViewAnimationOptions { - switch self { - case .linear: return .curveLinear - case .easeIn: return .curveEaseIn - case .easeOut: return .curveEaseOut - case .easeInOut: return .curveEaseInOut - } - } - -} - diff --git a/UIWindowTransition.podspec b/UIWindowTransition.podspec index ca16355..bdabec2 100644 --- a/UIWindowTransition.podspec +++ b/UIWindowTransition.podspec @@ -1,9 +1,9 @@ Pod::Spec.new do |s| s.name = "UIWindowTransition" - s.version = "1.0" + s.version = "1.2" - s.summary = "UIWindowTransition is easy to use source for animated set RootViewController of UIWindow. UIWindowTransition written in Swift 4.0" + s.summary = "UIWindowTransition is easy way to animated set root view controller of UIWindow. It written in Swift 4.2" s.homepage = "https://github.com/YuriFox/UIWindowTransition" s.license = { :type => "MIT", :file => "LICENSE" } diff --git a/UIWindowTransition.xcodeproj/project.pbxproj b/UIWindowTransition.xcodeproj/project.pbxproj new file mode 100644 index 0000000..9b7d691 --- /dev/null +++ b/UIWindowTransition.xcodeproj/project.pbxproj @@ -0,0 +1,353 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + DAEBA41E21639FA7008D873A /* UIWindowTransition.podspec in Resources */ = {isa = PBXBuildFile; fileRef = DAEBA41D21639FA7008D873A /* UIWindowTransition.podspec */; }; + DAEBA4202163A033008D873A /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = DAEBA41F2163A033008D873A /* CHANGELOG */; }; + DAF45AD521637D890076BD7D /* UIWindowTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = DAF45AD321637D890076BD7D /* UIWindowTransition.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DAF45AE221637F2C0076BD7D /* UIWindowTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF45AE121637F2C0076BD7D /* UIWindowTransition.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + DAEBA41D21639FA7008D873A /* UIWindowTransition.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = UIWindowTransition.podspec; sourceTree = ""; }; + DAEBA41F2163A033008D873A /* CHANGELOG */ = {isa = PBXFileReference; lastKnownFileType = text; path = CHANGELOG; sourceTree = ""; }; + DAF45AD021637D890076BD7D /* UIWindowTransition.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UIWindowTransition.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DAF45AD321637D890076BD7D /* UIWindowTransition.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIWindowTransition.h; sourceTree = ""; }; + DAF45AD421637D890076BD7D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DAF45AE121637F2C0076BD7D /* UIWindowTransition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIWindowTransition.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + DAF45ACD21637D890076BD7D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + DAF45AC621637D890076BD7D = { + isa = PBXGroup; + children = ( + DAEBA41D21639FA7008D873A /* UIWindowTransition.podspec */, + DAF45AD221637D890076BD7D /* Source */, + DAF45AD121637D890076BD7D /* Products */, + ); + sourceTree = ""; + }; + DAF45AD121637D890076BD7D /* Products */ = { + isa = PBXGroup; + children = ( + DAF45AD021637D890076BD7D /* UIWindowTransition.framework */, + ); + name = Products; + sourceTree = ""; + }; + DAF45AD221637D890076BD7D /* Source */ = { + isa = PBXGroup; + children = ( + DAEBA41F2163A033008D873A /* CHANGELOG */, + DAF45AD321637D890076BD7D /* UIWindowTransition.h */, + DAF45AE121637F2C0076BD7D /* UIWindowTransition.swift */, + DAF45AD421637D890076BD7D /* Info.plist */, + ); + path = Source; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + DAF45ACB21637D890076BD7D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + DAF45AD521637D890076BD7D /* UIWindowTransition.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + DAF45ACF21637D890076BD7D /* UIWindowTransition */ = { + isa = PBXNativeTarget; + buildConfigurationList = DAF45AD821637D890076BD7D /* Build configuration list for PBXNativeTarget "UIWindowTransition" */; + buildPhases = ( + DAF45ACB21637D890076BD7D /* Headers */, + DAF45ACC21637D890076BD7D /* Sources */, + DAF45ACD21637D890076BD7D /* Frameworks */, + DAF45ACE21637D890076BD7D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = UIWindowTransition; + productName = UIWindowTransition; + productReference = DAF45AD021637D890076BD7D /* UIWindowTransition.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + DAF45AC721637D890076BD7D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1000; + ORGANIZATIONNAME = "Yuri Lysytsia"; + TargetAttributes = { + DAF45ACF21637D890076BD7D = { + CreatedOnToolsVersion = 10.0; + LastSwiftMigration = 1000; + }; + }; + }; + buildConfigurationList = DAF45ACA21637D890076BD7D /* Build configuration list for PBXProject "UIWindowTransition" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = DAF45AC621637D890076BD7D; + productRefGroup = DAF45AD121637D890076BD7D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + DAF45ACF21637D890076BD7D /* UIWindowTransition */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + DAF45ACE21637D890076BD7D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DAEBA41E21639FA7008D873A /* UIWindowTransition.podspec in Resources */, + DAEBA4202163A033008D873A /* CHANGELOG in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + DAF45ACC21637D890076BD7D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DAF45AE221637F2C0076BD7D /* UIWindowTransition.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + DAF45AD621637D890076BD7D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + DAF45AD721637D890076BD7D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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 = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + DAF45AD921637D890076BD7D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = XJ2USXCGT4; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = Developer.Lysytsia.UIWindowTransition; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + DAF45ADA21637D890076BD7D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = XJ2USXCGT4; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = Developer.Lysytsia.UIWindowTransition; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + DAF45ACA21637D890076BD7D /* Build configuration list for PBXProject "UIWindowTransition" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DAF45AD621637D890076BD7D /* Debug */, + DAF45AD721637D890076BD7D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DAF45AD821637D890076BD7D /* Build configuration list for PBXNativeTarget "UIWindowTransition" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DAF45AD921637D890076BD7D /* Debug */, + DAF45ADA21637D890076BD7D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = DAF45AC721637D890076BD7D /* Project object */; +} diff --git a/Example/UIWindowTransitionExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/UIWindowTransition.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 64% rename from Example/UIWindowTransitionExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to UIWindowTransition.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 304b248..1a47b6d 100644 --- a/Example/UIWindowTransitionExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/UIWindowTransition.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:UIWindowTransition.xcodeproj"> diff --git a/UIWindowTransition.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/UIWindowTransition.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/UIWindowTransition.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + +