diff --git a/TGPControls.podspec b/TGPControls.podspec index 8bbdb0e..dcc33fb 100644 --- a/TGPControls.podspec +++ b/TGPControls.podspec @@ -60,7 +60,9 @@ Pod::Spec.new do |s| # the deployment target. You can optionally include the target after the platform. # - s.platform = :ios, "9.3" + s.platform = :ios + s.ios.deployment_target = '8.0' + s.requires_arc = true # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # @@ -80,8 +82,33 @@ Pod::Spec.new do |s| # Not including the public_header_files will make all headers public. # - s.source_files = "TGPControls", "TGPControls/**/*.swift" + s.source_files = "TGPControls/**/*.{swift}" s.exclude_files = "TGPControlsDemo7/*", "TGPControlsDemo/*" + # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Link your library with frameworks, or libraries. Libraries do not include + # the lib prefix of their name. + # + + s.framework = "UIKit" + # s.framework = "SomeFramework" + # s.frameworks = "SomeFramework", "AnotherFramework" + + # s.library = "iconv" + # s.libraries = "iconv", "xml2" + + + # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If your library depends on compiler flags you can set them in the xcconfig hash + # where they will only apply to your library. If you depend on other Podspecs + # you can include multiple dependencies to ensure it works. + + # s.requires_arc = true + + # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } + # s.dependency "JSONKit", "~> 1.4" + end diff --git a/TGPControls.xcodeproj/project.pbxproj b/TGPControls.xcodeproj/project.pbxproj index 72835c9..3656d1d 100644 --- a/TGPControls.xcodeproj/project.pbxproj +++ b/TGPControls.xcodeproj/project.pbxproj @@ -7,129 +7,82 @@ objects = { /* Begin PBXBuildFile section */ - DC101D661A75749600ECCF80 /* libTGPControls.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DC101D5A1A75749600ECCF80 /* libTGPControls.a */; }; + DC56BE021E46EA2000AAD0D9 /* TGPControls.h in Headers */ = {isa = PBXBuildFile; fileRef = DC56BE001E46EA2000AAD0D9 /* TGPControls.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DC88CC4E1E46EAD10076AC65 /* TGPCamelLabels.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC88CC4B1E46EAD10076AC65 /* TGPCamelLabels.swift */; }; + DC88CC4F1E46EAD10076AC65 /* TGPControlsTicksProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC88CC4C1E46EAD10076AC65 /* TGPControlsTicksProtocol.swift */; }; + DC88CC501E46EAD10076AC65 /* TGPDiscreteSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC88CC4D1E46EAD10076AC65 /* TGPDiscreteSlider.swift */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - DC101D671A75749600ECCF80 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = DC101D521A75749600ECCF80 /* Project object */; - proxyType = 1; - remoteGlobalIDString = DC101D591A75749600ECCF80; - remoteInfo = TGPControls; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - DC101D581A75749600ECCF80 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "include/$(PRODUCT_NAME)"; - dstSubfolderSpec = 16; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ - DC0468DF1A75962E0084DE3E /* TGPCamelLabels7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGPCamelLabels7.h; sourceTree = ""; }; - DC0468E01A75962E0084DE3E /* TGPCamelLabels7.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGPCamelLabels7.m; sourceTree = ""; }; - DC0468E11A75962E0084DE3E /* TGPDiscreteSlider7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGPDiscreteSlider7.h; sourceTree = ""; }; - DC0468E21A75962E0084DE3E /* TGPDiscreteSlider7.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGPDiscreteSlider7.m; sourceTree = ""; }; - DC0468E51A7596690084DE3E /* TGPCamelLabels.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGPCamelLabels.h; sourceTree = ""; }; - DC0468E61A7596690084DE3E /* TGPCamelLabels.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGPCamelLabels.m; sourceTree = ""; }; - DC0468E81A7596930084DE3E /* TGPDiscreteSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGPDiscreteSlider.h; sourceTree = ""; }; - DC0468E91A7596930084DE3E /* TGPDiscreteSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGPDiscreteSlider.m; sourceTree = ""; }; - DC101D5A1A75749600ECCF80 /* libTGPControls.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTGPControls.a; sourceTree = BUILT_PRODUCTS_DIR; }; - DC101D651A75749600ECCF80 /* TGPControlsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TGPControlsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - DC101D6B1A75749600ECCF80 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DC101D7A1A75756300ECCF80 /* TGPControls_License.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = TGPControls_License.txt; sourceTree = ""; }; - DC101D7B1A75756300ECCF80 /* TGPControls.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = TGPControls.podspec; sourceTree = ""; }; - DC28A54D1A947704003C9405 /* TGPControlsTicksProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGPControlsTicksProtocol.h; sourceTree = ""; }; + DC56BDFD1E46EA2000AAD0D9 /* TGPControls.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TGPControls.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DC56BE001E46EA2000AAD0D9 /* TGPControls.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TGPControls.h; sourceTree = ""; }; + DC56BE011E46EA2000AAD0D9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DC88CC4B1E46EAD10076AC65 /* TGPCamelLabels.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TGPCamelLabels.swift; sourceTree = ""; }; + DC88CC4C1E46EAD10076AC65 /* TGPControlsTicksProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TGPControlsTicksProtocol.swift; sourceTree = ""; }; + DC88CC4D1E46EAD10076AC65 /* TGPDiscreteSlider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TGPDiscreteSlider.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - DC101D571A75749600ECCF80 /* Frameworks */ = { + DC56BDF91E46EA2000AAD0D9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - DC101D621A75749600ECCF80 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DC101D661A75749600ECCF80 /* libTGPControls.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - DC0468DE1A75962E0084DE3E /* TGPControls */ = { + DC56BDF31E46EA2000AAD0D9 = { isa = PBXGroup; children = ( - DC0468E51A7596690084DE3E /* TGPCamelLabels.h */, - DC0468E61A7596690084DE3E /* TGPCamelLabels.m */, - DC28A54D1A947704003C9405 /* TGPControlsTicksProtocol.h */, - DC0468E81A7596930084DE3E /* TGPDiscreteSlider.h */, - DC0468E91A7596930084DE3E /* TGPDiscreteSlider.m */, - DC0468DF1A75962E0084DE3E /* TGPCamelLabels7.h */, - DC0468E01A75962E0084DE3E /* TGPCamelLabels7.m */, - DC0468E11A75962E0084DE3E /* TGPDiscreteSlider7.h */, - DC0468E21A75962E0084DE3E /* TGPDiscreteSlider7.m */, - ); - path = TGPControls; - sourceTree = ""; - }; - DC101D511A75749600ECCF80 = { - isa = PBXGroup; - children = ( - DC101D7A1A75756300ECCF80 /* TGPControls_License.txt */, - DC101D7B1A75756300ECCF80 /* TGPControls.podspec */, - DC0468DE1A75962E0084DE3E /* TGPControls */, - DC101D691A75749600ECCF80 /* TGPControlsTests */, - DC101D5B1A75749600ECCF80 /* Products */, + DC56BDFF1E46EA2000AAD0D9 /* TGPControls */, + DC56BDFE1E46EA2000AAD0D9 /* Products */, ); sourceTree = ""; }; - DC101D5B1A75749600ECCF80 /* Products */ = { + DC56BDFE1E46EA2000AAD0D9 /* Products */ = { isa = PBXGroup; children = ( - DC101D5A1A75749600ECCF80 /* libTGPControls.a */, - DC101D651A75749600ECCF80 /* TGPControlsTests.xctest */, + DC56BDFD1E46EA2000AAD0D9 /* TGPControls.framework */, ); name = Products; sourceTree = ""; }; - DC101D691A75749600ECCF80 /* TGPControlsTests */ = { + DC56BDFF1E46EA2000AAD0D9 /* TGPControls */ = { isa = PBXGroup; children = ( - DC101D6A1A75749600ECCF80 /* Supporting Files */, + DC56BE001E46EA2000AAD0D9 /* TGPControls.h */, + DC88CC4B1E46EAD10076AC65 /* TGPCamelLabels.swift */, + DC88CC4C1E46EAD10076AC65 /* TGPControlsTicksProtocol.swift */, + DC88CC4D1E46EAD10076AC65 /* TGPDiscreteSlider.swift */, + DC56BE011E46EA2000AAD0D9 /* Info.plist */, ); - path = TGPControlsTests; - sourceTree = ""; - }; - DC101D6A1A75749600ECCF80 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - DC101D6B1A75749600ECCF80 /* Info.plist */, - ); - name = "Supporting Files"; + path = TGPControls; sourceTree = ""; }; /* End PBXGroup section */ +/* Begin PBXHeadersBuildPhase section */ + DC56BDFA1E46EA2000AAD0D9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + DC56BE021E46EA2000AAD0D9 /* TGPControls.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + /* Begin PBXNativeTarget section */ - DC101D591A75749600ECCF80 /* TGPControls */ = { + DC56BDFC1E46EA2000AAD0D9 /* TGPControls */ = { isa = PBXNativeTarget; - buildConfigurationList = DC101D6E1A75749600ECCF80 /* Build configuration list for PBXNativeTarget "TGPControls" */; + buildConfigurationList = DC56BE051E46EA2000AAD0D9 /* Build configuration list for PBXNativeTarget "TGPControls" */; buildPhases = ( - DC101D561A75749600ECCF80 /* Sources */, - DC101D571A75749600ECCF80 /* Frameworks */, - DC101D581A75749600ECCF80 /* CopyFiles */, + DC56BDF81E46EA2000AAD0D9 /* Sources */, + DC56BDF91E46EA2000AAD0D9 /* Frameworks */, + DC56BDFA1E46EA2000AAD0D9 /* Headers */, + DC56BDFB1E46EA2000AAD0D9 /* Resources */, ); buildRules = ( ); @@ -137,64 +90,45 @@ ); name = TGPControls; productName = TGPControls; - productReference = DC101D5A1A75749600ECCF80 /* libTGPControls.a */; - productType = "com.apple.product-type.library.static"; - }; - DC101D641A75749600ECCF80 /* TGPControlsTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = DC101D711A75749600ECCF80 /* Build configuration list for PBXNativeTarget "TGPControlsTests" */; - buildPhases = ( - DC101D611A75749600ECCF80 /* Sources */, - DC101D621A75749600ECCF80 /* Frameworks */, - DC101D631A75749600ECCF80 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - DC101D681A75749600ECCF80 /* PBXTargetDependency */, - ); - name = TGPControlsTests; - productName = TGPControlsTests; - productReference = DC101D651A75749600ECCF80 /* TGPControlsTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; + productReference = DC56BDFD1E46EA2000AAD0D9 /* TGPControls.framework */; + productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - DC101D521A75749600ECCF80 /* Project object */ = { + DC56BDF41E46EA2000AAD0D9 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0610; - ORGANIZATIONNAME = arquebuse; + LastUpgradeCheck = 0820; + ORGANIZATIONNAME = SwiftArchitect; TargetAttributes = { - DC101D591A75749600ECCF80 = { - CreatedOnToolsVersion = 6.1.1; - }; - DC101D641A75749600ECCF80 = { - CreatedOnToolsVersion = 6.1.1; + DC56BDFC1E46EA2000AAD0D9 = { + CreatedOnToolsVersion = 8.2.1; + DevelopmentTeam = 55K7THBUV8; + LastSwiftMigration = 0820; + ProvisioningStyle = Automatic; }; }; }; - buildConfigurationList = DC101D551A75749600ECCF80 /* Build configuration list for PBXProject "TGPControls" */; + buildConfigurationList = DC56BDF71E46EA2000AAD0D9 /* Build configuration list for PBXProject "TGPControls" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = DC101D511A75749600ECCF80; - productRefGroup = DC101D5B1A75749600ECCF80 /* Products */; + mainGroup = DC56BDF31E46EA2000AAD0D9; + productRefGroup = DC56BDFE1E46EA2000AAD0D9 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - DC101D591A75749600ECCF80 /* TGPControls */, - DC101D641A75749600ECCF80 /* TGPControlsTests */, + DC56BDFC1E46EA2000AAD0D9 /* TGPControls */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - DC101D631A75749600ECCF80 /* Resources */ = { + DC56BDFB1E46EA2000AAD0D9 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -204,35 +138,24 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - DC101D561A75749600ECCF80 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DC101D611A75749600ECCF80 /* Sources */ = { + DC56BDF81E46EA2000AAD0D9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + DC88CC501E46EAD10076AC65 /* TGPDiscreteSlider.swift in Sources */, + DC88CC4F1E46EAD10076AC65 /* TGPControlsTicksProtocol.swift in Sources */, + DC88CC4E1E46EAD10076AC65 /* TGPCamelLabels.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - DC101D681A75749600ECCF80 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = DC101D591A75749600ECCF80 /* TGPControls */; - targetProxy = DC101D671A75749600ECCF80 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ - DC101D6C1A75749600ECCF80 /* Debug */ = { + DC56BE031E46EA2000AAD0D9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -240,39 +163,52 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; 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", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Debug; }; - DC101D6D1A75749600ECCF80 /* Release */ = { + DC56BE041E46EA2000AAD0D9 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -280,110 +216,105 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Release; }; - DC101D6F1A75749600ECCF80 /* Debug */ = { + DC56BE061E46EA2000AAD0D9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - OTHER_LDFLAGS = "-ObjC"; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 55K7THBUV8; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = TGPControls/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swiftarchitect.TGPControls; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; }; name = Debug; }; - DC101D701A75749600ECCF80 /* Release */ = { + DC56BE071E46EA2000AAD0D9 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - OTHER_LDFLAGS = "-ObjC"; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 55K7THBUV8; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = TGPControls/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swiftarchitect.TGPControls; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - }; - name = Release; - }; - DC101D721A75749600ECCF80 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = TGPControlsTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - DC101D731A75749600ECCF80 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - INFOPLIST_FILE = TGPControlsTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - DC101D551A75749600ECCF80 /* Build configuration list for PBXProject "TGPControls" */ = { + DC56BDF71E46EA2000AAD0D9 /* Build configuration list for PBXProject "TGPControls" */ = { isa = XCConfigurationList; buildConfigurations = ( - DC101D6C1A75749600ECCF80 /* Debug */, - DC101D6D1A75749600ECCF80 /* Release */, + DC56BE031E46EA2000AAD0D9 /* Debug */, + DC56BE041E46EA2000AAD0D9 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - DC101D6E1A75749600ECCF80 /* Build configuration list for PBXNativeTarget "TGPControls" */ = { + DC56BE051E46EA2000AAD0D9 /* Build configuration list for PBXNativeTarget "TGPControls" */ = { isa = XCConfigurationList; buildConfigurations = ( - DC101D6F1A75749600ECCF80 /* Debug */, - DC101D701A75749600ECCF80 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DC101D711A75749600ECCF80 /* Build configuration list for PBXNativeTarget "TGPControlsTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DC101D721A75749600ECCF80 /* Debug */, - DC101D731A75749600ECCF80 /* Release */, + DC56BE061E46EA2000AAD0D9 /* Debug */, + DC56BE071E46EA2000AAD0D9 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = DC101D521A75749600ECCF80 /* Project object */; + rootObject = DC56BDF41E46EA2000AAD0D9 /* Project object */; } diff --git a/TGPControls.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TGPControls.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 535f81b..0000000 --- a/TGPControls.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/TGPControlsTests/Info.plist b/TGPControls/Info.plist similarity index 75% rename from TGPControlsTests/Info.plist rename to TGPControls/Info.plist index f794cd2..1c6f0bd 100644 --- a/TGPControlsTests/Info.plist +++ b/TGPControls/Info.plist @@ -7,18 +7,18 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.thegothicparty.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType - BNDL + FMWK CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? + 3.0 CFBundleVersion - 1 + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + diff --git a/TGPControls/TGPCamelLabels.swift b/TGPControls/TGPCamelLabels.swift new file mode 100644 index 0000000..3276e37 --- /dev/null +++ b/TGPControls/TGPCamelLabels.swift @@ -0,0 +1,342 @@ +// @file: TGPCamelLabels.swift +// @project: TGPControls +// +// @author: Xavier Schott +// mailto://xschott@gmail.com +// http://thegothicparty.com +// tel://+18089383634 +// +// @license: http://opensource.org/licenses/MIT +// Copyright (c) 2017, Xavier Schott +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import UIKit + +@IBDesignable +public class TGPCamelLabels: UIControl { + + // Only used if labels.count < 1 + @IBInspectable public var tickCount:Int { + get { + return names.count + } + set { + // Put some order to tickCount: 1 >= count >= 128 + let count = max(1, min(newValue, 128)) + debugNames(count: count) + layoutTrack() + } + } + + @IBInspectable public var ticksDistance:CGFloat = 44.0 { + didSet { + ticksDistance = max(0, ticksDistance) + layoutTrack() + } + } + + @IBInspectable public var value:UInt = 0 { + didSet { + dockEffect(duration: animationDuration) + } + } + + @IBInspectable public var upFontName:String? = nil { + didSet { + layoutTrack() + } + } + + @IBInspectable public var upFontSize:CGFloat = 12 { + didSet { + layoutTrack() + } + } + + @IBInspectable public var upFontColor:UIColor? = nil { + didSet { + layoutTrack() + } + } + + @IBInspectable public var downFontName:String? = nil { + didSet { + layoutTrack() + } + } + + @IBInspectable public var downFontSize:CGFloat = 12 { + didSet { + layoutTrack() + } + } + + @IBInspectable public var downFontColor:UIColor? = nil { + didSet { + layoutTrack() + } + } + + // Label off-center to the left and right of the slider + // expressed in label width. 0: none, -1/2: half outside, 1/2; half inside + @IBInspectable public var offCenter:CGFloat = 0 { + didSet { + layoutTrack() + } + } + + // Label margins to the left and right of the slider + @IBInspectable public var insets:NSInteger = 0 { + didSet { + layoutTrack() + } + } + + public var names:[String] = [] { // Will dictate the number of ticks + didSet { + assert(names.count > 0) + layoutTrack() + } + } + + // When bounds change, recalculate layout + override public var bounds: CGRect { + didSet { + layoutTrack() + setNeedsDisplay() + } + } + + public var animationDuration:TimeInterval = 0.15 + + // Fishy + var animate = true + + // Private + var lastValue = NSNotFound + var upLabels:[UILabel] = [] + var dnLabels:[UILabel] = [] + + // MARK: UIView + + required public init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + initProperties() + } + + override init(frame: CGRect) { + super.init(frame: frame) + initProperties() + } + + // clickthrough + public override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { + for view in subviews { + if !view.isHidden && + view.alpha > 0.0 && + view.isUserInteractionEnabled && + view.point(inside: convert(point, to: view), with: event) { + return true + } + } + return false + } + + // MARK: TGPCamelLabels + + func initProperties() { + debugNames(count: 10) + layoutTrack() + } + + func debugNames(count:Int) { + // Dynamic property, will create an array with labels, generally for debugging purposes + var array:[String] = [] + for iterate in 1...count { + array.append("\(iterate)") + } + names = array + } + + func layoutTrack() { + + func insetLabel(_ label:UILabel?, withInset inset:NSInteger, andMultiplier multiplier:CGFloat) { + assert(label != nil) + if let label = label { + label.frame = { + var frame = label.frame + frame.origin.x += frame.size.width * multiplier + frame.origin.x += CGFloat(inset) + return frame + }() + } + } + + for label in upLabels { + label.removeFromSuperview() + } + upLabels = [] + for label in dnLabels { + label.removeFromSuperview() + } + dnLabels = [] + + let count = names.count + if count > 0 { + var centerX = (bounds.width - (CGFloat(count - 1) * ticksDistance))/2.0 + let centerY = bounds.height / 2.0 + for name in names { + let upLabel = UILabel.init() + upLabels.append(upLabel) + upLabel.text = name + if let upFontName = upFontName { + upLabel.font = UIFont.init(name: upFontName, size: upFontSize) + } else { + upLabel.font = UIFont.boldSystemFont(ofSize: upFontSize) + } + if let textColor = upFontColor ?? tintColor { + upLabel.textColor = textColor + } + upLabel.sizeToFit() + upLabel.center = CGPoint(x: centerX, y: centerY) + + upLabel.frame = { + var frame = upLabel.frame + frame.origin.y = bounds.height - frame.height + return frame + }() + + upLabel.alpha = 0.0 + addSubview(upLabel) + + let dnLabel = UILabel.init() + dnLabels.append(dnLabel) + dnLabel.text = name + if let downFontName = downFontName { + dnLabel.font = UIFont.init(name:downFontName, size:downFontSize) + } else { + dnLabel.font = UIFont.boldSystemFont(ofSize: downFontSize) + } + dnLabel.textColor = downFontColor ?? UIColor.gray + dnLabel.sizeToFit() + dnLabel.center = CGPoint(x:centerX, y:centerY) + dnLabel.frame = { + var frame = dnLabel.frame + frame.origin.y = bounds.height - frame.height + return frame + }() + addSubview(dnLabel) + + centerX += ticksDistance + } + + // Fix left and right label, if there are at least 2 labels + if names.count > 1 { + insetLabel(upLabels.first, withInset: insets, andMultiplier: offCenter) + insetLabel(upLabels.last, withInset: -insets, andMultiplier: -offCenter) + insetLabel(dnLabels.first, withInset: insets, andMultiplier: offCenter) + insetLabel(dnLabels.last, withInset: -insets, andMultiplier: -offCenter) + } + + dockEffect(duration:0.0) + } + } + + + func dockEffect(duration:TimeInterval) + { + let up = Int(value) + + // Unlike the National Parks from which it is inspired, this Dock Effect + // does not abruptly change from BOLD to plain. Instead, we have 2 sets of + // labels, which are faded back and forth, in unisson. + // - BOLD to plain + // - Black to gray + // - high to low + // Each animation picks up where the previous left off + let moveBlock:() -> Void = { + let x = self.upLabels + // Bring almost all down + for (idx, label) in self.upLabels.enumerated() { + if up != idx { + self.moveDown(aView: label, withAlpha: 0) + } + } + for (idx, label) in self.dnLabels.enumerated() { + if up != idx { + self.moveDown(aView: label, withAlpha: 1) + } + } + + // Bring the selection up + if up < self.upLabels.count { + self.moveUp(aView: self.upLabels[up], withAlpha:1) + } + if up < self.dnLabels.count { + self.moveUp(aView: self.dnLabels[up], withAlpha:0) + } + } + + if duration > 0 { + UIView.animate(withDuration: duration, + delay: 0, + options: [.beginFromCurrentState, .curveLinear], + animations: moveBlock, + completion: nil) + } else { + moveBlock() + } + } + + func moveDown(aView:UIView, withAlpha alpha:CGFloat) + { + if animate { + aView.frame = { + var frame = aView.frame + frame.origin.y = bounds.height - frame.height + return frame + }() + } + aView.alpha = alpha + } + + func moveUp(aView:UIView, withAlpha alpha:CGFloat) + { + if animate { + aView.frame = { + var frame = aView.frame + frame.origin.y = 0 + return frame + }() + } + aView.alpha = alpha + } + +} + +extension TGPCamelLabels : TGPControlsTicksProtocol { + public func tgpTicksDistanceChanged(ticksDistance: CGFloat, sender: AnyObject) { + self.ticksDistance = ticksDistance + } + + public func tgpValueChanged(value: UInt) { + self.value = value + } +} diff --git a/TGPControlsDemo7/TGPControlsDemo7/AppDelegate.h b/TGPControls/TGPControls.h similarity index 75% rename from TGPControlsDemo7/TGPControlsDemo7/AppDelegate.h rename to TGPControls/TGPControls.h index 223af7a..98aa9ae 100644 --- a/TGPControlsDemo7/TGPControlsDemo7/AppDelegate.h +++ b/TGPControls/TGPControls.h @@ -1,14 +1,13 @@ -// @file: AppDelegate.h -// @project: TGPControlsDemo7 (TGPControls) +// @file: TGPControls.h +// @project: TGPControls // -// @history: Created November 27, 2014 (Thanksgiving Day) // @author: Xavier Schott // mailto://xschott@gmail.com // http://thegothicparty.com // tel://+18089383634 // // @license: http://opensource.org/licenses/MIT -// Copyright (c) 2014, Xavier Schott +// Copyright (c) 2017, Xavier Schott // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -30,10 +29,12 @@ #import -@interface AppDelegate : UIResponder +//! Project version number for TGPControls. +FOUNDATION_EXPORT double TGPControlsVersionNumber; -@property (strong, nonatomic) UIWindow *window; +//! Project version string for TGPControls. +FOUNDATION_EXPORT const unsigned char TGPControlsVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import -@end - diff --git a/TGPControlsDemo7/TGPControlsDemo7/ViewController.h b/TGPControls/TGPControlsTicksProtocol.swift similarity index 82% rename from TGPControlsDemo7/TGPControlsDemo7/ViewController.h rename to TGPControls/TGPControlsTicksProtocol.swift index abc9321..6805ef7 100644 --- a/TGPControlsDemo7/TGPControlsDemo7/ViewController.h +++ b/TGPControls/TGPControlsTicksProtocol.swift @@ -1,14 +1,13 @@ -// @file: ViewController.h -// @project: TGPControlsDemo7 (TGPControls) +// @file: TGPControlsTicksProtocol.swift +// @project: TGPControls // -// @history: Created November 27, 2014 (Thanksgiving Day) // @author: Xavier Schott // mailto://xschott@gmail.com // http://thegothicparty.com // tel://+18089383634 // // @license: http://opensource.org/licenses/MIT -// Copyright (c) 2014, Xavier Schott +// Copyright (c) 2017, Xavier Schott // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -28,10 +27,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import - -@interface ViewController : UIViewController - - -@end +import Foundation +public protocol TGPControlsTicksProtocol +{ + func tgpTicksDistanceChanged(ticksDistance:CGFloat, sender:AnyObject) + func tgpValueChanged(value:UInt) +} diff --git a/TGPControls/TGPDiscreteSlider.swift b/TGPControls/TGPDiscreteSlider.swift new file mode 100644 index 0000000..f0f0a20 --- /dev/null +++ b/TGPControls/TGPDiscreteSlider.swift @@ -0,0 +1,742 @@ +// @file: TGPDiscreteSlider.swift +// @project: TGPControls +// +// @author: Xavier Schott +// mailto://xschott@gmail.com +// http://thegothicparty.com +// tel://+18089383634 +// +// @license: http://opensource.org/licenses/MIT +// Copyright (c) 2017, Xavier Schott +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import UIKit + +public enum ComponentStyle:Int { + case iOS = 0 + case rectangular + case rounded + case invisible + case image +} + + +// Interface builder hides the IBInspectable for UIControl +#if TARGET_INTERFACE_BUILDER +public class TGPSlider_INTERFACE_BUILDER:UIView { + } +#else // !TARGET_INTERFACE_BUILDER + public class TGPSlider_INTERFACE_BUILDER:UIControl { + } +#endif // TARGET_INTERFACE_BUILDER + +@IBDesignable +public class TGPDiscreteSlider:TGPSlider_INTERFACE_BUILDER { + + @IBInspectable public var tickStyle:Int = ComponentStyle.rectangular.rawValue { + didSet { + layoutTrack() + } + } + + @IBInspectable public var tickSize:CGSize = CGSize(width:1, height:4) { + didSet { + tickSize.width = max(0, tickSize.width) + tickSize.height = max(0, tickSize.height) + layoutTrack() + } + } + + @IBInspectable public var tickCount:Int = 11 { + didSet { + tickCount = max(2, tickCount) + layoutTrack() + } + } + + @IBInspectable public var tickImage:String? = nil { + didSet { + layoutTrack() + } + } + + @IBInspectable public var trackStyle:Int = ComponentStyle.iOS.rawValue { + didSet { + layoutTrack() + } + } + + @IBInspectable public var trackThickness:CGFloat = 2 { + didSet { + trackThickness = max(0, trackThickness) + layoutTrack() + } + } + + @IBInspectable public var trackImage:String? = nil { + didSet { + layoutTrack() + } + } + + @IBInspectable public var minimumTrackTintColor:UIColor? = nil { + didSet { + layoutTrack() + } + } + + @IBInspectable public var maximumTrackTintColor:UIColor = UIColor(white: 0.71, alpha: 1) { + didSet { + layoutTrack() + } + } + + @IBInspectable public var thumbStyle:Int = ComponentStyle.iOS.rawValue { + didSet { + layoutTrack() + } + } + + @IBInspectable public var thumbSize:CGSize = CGSize(width:10, height:10) { + didSet { + thumbSize.width = max(1, thumbSize.width) + thumbSize.height = max(1, thumbSize.height) + layoutTrack() + } + } + + @IBInspectable public var thumbTintColor:UIColor? = nil { + didSet { + layoutTrack() + } + } + + @IBInspectable public var thumbImage:String? = nil { + didSet { + // Associate image to layer NSBundle.bundleForClass(class) + if let imageName = thumbImage, + let image = UIImage(named: imageName) { + thumbLayer.contents = image.cgImage + } + + layoutTrack() + } + } + + @IBInspectable public var thumbShadowRadius:CGFloat = 0 { + didSet { + layoutTrack() + } + } + + @IBInspectable public var thumbShadowOffset:CGSize = CGSize.zero { + didSet { + layoutTrack() + } + } + + @IBInspectable public var incrementValue:Int = 1 { + didSet { + if(0 == incrementValue) { + incrementValue = 1; // nonZeroIncrement + } + layoutTrack() + } + } + + // MARK: UISlider substitution + // AKA: UISlider value (as CGFloat for compatibility with UISlider API, but expected to contain integers) + + @IBInspectable public var minimumValue:CGFloat { + get { + return CGFloat(intMinimumValue) + } + set { + intMinimumValue = Int(newValue) + layoutTrack() + } + } + + @IBInspectable public var value:CGFloat { + get { + return CGFloat(intValue) + } + set { + intValue = Int(newValue) + layoutTrack() + } + } + + // MARK: @IBInspectable adapters + + public var tickComponentStyle:ComponentStyle { + get { + return ComponentStyle(rawValue: tickStyle) ?? .rectangular + } + set { + tickStyle = newValue.rawValue + } + } + + public var trackComponentStyle:ComponentStyle { + get { + return ComponentStyle(rawValue: trackStyle) ?? .iOS + } + set { + trackStyle = newValue.rawValue + } + } + + public var thumbComponentStyle:ComponentStyle { + get { + return ComponentStyle(rawValue: thumbStyle) ?? .iOS + } + set { + thumbStyle = newValue.rawValue + } + } + + // MARK: Properties + + public override var tintColor: UIColor! { + didSet { + layoutTrack() + } + } + + public override var bounds: CGRect { + didSet { + layoutTrack() + } + } + + public var ticksDistance:CGFloat { + get { + assert(tickCount > 1, "2 ticks minimum \(tickCount)") + let segments = CGFloat(max(1, self.tickCount - 1)) + return trackRectangle.width / segments + } + set {} + } + + public var ticksListener:TGPControlsTicksProtocol? = nil { + didSet { + ticksListener?.tgpTicksDistanceChanged(ticksDistance: ticksDistance, + sender: self) + } + } + + var intValue:Int = 0 + var intMinimumValue = -5 + + var ticksAbscisses:[CGPoint] = [] + var thumbAbscisse:CGFloat = 0 + var thumbLayer = CALayer() + var leftTrackLayer = CALayer() + var rightTrackLayer = CALayer() + var trackLayer = CALayer() + var ticksLayer = CALayer() + var trackRectangle = CGRect.zero + var touchedInside = false + + let iOSThumbShadowRadius:CGFloat = 4 + let iOSThumbShadowOffset = CGSize(width:0, height:3) + + // MARK: UIControl + + required public init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + initProperties() + } + + override init(frame: CGRect) { + super.init(frame: frame) + initProperties() + } + + public override func draw(_ rect: CGRect) { + drawTrack() + drawTicks() + drawThumb() + } + + func sendActionsForControlEvents() { + // Automatic UIControlEventValueChanged notification + if let ticksListener = ticksListener { + ticksListener.tgpValueChanged(value: UInt(value)) + } + } + + // MARK: TGPDiscreteSlider + + func initProperties() { + // Track is a clear clipping layer, and left + right sublayers, which brings in free animation + trackLayer.masksToBounds = true + trackLayer.backgroundColor = UIColor.clear.cgColor + layer.addSublayer(trackLayer) + if let backgroundColor = tintColor { + leftTrackLayer.backgroundColor = backgroundColor.cgColor + } + trackLayer.addSublayer(leftTrackLayer) + rightTrackLayer.backgroundColor = maximumTrackTintColor.cgColor + trackLayer.addSublayer(rightTrackLayer) + + // Ticks in between track and thumb + layer.addSublayer(ticksLayer) + + // The thumb is its own CALayer, which brings in free animation + layer.addSublayer(thumbLayer) + + isMultipleTouchEnabled = false + layoutTrack() + } + + func drawTicks() { + ticksLayer.frame = bounds + if let backgroundColor = tintColor { + ticksLayer.backgroundColor = backgroundColor.cgColor + } + + let path = UIBezierPath() + + switch tickComponentStyle { + case .rounded: + fallthrough + + case .rectangular: + fallthrough + + case .image: + for originPoint in ticksAbscisses { + let rectangle = CGRect(x: originPoint.x-(tickSize.width/2), + y: originPoint.y-(tickSize.height/2), + width: tickSize.width, + height: tickSize.height) + switch tickComponentStyle { + case .rounded: + path.append(UIBezierPath(roundedRect: rectangle, + cornerRadius: rectangle.height/2)) + + case .rectangular: + path.append(UIBezierPath(rect: rectangle)) + + case .image: + // Draw image if exists + if let tickImage = tickImage, + let image = UIImage(named: tickImage), + let cgImage = image.cgImage, + let ctx = UIGraphicsGetCurrentContext() { + let centered = CGRect(x: rectangle.origin.x + (rectangle.width/2) - (image.size.width/2), + y: rectangle.origin.y + (rectangle.height/2) - (image.size.height/2), + width: image.size.width, + height: image.size.height) + ctx.draw(cgImage, in: centered) + } + + case .invisible: + fallthrough + + case .iOS: + fallthrough + + default: + assert(false) + break + } + } + + case .invisible: + fallthrough + + case .iOS: + fallthrough + + default: + // Nothing to draw + break + } + + let maskLayer = CAShapeLayer() + maskLayer.frame = trackLayer.bounds + maskLayer.path = path.cgPath + ticksLayer.mask = maskLayer + } + + func drawTrack() { + switch(trackComponentStyle) { + case .rectangular: + trackLayer.frame = trackRectangle + trackLayer.cornerRadius = 0.0 + + case .invisible: + trackLayer.frame = CGRect.zero + + case .image: + trackLayer.frame = CGRect.zero + + // Draw image if exists + if let trackImage = trackImage, + let image = UIImage(named: trackImage), + let cgImage = image.cgImage, + let ctx = UIGraphicsGetCurrentContext() { + let centered = CGRect(x: (frame.width/2) - (image.size.width/2), + y: (frame.height/2) - (image.size.height/2), + width: image.size.width, + height: image.size.height) + ctx.draw(cgImage, in: centered) + } + + case .rounded: + fallthrough + + case .iOS: + fallthrough + + default: + trackLayer.frame = trackRectangle + trackLayer.cornerRadius = trackRectangle.height/2 + break + } + + leftTrackLayer.frame = { + var frame = trackLayer.bounds + frame.size.width = thumbAbscisse - trackRectangle.minX + return frame + }() + + if let backgroundColor = minimumTrackTintColor ?? tintColor { + leftTrackLayer.backgroundColor = backgroundColor.cgColor + } + + rightTrackLayer.frame = { + var frame = trackLayer.bounds + frame.size.width = trackRectangle.width - leftTrackLayer.frame.width + frame.origin.x = leftTrackLayer.frame.maxX + return frame + }() + rightTrackLayer.backgroundColor = maximumTrackTintColor.cgColor + } + + func drawThumb() { + if( value >= minimumValue) { // Feature: hide the thumb when below range + + let thumbSizeForStyle = thumbSizeIncludingShadow() + let thumbWidth = thumbSizeForStyle.width + let thumbHeight = thumbSizeForStyle.height + let rectangle = CGRect(x:thumbAbscisse - (thumbWidth / 2), + y: (frame.height - thumbHeight)/2, + width: thumbWidth, + height: thumbHeight) + + let shadowRadius = (thumbComponentStyle == .iOS) ? iOSThumbShadowRadius : thumbShadowRadius + let shadowOffset = (thumbComponentStyle == .iOS) ? iOSThumbShadowOffset : thumbShadowOffset + + thumbLayer.frame = ((shadowRadius != 0.0) // Ignore offset if there is no shadow + ? rectangle.insetBy(dx: shadowRadius + shadowOffset.width, + dy: shadowRadius + shadowOffset.height) + : rectangle.insetBy(dx: shadowRadius, + dy: shadowRadius)) + + switch thumbComponentStyle { + case .rounded: // A rounded thumb is circular + thumbLayer.backgroundColor = (thumbTintColor ?? UIColor.lightGray).cgColor + thumbLayer.borderColor = UIColor.clear.cgColor + thumbLayer.borderWidth = 0.0 + thumbLayer.cornerRadius = thumbLayer.frame.width/2 + thumbLayer.allowsEdgeAntialiasing = true + + case .image: + // image is set using layer.contents + thumbLayer.backgroundColor = UIColor.clear.cgColor + thumbLayer.borderColor = UIColor.clear.cgColor + thumbLayer.borderWidth = 0.0 + thumbLayer.cornerRadius = 0.0 + thumbLayer.allowsEdgeAntialiasing = false + + case .rectangular: + thumbLayer.backgroundColor = (thumbTintColor ?? UIColor.lightGray).cgColor + thumbLayer.borderColor = UIColor.clear.cgColor + thumbLayer.borderWidth = 0.0 + thumbLayer.cornerRadius = 0.0 + thumbLayer.allowsEdgeAntialiasing = false + + case .invisible: + thumbLayer.backgroundColor = UIColor.clear.cgColor + thumbLayer.cornerRadius = 0.0 + + case .iOS: + fallthrough + + default: + thumbLayer.backgroundColor = (thumbTintColor ?? UIColor.white).cgColor + + // Only default iOS thumb has a border + if nil == thumbTintColor { + let borderColor = UIColor(white:0.5, alpha: 1) + thumbLayer.borderColor = borderColor.cgColor + thumbLayer.borderWidth = 0.25 + } else { + thumbLayer.borderWidth = 0 + } + thumbLayer.cornerRadius = thumbLayer.frame.width/2 + thumbLayer.allowsEdgeAntialiasing = true + break + } + + // Shadow + if(shadowRadius != 0.0) { + #if TARGET_INTERFACE_BUILDER + thumbLayer.shadowOffset = CGSize(width: shadowOffset.width, + height: -shadowOffset.height) + #else // !TARGET_INTERFACE_BUILDER + thumbLayer.shadowOffset = shadowOffset + #endif // TARGET_INTERFACE_BUILDER + + thumbLayer.shadowRadius = shadowRadius + thumbLayer.shadowColor = UIColor.black.cgColor + thumbLayer.shadowOpacity = 0.15 + } else { + thumbLayer.shadowRadius = 0.0 + thumbLayer.shadowOffset = CGSize.zero + thumbLayer.shadowColor = UIColor.clear.cgColor + thumbLayer.shadowOpacity = 0.0 + } + } + } + + func layoutTrack() { + assert(tickCount > 1, "2 ticks minimum \(tickCount)") + let segments = max(1, tickCount - 1) + let thumbWidth = thumbSizeIncludingShadow().width + + // Calculate the track ticks positions + let trackHeight = (.iOS == trackComponentStyle) ? 2 : trackThickness + var trackSize = CGSize(width: frame.width - thumbWidth, + height: trackHeight) + if(.image == trackComponentStyle) { + if let trackImage = trackImage, + let image = UIImage(named: trackImage) { + trackSize.width = image.size.width - thumbWidth + } + } + + trackRectangle = CGRect(x: (frame.width - trackSize.width)/2, + y: (frame.height - trackSize.height)/2, + width: trackSize.width, + height: trackSize.height) + let trackY = frame.height / 2 + ticksAbscisses = [] + for iterate in 0 ..< segments { + let ratio = Double(iterate) / Double(segments) + let originX = trackRectangle.origin.x + (CGFloat)(trackSize.width * CGFloat(ratio)) + ticksAbscisses.append(CGPoint(x: originX, y: trackY)) + } + layoutThumb() + + // If we have a TGPDiscreteSliderTicksListener (such as TGPCamelLabels), broadcast new spacing + ticksListener?.tgpTicksDistanceChanged(ticksDistance:ticksDistance, sender:self) + setNeedsDisplay() + } + + func layoutThumb() { + assert(tickCount > 1, "2 ticks minimum \(tickCount)") + let segments = max(1, tickCount - 1) + + // Calculate the thumb position + let nonZeroIncrement = ((0 == incrementValue) ? 1 : incrementValue) + var thumbRatio = Double(value - minimumValue) / Double(segments * nonZeroIncrement) + thumbRatio = max(0.0, min(thumbRatio, 1.0)) // Normalized + thumbAbscisse = trackRectangle.origin.x + (CGFloat)(trackRectangle.width * CGFloat(thumbRatio)) + } + + func thumbSizeIncludingShadow() -> CGSize { + switch thumbComponentStyle { + case .invisible: + fallthrough + + case .rectangular: + fallthrough + + case .rounded: + return ((thumbShadowRadius != 0.0) + ? CGSize(width:thumbSize.width + + (thumbShadowRadius * 2) + + (thumbShadowOffset.width * 2), + height: thumbSize.height + + (thumbShadowRadius * 2) + + (thumbShadowOffset.height * 2)) + : thumbSize) + + case .iOS: + return CGSize(width: 28.0 + + (iOSThumbShadowRadius * 2) + + (iOSThumbShadowOffset.width * 2), + height: 28.0 + + (iOSThumbShadowRadius * 2) + + (iOSThumbShadowOffset.height * 2)) + + case .image: + if let thumbImage = thumbImage, + let image = UIImage(named: thumbImage) { + return image.size + } + fallthrough + + default: + return CGSize(width: 33, height: 33) + } + } + + // MARK: UIResponder + public override func touchesBegan(_ touches: Set, with event: UIEvent?) { + touchedInside = true + + touchDown(touches, animationDuration: 0.1) + sendActionForControlEvent(controlEvent: .valueChanged, with: event) + sendActionForControlEvent(controlEvent: .touchDown, with:event) + + if let touch = touches.first { + if touch.tapCount > 1 { + sendActionForControlEvent(controlEvent: .touchDownRepeat, with: event) + } + } + } + + public override func touchesMoved(_ touches: Set, with event: UIEvent?) { + touchDown(touches, animationDuration:0) + + let inside = touchesAreInside(touches) + sendActionForControlEvent(controlEvent: .valueChanged, with: event) + + if inside != touchedInside { // Crossing boundary + sendActionForControlEvent(controlEvent: (inside) ? .touchDragEnter : .touchDragExit, + with: event) + touchedInside = inside + } + // Drag + sendActionForControlEvent(controlEvent: (inside) ? .touchDragInside : .touchDragOutside, + with: event) + } + + public override func touchesEnded(_ touches: Set, with event: UIEvent?) { + touchUp(touches) + + sendActionForControlEvent(controlEvent: .valueChanged, with: event) + sendActionForControlEvent(controlEvent: (touchesAreInside(touches)) ? .touchUpInside : .touchUpOutside, + with: event) + } + + public override func touchesCancelled(_ touches: Set, with event: UIEvent?) { + touchUp(touches) + + sendActionForControlEvent(controlEvent: .valueChanged, with:event) + sendActionForControlEvent(controlEvent: .touchCancel, with:event) + } + + + // MARK: Touches + + func touchDown(_ touches: Set, animationDuration duration:TimeInterval) { + if let touch = touches.first { + let location = touch.location(in: touch.view) + moveThumbTo(abscisse: location.x, animationDuration: duration) + } + } + + func touchUp(_ touches: Set) { + if let touch = touches.first { + let location = touch.location(in: touch.view) + let tick = pickTickFromSliderPosition(abscisse: location.x) + moveThumbToTick(tick: tick) + } + } + + func touchesAreInside(_ touches: Set) -> Bool { + var inside = false + if let touch = touches.first { + let location = touch.location(in: touch.view) + if let bounds = touch.view?.bounds { + inside = bounds.contains(location) + } + } + return inside + } + + // MARK: Notifications + + func moveThumbToTick(tick: UInt) { + let nonZeroIncrement = ((0 == incrementValue) ? 1 : incrementValue) + let intValue = Int(minimumValue) + (Int(tick) * nonZeroIncrement) + if intValue != self.intValue { + self.intValue = intValue + sendActionsForControlEvents() + } + + layoutThumb() + setNeedsDisplay() + } + + func moveThumbTo(abscisse:CGFloat, animationDuration duration:TimeInterval) { + let leftMost = trackRectangle.minX + let rightMost = trackRectangle.maxX + + thumbAbscisse = max(leftMost, min(abscisse, rightMost)) + CATransaction.setAnimationDuration(duration) + + let tick = pickTickFromSliderPosition(abscisse: thumbAbscisse) + let nonZeroIncrement = ((0 == incrementValue) ? 1 : incrementValue) + let intValue = Int(minimumValue) + (Int(tick) * nonZeroIncrement) + if intValue != self.intValue { + self.intValue = intValue + sendActionsForControlEvents() + } + + setNeedsDisplay() + } + + func pickTickFromSliderPosition(abscisse: CGFloat) -> UInt { + let leftMost = trackRectangle.minX + let rightMost = trackRectangle.maxX + let clampedAbscisse = max(leftMost, min(abscisse, rightMost)) + let ratio = Double(clampedAbscisse - leftMost) / Double(rightMost - leftMost) + let segments = max(1, tickCount - 1) + return UInt(round( Double(segments) * ratio)) + } + + func sendActionForControlEvent(controlEvent:UIControlEvents, with event:UIEvent?) { + for target in allTargets { + if let caActions = actions(forTarget: target, forControlEvent: controlEvent) { + for actionName in caActions { + sendAction(NSSelectorFromString(actionName), to: target, for: event) + } + } + } + } + + #if TARGET_INTERFACE_BUILDER + // MARK: TARGET_INTERFACE_BUILDER stub + // Interface builder hides the IBInspectable for UIControl + + let allTargets: Set = Set() + func addTarget(_ target: Any?, action: Selector, for controlEvents: UIControlEvents) {} + func actions(forTarget target: Any?, forControlEvent controlEvent: UIControlEvents) -> [String]? { return nil } + func sendAction(_ action: Selector, to target: Any?, for event: UIEvent?) {} + #endif // TARGET_INTERFACE_BUILDER +} diff --git a/TGPControlsDemo/Podfile b/TGPControlsDemo/Podfile index ef85fe6..449a4df 100644 --- a/TGPControlsDemo/Podfile +++ b/TGPControlsDemo/Podfile @@ -1,10 +1,9 @@ -platform :ios, '9.3' +platform :ios, '8.0' + +use_frameworks! target 'TGPControlsDemo' do - use_frameworks! - - # Pods for TGPControlsDemo - pod 'TGPControls', :path => '../../TGPControls' + pod 'TGPControls', :path => '../../TGPControls' end diff --git a/TGPControlsDemo/TGPControlsDemo.xcodeproj/project.pbxproj b/TGPControlsDemo/TGPControlsDemo.xcodeproj/project.pbxproj index f68c42f..8e84583 100644 --- a/TGPControlsDemo/TGPControlsDemo.xcodeproj/project.pbxproj +++ b/TGPControlsDemo/TGPControlsDemo.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 49DFBE652BC3561E5CB5AC71 /* Pods_TGPControlsDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 581DB63BCDD6158FFB0D74E5 /* Pods_TGPControlsDemo.framework */; }; + 803A99D2DE444E51D1C80154 /* Pods_TGPControlsDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F81ED809FBD1E88B2963FDC /* Pods_TGPControlsDemo.framework */; }; DC56BDC71E46DEB900AAD0D9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC56BDC61E46DEB900AAD0D9 /* AppDelegate.swift */; }; DC56BDC91E46DEB900AAD0D9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC56BDC81E46DEB900AAD0D9 /* ViewController.swift */; }; DC56BDCC1E46DEB900AAD0D9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC56BDCA1E46DEB900AAD0D9 /* Main.storyboard */; }; @@ -16,9 +16,9 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 581DB63BCDD6158FFB0D74E5 /* Pods_TGPControlsDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TGPControlsDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 92A7F603AAEAC96A55AB65B0 /* Pods-TGPControlsDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo/Pods-TGPControlsDemo.release.xcconfig"; sourceTree = ""; }; - DA8C1E8D17DDF9A4BE0D574A /* Pods-TGPControlsDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo/Pods-TGPControlsDemo.debug.xcconfig"; sourceTree = ""; }; + 2ED040B4FCE5A995907CE089 /* Pods-TGPControlsDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo/Pods-TGPControlsDemo.debug.xcconfig"; sourceTree = ""; }; + 2F4F0B11EC6CA5DCEA1DB883 /* Pods-TGPControlsDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo/Pods-TGPControlsDemo.release.xcconfig"; sourceTree = ""; }; + 5F81ED809FBD1E88B2963FDC /* Pods_TGPControlsDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TGPControlsDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DC56BDC31E46DEB900AAD0D9 /* TGPControlsDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TGPControlsDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; DC56BDC61E46DEB900AAD0D9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; DC56BDC81E46DEB900AAD0D9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -33,37 +33,37 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 49DFBE652BC3561E5CB5AC71 /* Pods_TGPControlsDemo.framework in Frameworks */, + 803A99D2DE444E51D1C80154 /* Pods_TGPControlsDemo.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 4377D1C5D815215296FB706C /* Pods */ = { + 10EC92099730DF4A939701BE /* Frameworks */ = { isa = PBXGroup; children = ( - DA8C1E8D17DDF9A4BE0D574A /* Pods-TGPControlsDemo.debug.xcconfig */, - 92A7F603AAEAC96A55AB65B0 /* Pods-TGPControlsDemo.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 9913583EE20668591C0787BB /* Frameworks */ = { - isa = PBXGroup; - children = ( - 581DB63BCDD6158FFB0D74E5 /* Pods_TGPControlsDemo.framework */, + 5F81ED809FBD1E88B2963FDC /* Pods_TGPControlsDemo.framework */, ); name = Frameworks; sourceTree = ""; }; + 5B4B1FA5E4029B453F087869 /* Pods */ = { + isa = PBXGroup; + children = ( + 2ED040B4FCE5A995907CE089 /* Pods-TGPControlsDemo.debug.xcconfig */, + 2F4F0B11EC6CA5DCEA1DB883 /* Pods-TGPControlsDemo.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; DC56BDBA1E46DEB900AAD0D9 = { isa = PBXGroup; children = ( DC56BDC51E46DEB900AAD0D9 /* TGPControlsDemo */, DC56BDC41E46DEB900AAD0D9 /* Products */, - 4377D1C5D815215296FB706C /* Pods */, - 9913583EE20668591C0787BB /* Frameworks */, + 5B4B1FA5E4029B453F087869 /* Pods */, + 10EC92099730DF4A939701BE /* Frameworks */, ); sourceTree = ""; }; @@ -242,6 +242,7 @@ DC56BDD31E46DEB900AAD0D9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -279,7 +280,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -292,6 +293,7 @@ DC56BDD41E46DEB900AAD0D9 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -323,7 +325,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -334,8 +336,9 @@ }; DC56BDD61E46DEB900AAD0D9 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DA8C1E8D17DDF9A4BE0D574A /* Pods-TGPControlsDemo.debug.xcconfig */; + baseConfigurationReference = 2ED040B4FCE5A995907CE089 /* Pods-TGPControlsDemo.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = 55K7THBUV8; INFOPLIST_FILE = TGPControlsDemo/Info.plist; @@ -348,8 +351,9 @@ }; DC56BDD71E46DEB900AAD0D9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 92A7F603AAEAC96A55AB65B0 /* Pods-TGPControlsDemo.release.xcconfig */; + baseConfigurationReference = 2F4F0B11EC6CA5DCEA1DB883 /* Pods-TGPControlsDemo.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = 55K7THBUV8; INFOPLIST_FILE = TGPControlsDemo/Info.plist; @@ -379,6 +383,7 @@ DC56BDD71E46DEB900AAD0D9 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/TGPControlsDemo/TGPControlsDemo/Base.lproj/Main.storyboard b/TGPControlsDemo/TGPControlsDemo/Base.lproj/Main.storyboard index 988afa4..ff95622 100644 --- a/TGPControlsDemo/TGPControlsDemo/Base.lproj/Main.storyboard +++ b/TGPControlsDemo/TGPControlsDemo/Base.lproj/Main.storyboard @@ -35,7 +35,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -101,7 +101,7 @@ - + @@ -139,7 +139,7 @@ - + @@ -177,7 +177,7 @@ - + @@ -209,7 +209,7 @@ - + @@ -251,7 +251,7 @@ - + @@ -296,7 +296,7 @@ - + @@ -335,7 +335,7 @@ - + @@ -364,10 +364,10 @@ - + - + @@ -384,7 +384,7 @@ - + diff --git a/TGPControlsDemo/TGPControlsDemo/ViewController.swift b/TGPControlsDemo/TGPControlsDemo/ViewController.swift index 4ce5f6e..9b90047 100644 --- a/TGPControlsDemo/TGPControlsDemo/ViewController.swift +++ b/TGPControlsDemo/TGPControlsDemo/ViewController.swift @@ -19,6 +19,7 @@ // THE SOFTWARE. import UIKit +import TGPControls class ViewController: UIViewController { @IBOutlet weak var oneTo10Labels: TGPCamelLabels! diff --git a/TGPControlsDemo7/Podfile b/TGPControlsDemo7/Podfile deleted file mode 100644 index a6944e9..0000000 --- a/TGPControlsDemo7/Podfile +++ /dev/null @@ -1,7 +0,0 @@ -platform :ios, '7.0' -source 'https://github.com/CocoaPods/Specs.git' - -target 'TGPControlsDemo7' do - #pod 'TGPControls', :path => '../../TGPControls' - pod 'TGPControls' -end diff --git a/TGPControlsDemo7/TGPControlsDemo7.xcodeproj/project.pbxproj b/TGPControlsDemo7/TGPControlsDemo7.xcodeproj/project.pbxproj deleted file mode 100644 index 7690b7d..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7.xcodeproj/project.pbxproj +++ /dev/null @@ -1,372 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - A506FFB267F7DB477E7645C6 /* libPods-TGPControlsDemo7.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C3CF5B835790FE83208A2032 /* libPods-TGPControlsDemo7.a */; }; - DC74B6791A901699001DC526 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DC74B6781A901699001DC526 /* main.m */; }; - DC74B67C1A901699001DC526 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC74B67B1A901699001DC526 /* AppDelegate.m */; }; - DC74B67F1A901699001DC526 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC74B67E1A901699001DC526 /* ViewController.m */; }; - DC74B6821A901699001DC526 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC74B6801A901699001DC526 /* Main.storyboard */; }; - DC74B6841A901699001DC526 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DC74B6831A901699001DC526 /* Images.xcassets */; }; - DC74B6871A901699001DC526 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC74B6851A901699001DC526 /* LaunchScreen.xib */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 3227B7F26D7BFA5B9536A0DB /* Pods-TGPControlsDemo7.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo7.release.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo7/Pods-TGPControlsDemo7.release.xcconfig"; sourceTree = ""; }; - 9D6EC9A4396AF16D62F320EE /* Pods-TGPControlsDemo7.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo7.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo7/Pods-TGPControlsDemo7.debug.xcconfig"; sourceTree = ""; }; - C3CF5B835790FE83208A2032 /* libPods-TGPControlsDemo7.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TGPControlsDemo7.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - DC74B6731A901699001DC526 /* TGPControlsDemo7.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TGPControlsDemo7.app; sourceTree = BUILT_PRODUCTS_DIR; }; - DC74B6771A901699001DC526 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DC74B6781A901699001DC526 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - DC74B67A1A901699001DC526 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - DC74B67B1A901699001DC526 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - DC74B67D1A901699001DC526 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - DC74B67E1A901699001DC526 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - DC74B6811A901699001DC526 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - DC74B6831A901699001DC526 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - DC74B6861A901699001DC526 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - DCC831371A9017670047F142 /* Podfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Podfile; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - DC74B6701A901699001DC526 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A506FFB267F7DB477E7645C6 /* libPods-TGPControlsDemo7.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2BAC7104A1110CC622B002A7 /* Frameworks */ = { - isa = PBXGroup; - children = ( - C3CF5B835790FE83208A2032 /* libPods-TGPControlsDemo7.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - DC74B66A1A901699001DC526 = { - isa = PBXGroup; - children = ( - DCC831371A9017670047F142 /* Podfile */, - DC74B6751A901699001DC526 /* TGPControlsDemo7 */, - DC74B6741A901699001DC526 /* Products */, - EA8C94FA4563F0443C64E897 /* Pods */, - 2BAC7104A1110CC622B002A7 /* Frameworks */, - ); - sourceTree = ""; - }; - DC74B6741A901699001DC526 /* Products */ = { - isa = PBXGroup; - children = ( - DC74B6731A901699001DC526 /* TGPControlsDemo7.app */, - ); - name = Products; - sourceTree = ""; - }; - DC74B6751A901699001DC526 /* TGPControlsDemo7 */ = { - isa = PBXGroup; - children = ( - DC74B67A1A901699001DC526 /* AppDelegate.h */, - DC74B67B1A901699001DC526 /* AppDelegate.m */, - DC74B67D1A901699001DC526 /* ViewController.h */, - DC74B67E1A901699001DC526 /* ViewController.m */, - DC74B6801A901699001DC526 /* Main.storyboard */, - DC74B6831A901699001DC526 /* Images.xcassets */, - DC74B6851A901699001DC526 /* LaunchScreen.xib */, - DC74B6761A901699001DC526 /* Supporting Files */, - ); - path = TGPControlsDemo7; - sourceTree = ""; - }; - DC74B6761A901699001DC526 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - DC74B6771A901699001DC526 /* Info.plist */, - DC74B6781A901699001DC526 /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - EA8C94FA4563F0443C64E897 /* Pods */ = { - isa = PBXGroup; - children = ( - 9D6EC9A4396AF16D62F320EE /* Pods-TGPControlsDemo7.debug.xcconfig */, - 3227B7F26D7BFA5B9536A0DB /* Pods-TGPControlsDemo7.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - DC74B6721A901699001DC526 /* TGPControlsDemo7 */ = { - isa = PBXNativeTarget; - buildConfigurationList = DC74B6961A901699001DC526 /* Build configuration list for PBXNativeTarget "TGPControlsDemo7" */; - buildPhases = ( - FEE5971EB6029A24184C34B2 /* Check Pods Manifest.lock */, - DC74B66F1A901699001DC526 /* Sources */, - DC74B6701A901699001DC526 /* Frameworks */, - DC74B6711A901699001DC526 /* Resources */, - CEF1711B486B1BADB4F115FF /* Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TGPControlsDemo7; - productName = TGPControlsDemo7; - productReference = DC74B6731A901699001DC526 /* TGPControlsDemo7.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - DC74B66B1A901699001DC526 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0710; - ORGANIZATIONNAME = TheGothicParty; - TargetAttributes = { - DC74B6721A901699001DC526 = { - CreatedOnToolsVersion = 6.1.1; - }; - }; - }; - buildConfigurationList = DC74B66E1A901699001DC526 /* Build configuration list for PBXProject "TGPControlsDemo7" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = DC74B66A1A901699001DC526; - productRefGroup = DC74B6741A901699001DC526 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - DC74B6721A901699001DC526 /* TGPControlsDemo7 */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - DC74B6711A901699001DC526 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DC74B6821A901699001DC526 /* Main.storyboard in Resources */, - DC74B6871A901699001DC526 /* LaunchScreen.xib in Resources */, - DC74B6841A901699001DC526 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - CEF1711B486B1BADB4F115FF /* Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-TGPControlsDemo7/Pods-TGPControlsDemo7-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - FEE5971EB6029A24184C34B2 /* Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - DC74B66F1A901699001DC526 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DC74B67F1A901699001DC526 /* ViewController.m in Sources */, - DC74B67C1A901699001DC526 /* AppDelegate.m in Sources */, - DC74B6791A901699001DC526 /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - DC74B6801A901699001DC526 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - DC74B6811A901699001DC526 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - DC74B6851A901699001DC526 /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - DC74B6861A901699001DC526 /* Base */, - ); - name = LaunchScreen.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - DC74B6941A901699001DC526 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = 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_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - DC74B6951A901699001DC526 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = 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_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - DC74B6971A901699001DC526 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9D6EC9A4396AF16D62F320EE /* Pods-TGPControlsDemo7.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - INFOPLIST_FILE = TGPControlsDemo7/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.thegothicparty.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - DC74B6981A901699001DC526 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3227B7F26D7BFA5B9536A0DB /* Pods-TGPControlsDemo7.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - INFOPLIST_FILE = TGPControlsDemo7/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.thegothicparty.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - DC74B66E1A901699001DC526 /* Build configuration list for PBXProject "TGPControlsDemo7" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DC74B6941A901699001DC526 /* Debug */, - DC74B6951A901699001DC526 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DC74B6961A901699001DC526 /* Build configuration list for PBXNativeTarget "TGPControlsDemo7" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DC74B6971A901699001DC526 /* Debug */, - DC74B6981A901699001DC526 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = DC74B66B1A901699001DC526 /* Project object */; -} diff --git a/TGPControlsDemo7/TGPControlsDemo7/AppDelegate.m b/TGPControlsDemo7/TGPControlsDemo7/AppDelegate.m deleted file mode 100644 index 3035601..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/AppDelegate.m +++ /dev/null @@ -1,67 +0,0 @@ -// @file: AppDelegate.m -// @project: TGPControlsDemo7 (TGPControls) -// -// @history: Created November 27, 2014 (Thanksgiving Day) -// @author: Xavier Schott -// mailto://xschott@gmail.com -// http://thegothicparty.com -// tel://+18089383634 -// -// @license: http://opensource.org/licenses/MIT -// Copyright (c) 2014, Xavier Schott -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "AppDelegate.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Override point for customization after application launch. - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. -} - -- (void)applicationDidEnterBackground:(UIApplication *)application { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. -} - -- (void)applicationDidBecomeActive:(UIApplication *)application { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - -- (void)applicationWillTerminate:(UIApplication *)application { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. -} - -@end diff --git a/TGPControlsDemo7/TGPControlsDemo7/Base.lproj/LaunchScreen.xib b/TGPControlsDemo7/TGPControlsDemo7/Base.lproj/LaunchScreen.xib deleted file mode 100644 index 0c5a5a5..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/TGPControlsDemo7/TGPControlsDemo7/Base.lproj/Main.storyboard b/TGPControlsDemo7/TGPControlsDemo7/Base.lproj/Main.storyboard deleted file mode 100644 index 17930ce..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/Base.lproj/Main.storyboard +++ /dev/null @@ -1,485 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/AppIcon.appiconset/Contents.json b/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 36d2c80..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/Contents.json b/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/LaunchImage.launchimage/Contents.json b/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index c682b54..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default-2x.png", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "retina4", - "filename" : "Default-Retina4.png", - "minimum-system-version" : "7.0", - "orientation" : "portrait", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/LaunchImage.launchimage/Default-2x.png b/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/LaunchImage.launchimage/Default-2x.png deleted file mode 100644 index d29728b..0000000 Binary files a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/LaunchImage.launchimage/Default-2x.png and /dev/null differ diff --git a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/LaunchImage.launchimage/Default-Retina4.png b/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/LaunchImage.launchimage/Default-Retina4.png deleted file mode 100644 index 9df2f8e..0000000 Binary files a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/LaunchImage.launchimage/Default-Retina4.png and /dev/null differ diff --git a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/thumb.imageset/Contents.json b/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/thumb.imageset/Contents.json deleted file mode 100644 index 4ae76f3..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/thumb.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "wthumb.png" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/thumb.imageset/wthumb.png b/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/thumb.imageset/wthumb.png deleted file mode 100644 index 1713f04..0000000 Binary files a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/thumb.imageset/wthumb.png and /dev/null differ diff --git a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/tick.imageset/Contents.json b/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/tick.imageset/Contents.json deleted file mode 100644 index d15e75f..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/tick.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "wtick.png" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/tick.imageset/wtick.png b/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/tick.imageset/wtick.png deleted file mode 100644 index 7527bdf..0000000 Binary files a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/tick.imageset/wtick.png and /dev/null differ diff --git a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/track.imageset/Contents.json b/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/track.imageset/Contents.json deleted file mode 100644 index 91ef2b9..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/track.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "wtrack.png" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/track.imageset/wtrack.png b/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/track.imageset/wtrack.png deleted file mode 100644 index 425c867..0000000 Binary files a/TGPControlsDemo7/TGPControlsDemo7/Images.xcassets/track.imageset/wtrack.png and /dev/null differ diff --git a/TGPControlsDemo7/TGPControlsDemo7/Info.plist b/TGPControlsDemo7/TGPControlsDemo7/Info.plist deleted file mode 100644 index 40c6215..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/TGPControlsDemo7/TGPControlsDemo7/ViewController.m b/TGPControlsDemo7/TGPControlsDemo7/ViewController.m deleted file mode 100644 index 0a59a8a..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/ViewController.m +++ /dev/null @@ -1,136 +0,0 @@ -// @file: ViewController.m -// @project: TGPControlsDemo7 (TGPControls) -// -// @history: Created November 27, 2014 (Thanksgiving Day) -// @author: Xavier Schott -// mailto://xschott@gmail.com -// http://thegothicparty.com -// tel://+18089383634 -// -// @license: http://opensource.org/licenses/MIT -// Copyright (c) 2014, Xavier Schott -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "ViewController.h" -#import "TGPDiscreteSlider7.h" -#import "TGPCamelLabels7.h" - -@interface ViewController () - -// iOS 7 does not support IBInspectable, so use the .7 class for both controls. -// If your project targets iOS 8+, you should use TGPDiscreteSlider & TGPCamelLabels instead - -@property (weak, nonatomic) IBOutlet TGPCamelLabels7 *oneTo10Labels; -@property (weak, nonatomic) IBOutlet TGPDiscreteSlider7 *oneTo10Slider; - -@property (weak, nonatomic) IBOutlet TGPCamelLabels7 *alphabetLabels; -@property (weak, nonatomic) IBOutlet TGPDiscreteSlider7 *alphabetSlider; - -@property (weak, nonatomic) IBOutlet TGPCamelLabels7 * pictureLabels; -@property (weak, nonatomic) IBOutlet TGPDiscreteSlider7 * pictureSlider; - -@property (weak, nonatomic) IBOutlet TGPCamelLabels7 *switch1Camel; -@property (weak, nonatomic) IBOutlet TGPCamelLabels7 *switch2Camel; - -@property (weak, nonatomic) IBOutlet UILabel *controlEventsLabel; -@property (weak, nonatomic) IBOutlet TGPDiscreteSlider7 *dualColorSlider; -@property (weak, nonatomic) IBOutlet UIStepper *stepper; -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.alphabetLabels.names = @[@"A",@"B",@"C",@"D",@"E",@"F", @"G",@"H",@"I",@"J",@"K",@"L",@"M", - @"N",@"O",@"P",@"Q",@"R",@"S", @"T",@"U",@"V",@"W",@"X",@"Y",@"Z"]; - self.pictureLabels.names = @[@"orient", @"occident", @"zénith", @"nadir", @"septentrion", @"midi"]; - self.switch1Camel.names = @[@"OFF", @"ON"]; - self.switch2Camel.names = @[@"O", @"l"]; - - // Automatically track tick spacing changes - self.alphabetSlider.ticksListener = self.alphabetLabels; - self.oneTo10Slider.ticksListener = self.oneTo10Labels; - self.pictureSlider.ticksListener = self.pictureLabels; - - // UIControlEvents - [self.dualColorSlider addTarget:self action:@selector(touchDown:event:) forControlEvents:UIControlEventTouchDown]; - [self.dualColorSlider addTarget:self action:@selector(touchDownRepeat:event:) forControlEvents:UIControlEventTouchDownRepeat]; - [self.dualColorSlider addTarget:self action:@selector(touchDragInside:event:) forControlEvents:UIControlEventTouchDragInside]; - [self.dualColorSlider addTarget:self action:@selector(touchDragOutside:event:) forControlEvents:UIControlEventTouchDragOutside]; - [self.dualColorSlider addTarget:self action:@selector(touchDragEnter:event:) forControlEvents:UIControlEventTouchDragEnter]; - [self.dualColorSlider addTarget:self action:@selector(touchDragExit:event:) forControlEvents:UIControlEventTouchDragExit]; - [self.dualColorSlider addTarget:self action:@selector(touchUpInside:event:) forControlEvents:UIControlEventTouchUpInside]; - [self.dualColorSlider addTarget:self action:@selector(touchUpOutside:event:) forControlEvents:UIControlEventTouchUpOutside]; - [self.dualColorSlider addTarget:self action:@selector(touchCancel:event:) forControlEvents:UIControlEventTouchCancel]; - [self.dualColorSlider addTarget:self action:@selector(valueChanged:event:) forControlEvents:UIControlEventValueChanged]; -} - -#pragma mark - UISwitch - -- (IBAction)switch1ValueChanged:(UISwitch *)sender { - [self.switch1Camel setValue:((sender.isOn) ? 1 : 0)]; -} - -- (IBAction)switch2TouchUpInside:(UISwitch *)sender { - [self.switch2Camel setValue:((sender.isOn) ? 1 : 0)]; -} - -#pragma mark - UIControlEvents - -- (void)touchDown:(UIControl *)sender event:(UIEvent *)event { - self.controlEventsLabel.text = @"touchDown"; -} -- (void)touchDownRepeat:(UIControl *)sender event:(UIEvent *)event { - self.controlEventsLabel.text = @"touchDownRepeat"; -} -- (void)touchDragInside:(UIControl *)sender event:(UIEvent *)event { - self.controlEventsLabel.text = @"touchDragInside"; -} -- (void)touchDragOutside:(UIControl *)sender event:(UIEvent *)event { - self.controlEventsLabel.text = @"touchDragOutside"; -} -- (void)touchDragEnter:(UIControl *)sender event:(UIEvent *)event { - self.controlEventsLabel.text = @"touchDragEnter"; -} -- (void)touchDragExit:(UIControl *)sender event:(UIEvent *)event { - self.controlEventsLabel.text = @"touchDragExit"; -} -- (void)touchUpInside:(UIControl *)sender event:(UIEvent *)event { - self.controlEventsLabel.text = @"touchUpInside"; -} -- (void)touchUpOutside:(UIControl *)sender event:(UIEvent *)event { - self.controlEventsLabel.text = @"touchUpOutside"; -} -- (void)touchCancel:(UIControl *)sender event:(UIEvent *)event { - self.controlEventsLabel.text = @"touchCancel"; -} -- (void)valueChanged:(TGPDiscreteSlider7 *)sender event:(UIEvent *)event { - self.controlEventsLabel.text = @"valueChanged"; - self.stepper.value = (double) sender.value; -} - -#pragma mark - UIStepper - -- (IBAction)stepperValueChanged:(UIStepper *)sender { - self.dualColorSlider.value = (CGFloat) sender.value; -} - -@end \ No newline at end of file diff --git a/TGPControlsDemo7/TGPControlsDemo7/main.m b/TGPControlsDemo7/TGPControlsDemo7/main.m deleted file mode 100644 index 47a089c..0000000 --- a/TGPControlsDemo7/TGPControlsDemo7/main.m +++ /dev/null @@ -1,38 +0,0 @@ -// @file: main.m -// @project: TGPControlsDemo7 (TGPControls) -// -// @history: Created November 27, 2014 (Thanksgiving Day) -// @author: Xavier Schott -// mailto://xschott@gmail.com -// http://thegothicparty.com -// tel://+18089383634 -// -// @license: http://opensource.org/licenses/MIT -// Copyright (c) 2014, Xavier Schott -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/TGPControls_License.txt b/TGPControls_License.txt index 91b666c..744ac57 100644 --- a/TGPControls_License.txt +++ b/TGPControls_License.txt @@ -1,4 +1,4 @@ -Copyright (c) 2014 Xavier Schott +Copyright (c) 2017 Xavier Schott Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE.