diff --git a/Classes/Popover.swift b/Classes/Popover.swift index 90c56a7..c4a9580 100644 --- a/Classes/Popover.swift +++ b/Classes/Popover.swift @@ -16,7 +16,7 @@ public enum PopoverOption { case cornerRadius(CGFloat) case sideEdge(CGFloat) case blackOverlayColor(UIColor) - case overlayBlur(UIBlurEffectStyle) + case overlayBlur(UIBlurEffect.Style) case type(PopoverType) case color(UIColor) case dismissOnBlackOverlayTap(Bool) @@ -200,7 +200,7 @@ open class Popover: UIView { if self.superview != nil { self.willDismissHandler?() UIView.animate(withDuration: self.animationOut, delay: 0, - options: UIViewAnimationOptions(), + options: UIView.AnimationOptions(), animations: { self.transform = CGAffineTransform(scaleX: 0.0001, y: 0.0001) self.blackOverlay.alpha = 0 @@ -433,7 +433,7 @@ private extension Popover { let fillLayer = CAShapeLayer() fillLayer.path = path.cgPath - fillLayer.fillRule = kCAFillRuleEvenOdd + fillLayer.fillRule = CAShapeLayerFillRule.evenOdd fillLayer.fillColor = self.blackOverlayColor.cgColor self.blackOverlay.layer.addSublayer(fillLayer) } @@ -457,7 +457,7 @@ private extension Popover { delay: 0, usingSpringWithDamping: self.springDamping, initialSpringVelocity: self.initialSpringVelocity, - options: UIViewAnimationOptions(), + options: UIView.AnimationOptions(), animations: { self.transform = CGAffineTransform.identity }){ _ in diff --git a/Popover.xcodeproj/project.pbxproj b/Popover.xcodeproj/project.pbxproj index e4b71c2..b5b3ad7 100644 --- a/Popover.xcodeproj/project.pbxproj +++ b/Popover.xcodeproj/project.pbxproj @@ -101,12 +101,12 @@ 72782A4E1C6BE5C3003BA478 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0800; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = SimonBS; TargetAttributes = { 72782A561C6BE5C3003BA478 = { CreatedOnToolsVersion = 7.2.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1000; }; }; }; @@ -157,14 +157,22 @@ 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_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -188,7 +196,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -207,14 +215,22 @@ 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_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -232,7 +248,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -260,7 +276,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -280,7 +297,8 @@ PRODUCT_BUNDLE_IDENTIFIER = dk.simonbs.Popover; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/Popover.xcodeproj/xcshareddata/xcschemes/Popover.xcscheme b/Popover.xcodeproj/xcshareddata/xcschemes/Popover.xcscheme index 83fe843..2efb09a 100644 --- a/Popover.xcodeproj/xcshareddata/xcschemes/Popover.xcscheme +++ b/Popover.xcodeproj/xcshareddata/xcschemes/Popover.xcscheme @@ -1,6 +1,6 @@