diff --git a/Sources/TouchDrawView.swift b/Sources/TouchDrawView.swift index d0f92ba..356963e 100644 --- a/Sources/TouchDrawView.swift +++ b/Sources/TouchDrawView.swift @@ -113,7 +113,7 @@ open class TouchDrawView: UIView { } /// Clears the drawing - open func clearDrawing() { + @objc open func clearDrawing() { if !touchDrawUndoManager.canUndo { delegate?.undoEnabled?() } @@ -193,7 +193,7 @@ open class TouchDrawView: UIView { } /// Removes the last Stroke from stack - internal func popDrawing() { + @objc internal func popDrawing() { touchDrawUndoManager.registerUndo(withTarget: self, selector: #selector(pushDrawing(_:)), object: stack.popLast()) @@ -201,14 +201,14 @@ open class TouchDrawView: UIView { } /// Adds a new stroke to the stack - internal func pushDrawing(_ stroke: Stroke) { + @objc internal func pushDrawing(_ stroke: Stroke) { stack.append(stroke) drawStrokeWithContext(stroke) touchDrawUndoManager.registerUndo(withTarget: self, selector: #selector(popDrawing), object: nil) } /// Draws all of the strokes - internal func pushAll(_ strokes: [Stroke]) { + @objc internal func pushAll(_ strokes: [Stroke]) { stack = strokes redrawStack() touchDrawUndoManager.registerUndo(withTarget: self, selector: #selector(clearDrawing), object: nil) diff --git a/TouchDraw.xcodeproj/project.pbxproj b/TouchDraw.xcodeproj/project.pbxproj index f599214..932c8a1 100644 --- a/TouchDraw.xcodeproj/project.pbxproj +++ b/TouchDraw.xcodeproj/project.pbxproj @@ -160,16 +160,16 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Christian Paul Dehli"; TargetAttributes = { 89EADBB31CB87C23001130A8 = { CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 0810; + LastSwiftMigration = 0900; }; 89F60F6A1BC9580000BCDD93 = { CreatedOnToolsVersion = 7.0.1; - LastSwiftMigration = 0810; + LastSwiftMigration = 0900; }; }; }; @@ -247,7 +247,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.dehli.TouchDrawTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -260,7 +261,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.dehli.TouchDrawTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -272,14 +274,20 @@ 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_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_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -322,14 +330,20 @@ 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_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_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -375,7 +389,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -395,7 +410,8 @@ PRODUCT_BUNDLE_IDENTIFIER = io.dehli.TouchDraw; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/TouchDraw.xcodeproj/xcshareddata/xcschemes/TouchDraw.xcscheme b/TouchDraw.xcodeproj/xcshareddata/xcschemes/TouchDraw.xcscheme index 8d2572b..45367a2 100644 --- a/TouchDraw.xcodeproj/xcshareddata/xcschemes/TouchDraw.xcscheme +++ b/TouchDraw.xcodeproj/xcshareddata/xcschemes/TouchDraw.xcscheme @@ -1,6 +1,6 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.1.0 + 2.1.1 CFBundleSignature ???? CFBundleVersion