From be30d3b46af2c8bc33db1b6cdda8df73788c29db Mon Sep 17 00:00:00 2001 From: Akhilesh Pratap Singh Date: Mon, 9 Sep 2019 14:59:51 +0530 Subject: [PATCH] Upgraded to 4.2 --- Exmple/AppDelegate.swift | 2 +- Exmple/BlurParallaxVC.swift | 2 +- Exmple/BlurRoundIconParallaxVC.swift | 2 +- Exmple/UIView+Blur.swift | 18 +++---- ParallaxHeader.xcodeproj/project.pbxproj | 50 ++++++------------- .../xcshareddata/IDEWorkspaceChecks.plist | 8 +++ .../xcshareddata/WorkspaceSettings.xcsettings | 5 ++ ParallaxHeader/ParallaxHeader.swift | 50 +++++++++---------- Podfile | 2 +- Podfile.lock | 11 ++-- 10 files changed, 75 insertions(+), 75 deletions(-) create mode 100644 ParallaxHeader.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 ParallaxHeader.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/Exmple/AppDelegate.swift b/Exmple/AppDelegate.swift index f6755cb..ef007d7 100644 --- a/Exmple/AppDelegate.swift +++ b/Exmple/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Exmple/BlurParallaxVC.swift b/Exmple/BlurParallaxVC.swift index e6ccb49..afb8d7a 100644 --- a/Exmple/BlurParallaxVC.swift +++ b/Exmple/BlurParallaxVC.swift @@ -31,7 +31,7 @@ class BlurParallaxVC: UIViewController, UITableViewDelegate, UITableViewDataSour imageView.contentMode = .scaleAspectFill //setup blur vibrant view - imageView.blurView.setup(style: UIBlurEffectStyle.dark, alpha: 1).enable() + imageView.blurView.setup(style: UIBlurEffect.Style.dark, alpha: 1).enable() headerImageView = imageView diff --git a/Exmple/BlurRoundIconParallaxVC.swift b/Exmple/BlurRoundIconParallaxVC.swift index de4033a..0c49908 100644 --- a/Exmple/BlurRoundIconParallaxVC.swift +++ b/Exmple/BlurRoundIconParallaxVC.swift @@ -32,7 +32,7 @@ class BlurRoundIconParallaxVC: UIViewController, UITableViewDelegate, UITableVie parallaxHeaderView = imageView //setup bur view - imageView.blurView.setup(style: UIBlurEffectStyle.dark, alpha: 1).enable() + imageView.blurView.setup(style: UIBlurEffect.Style.dark, alpha: 1).enable() tableView.parallaxHeader.view = imageView tableView.parallaxHeader.height = 400 diff --git a/Exmple/UIView+Blur.swift b/Exmple/UIView+Blur.swift index 66b1d46..c2f8d6d 100644 --- a/Exmple/UIView+Blur.swift +++ b/Exmple/UIView+Blur.swift @@ -49,7 +49,7 @@ extension UIView { * Blur style. After it is changed all subviews on * blurContentView & vibrancyContentView will be deleted. */ - var style: UIBlurEffectStyle = .light { + var style: UIBlurEffect.Style = .light { didSet { guard oldValue != style, !editing else { return } @@ -76,7 +76,7 @@ extension UIView { self.superview = view } - func setup(style: UIBlurEffectStyle, alpha: CGFloat) -> Self { + func setup(style: UIBlurEffect.Style, alpha: CGFloat) -> Self { self.editing = true self.style = style @@ -104,7 +104,7 @@ extension UIView { ) } - private func applyBlurEffect(style: UIBlurEffectStyle, + private func applyBlurEffect(style: UIBlurEffect.Style, blurAlpha: CGFloat) { superview.backgroundColor = UIColor.clear @@ -130,18 +130,18 @@ extension UIView { private func addAlignedConstrains() { translatesAutoresizingMaskIntoConstraints = false - addAlignConstraintToSuperview(attribute: NSLayoutAttribute.top) - addAlignConstraintToSuperview(attribute: NSLayoutAttribute.leading) - addAlignConstraintToSuperview(attribute: NSLayoutAttribute.trailing) - addAlignConstraintToSuperview(attribute: NSLayoutAttribute.bottom) + addAlignConstraintToSuperview(attribute: NSLayoutConstraint.Attribute.top) + addAlignConstraintToSuperview(attribute: NSLayoutConstraint.Attribute.leading) + addAlignConstraintToSuperview(attribute: NSLayoutConstraint.Attribute.trailing) + addAlignConstraintToSuperview(attribute: NSLayoutConstraint.Attribute.bottom) } - private func addAlignConstraintToSuperview(attribute: NSLayoutAttribute) { + private func addAlignConstraintToSuperview(attribute: NSLayoutConstraint.Attribute) { superview?.addConstraint( NSLayoutConstraint( item: self, attribute: attribute, - relatedBy: NSLayoutRelation.equal, + relatedBy: NSLayoutConstraint.Relation.equal, toItem: superview, attribute: attribute, multiplier: 1, diff --git a/ParallaxHeader.xcodeproj/project.pbxproj b/ParallaxHeader.xcodeproj/project.pbxproj index ec502e6..208e15f 100644 --- a/ParallaxHeader.xcodeproj/project.pbxproj +++ b/ParallaxHeader.xcodeproj/project.pbxproj @@ -391,7 +391,6 @@ B5CCB7A91EFD0F2300194CFB /* Resources */, B5CCB7D61EFD109500194CFB /* Embed Frameworks */, DB2BD7ED3ABE8A85C94D31F6 /* [CP] Embed Pods Frameworks */, - 383E94231D2D333DBB6D5C66 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -428,13 +427,13 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1010; ORGANIZATIONNAME = MagicLab; TargetAttributes = { B5CCB78C1EFD0E5400194CFB = { CreatedOnToolsVersion = 8.3.3; DevelopmentTeam = SWXVWAU9H9; - LastSwiftMigration = 0900; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; B5CCB7951EFD0E5500194CFB = { @@ -445,13 +444,13 @@ B5CCB7AA1EFD0F2300194CFB = { CreatedOnToolsVersion = 8.3.3; DevelopmentTeam = SWXVWAU9H9; - LastSwiftMigration = 0900; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; B5CCB7BD1EFD0F2300194CFB = { CreatedOnToolsVersion = 8.3.3; DevelopmentTeam = SWXVWAU9H9; - LastSwiftMigration = 0900; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; TestTargetID = B5CCB7AA1EFD0F2300194CFB; }; @@ -537,28 +536,13 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 383E94231D2D333DBB6D5C66 /* [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-Exmple/Pods-Exmple-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; DB2BD7ED3ABE8A85C94D31F6 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-Exmple/Pods-Exmple-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-Exmple/Pods-Exmple-frameworks.sh", "${BUILT_PRODUCTS_DIR}/RSReusable/Reusable.framework", "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", ); @@ -569,7 +553,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Exmple/Pods-Exmple-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Exmple/Pods-Exmple-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -673,6 +657,7 @@ 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; @@ -680,6 +665,7 @@ 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; @@ -733,6 +719,7 @@ 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; @@ -740,6 +727,7 @@ 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; @@ -790,8 +778,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -813,8 +800,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.ParallaxHeader; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -857,8 +843,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.Exmple; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -874,8 +859,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.Exmple; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -889,8 +873,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.ExmpleTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Exmple.app/Exmple"; }; name = Debug; @@ -905,8 +888,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.ExmpleTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Exmple.app/Exmple"; }; name = Release; diff --git a/ParallaxHeader.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ParallaxHeader.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ParallaxHeader.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ParallaxHeader.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ParallaxHeader.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/ParallaxHeader.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,5 @@ + + + + + diff --git a/ParallaxHeader/ParallaxHeader.swift b/ParallaxHeader/ParallaxHeader.swift index 1ab049a..b875db3 100644 --- a/ParallaxHeader/ParallaxHeader.swift +++ b/ParallaxHeader/ParallaxHeader.swift @@ -225,7 +225,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "H:|[v]|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: nil, views: binding ) @@ -233,7 +233,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "V:|[v]|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: nil, views: binding ) @@ -250,7 +250,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "H:|[v]|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: nil, views: binding ) @@ -258,7 +258,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "V:|[v(==height)]", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: metrics, views: binding ) @@ -276,7 +276,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "H:|[v]|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: nil, views: binding ) @@ -284,7 +284,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "V:|[v(>=height)]-0.0@highPriority-|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: metrics, views: binding ) @@ -298,7 +298,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "H:|[v]|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: nil, views: binding ) @@ -307,10 +307,10 @@ public class ParallaxHeader: NSObject { contentView.addConstraint( NSLayoutConstraint( item: view, - attribute: NSLayoutAttribute.centerY, - relatedBy: NSLayoutRelation.equal, + attribute: NSLayoutConstraint.Attribute.centerY, + relatedBy: NSLayoutConstraint.Relation.equal, toItem: contentView, - attribute: NSLayoutAttribute.centerY, + attribute: NSLayoutConstraint.Attribute.centerY, multiplier: 1, constant: 0 ) @@ -318,10 +318,10 @@ public class ParallaxHeader: NSObject { contentView.addConstraint( NSLayoutConstraint( item: view, - attribute: NSLayoutAttribute.centerX, - relatedBy: NSLayoutRelation.equal, + attribute: NSLayoutConstraint.Attribute.centerX, + relatedBy: NSLayoutConstraint.Relation.equal, toItem: contentView, - attribute: NSLayoutAttribute.centerX, + attribute: NSLayoutConstraint.Attribute.centerX, multiplier: 1, constant: 0 ) @@ -339,7 +339,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "H:|[v]|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: nil, views: binding ) @@ -347,7 +347,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "V:|-0@highPriority-[v(>=height)]-0@highPriority-|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: metrics, views: binding ) @@ -356,10 +356,10 @@ public class ParallaxHeader: NSObject { contentView.addConstraint( NSLayoutConstraint( item: view, - attribute: NSLayoutAttribute.centerY, - relatedBy: NSLayoutRelation.equal, + attribute: NSLayoutConstraint.Attribute.centerY, + relatedBy: NSLayoutConstraint.Relation.equal, toItem: contentView, - attribute: NSLayoutAttribute.centerY, + attribute: NSLayoutConstraint.Attribute.centerY, multiplier: 1, constant: 0 ) @@ -367,10 +367,10 @@ public class ParallaxHeader: NSObject { contentView.addConstraint( NSLayoutConstraint( item: view, - attribute: NSLayoutAttribute.centerX, - relatedBy: NSLayoutRelation.equal, + attribute: NSLayoutConstraint.Attribute.centerX, + relatedBy: NSLayoutConstraint.Relation.equal, toItem: contentView, - attribute: NSLayoutAttribute.centerX, + attribute: NSLayoutConstraint.Attribute.centerX, multiplier: 1, constant: 0 ) @@ -387,7 +387,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "H:|[v]|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: nil, views: binding ) @@ -395,7 +395,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "V:[v(==height)]|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: metrics, views: binding ) @@ -413,7 +413,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "H:|[v]|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: nil, views: binding ) @@ -421,7 +421,7 @@ public class ParallaxHeader: NSObject { contentView.addConstraints( NSLayoutConstraint.constraints( withVisualFormat: "V:|-0.0@highPriority-[v(>=height)]|", - options: NSLayoutFormatOptions(rawValue: 0), + options: NSLayoutConstraint.FormatOptions(rawValue: 0), metrics: metrics, views: binding ) diff --git a/Podfile b/Podfile index 97a8565..d8c06de 100644 --- a/Podfile +++ b/Podfile @@ -5,6 +5,6 @@ use_frameworks! target 'Exmple' do pod 'RSReusable' - pod 'SnapKit' + pod 'SnapKit', '4.0.0' end diff --git a/Podfile.lock b/Podfile.lock index 5b10bed..7db7fcb 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -4,12 +4,17 @@ PODS: DEPENDENCIES: - RSReusable - - SnapKit + - SnapKit (= 4.0.0) + +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - RSReusable + - SnapKit SPEC CHECKSUMS: RSReusable: e7888dff90fbaf01b9b01169875730be4a04e818 SnapKit: a42d492c16e80209130a3379f73596c3454b7694 -PODFILE CHECKSUM: 3c522e1f0f4d68a6e342b12a8c2de173654d2cf8 +PODFILE CHECKSUM: cea0719bfcce35b418f38c41ae92433367c4dfc5 -COCOAPODS: 1.3.1 +COCOAPODS: 1.7.3