diff --git a/SWindow.xcodeproj/project.pbxproj b/SWindow.xcodeproj/project.pbxproj index c20c4f6..65d63da 100644 --- a/SWindow.xcodeproj/project.pbxproj +++ b/SWindow.xcodeproj/project.pbxproj @@ -146,18 +146,19 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0830; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = Shial; TargetAttributes = { 62A735A91EDDA1CA008174F2 = { CreatedOnToolsVersion = 8.3.2; DevelopmentTeam = 7Z5C7X6723; - LastSwiftMigration = 0830; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; }; 62A735B21EDDA1CA008174F2 = { CreatedOnToolsVersion = 8.3.2; DevelopmentTeam = 7Z5C7X6723; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; }; }; @@ -235,7 +236,9 @@ 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; @@ -243,7 +246,11 @@ 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_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -289,7 +296,9 @@ 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; @@ -297,7 +306,11 @@ 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_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -344,7 +357,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -365,7 +379,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.shial.swindow.ios.SWindow; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -378,7 +393,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.shial.swindow.ios.SWindowTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -391,7 +407,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.shial.swindow.ios.SWindowTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -414,6 +431,7 @@ 62A735C01EDDA1CA008174F2 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 62A735C11EDDA1CA008174F2 /* Build configuration list for PBXNativeTarget "SWindowTests" */ = { isa = XCConfigurationList; @@ -422,6 +440,7 @@ 62A735C31EDDA1CA008174F2 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/SWindow.xcodeproj/project.xcworkspace/xcuserdata/shial.xcuserdatad/UserInterfaceState.xcuserstate b/SWindow.xcodeproj/project.xcworkspace/xcuserdata/shial.xcuserdatad/UserInterfaceState.xcuserstate index c2282c7..64f7b97 100644 Binary files a/SWindow.xcodeproj/project.xcworkspace/xcuserdata/shial.xcuserdatad/UserInterfaceState.xcuserstate and b/SWindow.xcodeproj/project.xcworkspace/xcuserdata/shial.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/SWindow.xcodeproj/xcuserdata/shial.xcuserdatad/xcschemes/SWindow.xcscheme b/SWindow.xcodeproj/xcuserdata/shial.xcuserdatad/xcschemes/SWindow.xcscheme index 34e4264..8dfd9c9 100644 --- a/SWindow.xcodeproj/xcuserdata/shial.xcuserdatad/xcschemes/SWindow.xcscheme +++ b/SWindow.xcodeproj/xcuserdata/shial.xcuserdatad/xcschemes/SWindow.xcscheme @@ -1,6 +1,6 @@ @@ -56,6 +57,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/SWindowTests/SWindowTests.swift b/SWindowTests/SWindowTests.swift index 2b8e37f..a5ab1c6 100644 --- a/SWindowTests/SWindowTests.swift +++ b/SWindowTests/SWindowTests.swift @@ -44,7 +44,7 @@ class SWindowTests: XCTestCase { } func testSModalDuration() { - XCTAssertEqualWithAccuracy(SModal.animationDuration, 0.2, accuracy: 0.01) + XCTAssertEqual(SModal.animationDuration, 0.2, accuracy: 0.01) } func testModalCanDismiss() { diff --git a/Sources/SWindow.swift b/Sources/SWindow.swift index 964db9a..f4d59f0 100644 --- a/Sources/SWindow.swift +++ b/Sources/SWindow.swift @@ -106,7 +106,7 @@ public protocol SModalPresentation: class, SModalStack { // MARK: - Default implementation of Modal Presentation protocol extension SModalPresentation { /// Provide information about current status - final var modalStatus: SModalStatus { + var modalStatus: SModalStatus { if SModal.modalWindow.rootViewController === self { return .presented } @@ -117,7 +117,7 @@ extension SModalPresentation { } /// Return SWindow stack - final var stack: [SModalPresentation] { + var stack: [SModalPresentation] { return SModal.stack }