diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index cf8fa95..d21be19 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -11,6 +11,7 @@ 16B8ABD0532C88D8BE6E5E841792FDFA /* SnapSliderFilters-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E80757AEAF0620F282052314BC5156A /* SnapSliderFilters-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1E1F8F54B94EE51186E79EC6A2B27E05 /* SNSliderDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08965B8D111F2DC8C34B13965A98EE7 /* SNSliderDataSource.swift */; }; 39414DED5C8BB5D7F86B0F9F6DF8EAFC /* SNFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C01067FCBF6D750F29C877DC5D1631C /* SNFilter.swift */; }; + 4ADC6D7B21A2194C001CD405 /* SNSliderDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ADC6D7921A21865001CD405 /* SNSliderDelegate.swift */; }; 5D7210CB97776B768C88851FB8929AF4 /* Pods-SnapSliderFilters_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D01F69FD6D41A3FE1F069BA8A419242 /* Pods-SnapSliderFilters_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F083A453778F3DED02F355919A5EACB /* Pods-SnapSliderFilters_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 81BFB0A30FE8ECEFEBA2FA2FEE62B773 /* Pods-SnapSliderFilters_Example-dummy.m */; }; 6800ADB1057EBF323064B3BEC2DAF4FA /* SNSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52AB3D18585E6ED3465F0E416CC048E9 /* SNSlider.swift */; }; @@ -54,6 +55,7 @@ 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 46B77637576DD533CC836A1C8D9B6222 /* Pods-SnapSliderFilters_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SnapSliderFilters_Example.debug.xcconfig"; sourceTree = ""; }; 47BD28D3C18896525208F13CDD7E43F1 /* SnapSliderFilters.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SnapSliderFilters.xcconfig; sourceTree = ""; }; + 4ADC6D7921A21865001CD405 /* SNSliderDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SNSliderDelegate.swift; sourceTree = ""; }; 52AB3D18585E6ED3465F0E416CC048E9 /* SNSlider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SNSlider.swift; sourceTree = ""; }; 544C6CB47B48E9598CE2B936A5A45926 /* Pods-SnapSliderFilters_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SnapSliderFilters_Example.release.xcconfig"; sourceTree = ""; }; 5C01067FCBF6D750F29C877DC5D1631C /* SNFilter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SNFilter.swift; sourceTree = ""; }; @@ -159,6 +161,7 @@ 5C01067FCBF6D750F29C877DC5D1631C /* SNFilter.swift */, 52AB3D18585E6ED3465F0E416CC048E9 /* SNSlider.swift */, C08965B8D111F2DC8C34B13965A98EE7 /* SNSliderDataSource.swift */, + 4ADC6D7921A21865001CD405 /* SNSliderDelegate.swift */, 8E11E37E752062D581B439C0607DDAB8 /* SNSticker.swift */, 37B12E1D1F65F6EB6239F12E91919137 /* SNTextField.swift */, AF618D3DD0E78C121413D6A8AFAA232B /* SNUtils.swift */, @@ -340,16 +343,16 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0940; TargetAttributes = { 1F3FDF782886F3896275161381892DE5 = { LastSwiftMigration = 0800; }; 5156FAF0B2ACFD7E48AB85EF47AA8ADD = { - LastSwiftMigration = 0800; + LastSwiftMigration = 0940; }; 7CC7E80C1B27CC4BA08C07AB237964B6 = { - LastSwiftMigration = 0800; + LastSwiftMigration = 0940; }; }; }; @@ -377,6 +380,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 4ADC6D7B21A2194C001CD405 /* SNSliderDelegate.swift in Sources */, E18CE723F7B6CD734F65AA4D54344A6D /* SnapSliderFilters-dummy.m in Sources */, 39414DED5C8BB5D7F86B0F9F6DF8EAFC /* SNFilter.swift in Sources */, 6800ADB1057EBF323064B3BEC2DAF4FA /* SNSlider.swift in Sources */, @@ -431,18 +435,30 @@ 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; 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; + 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; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; @@ -452,6 +468,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.3; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_COMPILATION_MODE = wholemodule; SYMROOT = "${SRCROOT}/../build"; VALIDATE_PRODUCT = YES; }; @@ -461,7 +478,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 544C6CB47B48E9598CE2B936A5A45926 /* Pods-SnapSliderFilters_Example.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -479,6 +498,7 @@ OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = Pods_SnapSliderFilters_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -493,6 +513,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 47BD28D3C18896525208F13CDD7E43F1 /* SnapSliderFilters.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -507,11 +528,13 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/SnapSliderFilters/SnapSliderFilters.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = SnapSliderFilters; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -526,18 +549,31 @@ 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; 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; + 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; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -561,7 +597,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 46B77637576DD533CC836A1C8D9B6222 /* Pods-SnapSliderFilters_Example.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -579,6 +617,7 @@ OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = Pods_SnapSliderFilters_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -594,6 +633,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 0E4DB8475C8819432A1C815283E4E52F /* Pods-SnapSliderFilters_Tests.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -611,6 +652,7 @@ OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = Pods_SnapSliderFilters_Tests; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -626,6 +668,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 47BD28D3C18896525208F13CDD7E43F1 /* SnapSliderFilters.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -640,10 +683,12 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/SnapSliderFilters/SnapSliderFilters.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = SnapSliderFilters; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -654,6 +699,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 3608A6482718ED15276C590A18AF5517 /* Pods-SnapSliderFilters_Tests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -671,6 +718,7 @@ OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = Pods_SnapSliderFilters_Tests; SDKROOT = iphoneos; SKIP_INSTALL = YES; diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/SnapSliderFilters.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/SnapSliderFilters.xcscheme index d2e729e..3c81ef8 100644 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/SnapSliderFilters.xcscheme +++ b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/SnapSliderFilters.xcscheme @@ -1,36 +1,39 @@ + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + BuildableIdentifier = "primary" + BlueprintIdentifier = "7CC7E80C1B27CC4BA08C07AB237964B6" + BuildableName = "SnapSliderFilters.framework" + BlueprintName = "SnapSliderFilters" + ReferencedContainer = "container:Pods.xcodeproj"> + shouldUseLaunchSchemeArgsEnv = "YES"> + + + + + + + debugDocumentVersioning = "YES"> diff --git a/Example/Pods/Target Support Files/Pods-SnapSliderFilters_Example/Info.plist b/Example/Pods/Target Support Files/Pods-SnapSliderFilters_Example/Info.plist index 6974542..11db4b7 100644 --- a/Example/Pods/Target Support Files/Pods-SnapSliderFilters_Example/Info.plist +++ b/Example/Pods/Target Support Files/Pods-SnapSliderFilters_Example/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + diff --git a/Example/Pods/Target Support Files/Pods-SnapSliderFilters_Tests/Info.plist b/Example/Pods/Target Support Files/Pods-SnapSliderFilters_Tests/Info.plist index 6974542..11db4b7 100644 --- a/Example/Pods/Target Support Files/Pods-SnapSliderFilters_Tests/Info.plist +++ b/Example/Pods/Target Support Files/Pods-SnapSliderFilters_Tests/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + diff --git a/Example/Pods/Target Support Files/SnapSliderFilters/Info.plist b/Example/Pods/Target Support Files/SnapSliderFilters/Info.plist index f01fe2e..a846041 100644 --- a/Example/Pods/Target Support Files/SnapSliderFilters/Info.plist +++ b/Example/Pods/Target Support Files/SnapSliderFilters/Info.plist @@ -2,14 +2,12 @@ - NSPhotoLibraryUsageDescription - Load your own photos and give it a try ! CFBundleDevelopmentRegion en CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -22,6 +20,8 @@ ???? CFBundleVersion ${CURRENT_PROJECT_VERSION} + NSPhotoLibraryUsageDescription + Load your own photos and give it a try ! NSPrincipalClass diff --git a/Example/SnapSliderFilters.xcodeproj/project.pbxproj b/Example/SnapSliderFilters.xcodeproj/project.pbxproj index 8718af7..98db764 100644 --- a/Example/SnapSliderFilters.xcodeproj/project.pbxproj +++ b/Example/SnapSliderFilters.xcodeproj/project.pbxproj @@ -170,8 +170,9 @@ TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - DevelopmentTeam = VH6T8695X3; + DevelopmentTeam = LLV33K3333; LastSwiftMigration = 0800; + ProvisioningStyle = Automatic; }; }; }; @@ -381,6 +382,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = LLV33K3333; INFOPLIST_FILE = SnapSliderFilters/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -388,7 +391,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; - SWIFT_VERSION = 3.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -399,6 +403,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = LLV33K3333; INFOPLIST_FILE = SnapSliderFilters/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -406,7 +412,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; - SWIFT_VERSION = 3.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/Example/SnapSliderFilters.xcodeproj/xcshareddata/xcschemes/SnapSliderFilters-Example.xcscheme b/Example/SnapSliderFilters.xcodeproj/xcshareddata/xcschemes/SnapSliderFilters-Example.xcscheme index ba21cf8..b977032 100644 --- a/Example/SnapSliderFilters.xcodeproj/xcshareddata/xcschemes/SnapSliderFilters-Example.xcscheme +++ b/Example/SnapSliderFilters.xcodeproj/xcshareddata/xcschemes/SnapSliderFilters-Example.xcscheme @@ -1,6 +1,6 @@ + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/SnapSliderFilters/ViewController.swift b/Example/SnapSliderFilters/ViewController.swift index 15c0bbc..34f4343 100644 --- a/Example/SnapSliderFilters/ViewController.swift +++ b/Example/SnapSliderFilters/ViewController.swift @@ -137,7 +137,7 @@ extension ViewController: SNSliderDataSource { extension ViewController: UIGestureRecognizerDelegate { - func handleTap() { + @objc func handleTap() { self.textField.handleTap() } } diff --git a/SnapSliderFilters/Classes/SNButton.swift b/SnapSliderFilters/Classes/SNButton.swift index 1b75f68..8edef18 100644 --- a/SnapSliderFilters/Classes/SNButton.swift +++ b/SnapSliderFilters/Classes/SNButton.swift @@ -114,16 +114,16 @@ open class SNButton: UIButton { self.action = actionClosure } - func buttonTouchUpInside() { + @objc func buttonTouchUpInside() { shouldRunAction=true buttonReleased() } - func buttonPressed() { + @objc func buttonPressed() { buttonState = .bigButton } - func buttonReleased() { + @objc func buttonReleased() { buttonState = .smallButton } } diff --git a/SnapSliderFilters/Classes/SNSlider.swift b/SnapSliderFilters/Classes/SNSlider.swift index ebd7e2a..77609b7 100644 --- a/SnapSliderFilters/Classes/SNSlider.swift +++ b/SnapSliderFilters/Classes/SNSlider.swift @@ -17,7 +17,8 @@ open class SNSlider: UIView { fileprivate let slideAxis: SlideAxis open weak var dataSource:SNSliderDataSource? - + open weak var delegate:SNSliderDelegate? + public init(frame: CGRect, slideAxis: SlideAxis = .horizontal) { self.slideAxis = slideAxis @@ -37,7 +38,7 @@ open class SNSlider: UIView { self.addSubview(self.slider) } - required public init?(coder aDecoder: NSCoder) { + convenience public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } @@ -146,6 +147,9 @@ extension SNSlider: UIScrollViewDelegate { self.slider.scrollRectToVisible(slideAxis.rect(at: 0, in: self), animated:false); } + delegate?.slider(self, + didSlideAtIndex: Int(scrollView.contentOffset.x / + slider.frame.width - 1)) case .vertical: if (scrollView.contentOffset.y == slideAxis.positionOfPage(at: -1, in: self)) { self.slider.scrollRectToVisible(slideAxis.rect(at: numberOfPages - 1, in: self), @@ -155,6 +159,9 @@ extension SNSlider: UIScrollViewDelegate { self.slider.scrollRectToVisible(slideAxis.rect(at: 0, in: self), animated:false); } + delegate?.slider(self, + didSlideAtIndex: Int(scrollView.contentOffset.y / + slider.frame.height - 1)) } } } diff --git a/SnapSliderFilters/Classes/SNSliderDelegate.swift b/SnapSliderFilters/Classes/SNSliderDelegate.swift new file mode 100644 index 0000000..53ecb3c --- /dev/null +++ b/SnapSliderFilters/Classes/SNSliderDelegate.swift @@ -0,0 +1,12 @@ +// +// SNSliderDelegate.swift +// Pods +// +// Created by Quentin Arnault on 18/11/2018. +// + +import Foundation + +public protocol SNSliderDelegate : class { + func slider(_ slider: SNSlider, didSlideAtIndex index: Int) +} diff --git a/SnapSliderFilters/Classes/SNTextField.swift b/SnapSliderFilters/Classes/SNTextField.swift index 7a501e4..2864532 100644 --- a/SnapSliderFilters/Classes/SNTextField.swift +++ b/SnapSliderFilters/Classes/SNTextField.swift @@ -88,7 +88,7 @@ extension SNTextField: UITextFieldDelegate { // Limit the text size to the screen width public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { let text:NSString = (self.text! as NSString).replacingCharacters(in: range, with: string) as NSString - let contentWidth = text.size(attributes: [NSFontAttributeName: UIFont.systemFont(ofSize: 16.0)]).width + let contentWidth = text.size(withAttributes: [NSAttributedStringKey.font: UIFont.systemFont(ofSize: 16.0)]).width return contentWidth <= (self.frame.width - 20) } @@ -113,7 +113,7 @@ extension SNTextField: UIGestureRecognizerDelegate { } } - func handlePan(_ recognizer:UIPanGestureRecognizer) { + @objc func handlePan(_ recognizer:UIPanGestureRecognizer) { if self.isFirstResponder == true { return }