From a8734fc54f247e12296faec8b249617a0b156049 Mon Sep 17 00:00:00 2001 From: letusfly85 Date: Wed, 6 Apr 2016 00:21:43 +0900 Subject: [PATCH] modify for ios ~> 8.0 --- LiquidGauge.podspec | 21 + LiquidGauge.xcodeproj/project.pbxproj | 406 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + LiquidGauge/Info.plist | 26 ++ LiquidGauge/LiquidGauge.h | 19 + .../LiquidGaugeStyle.swift | 18 +- .../LiquidGaugeView.swift | 136 +++--- .../project.pbxproj | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/Liquid-gaugeDemo.xccheckout | 0 .../Liquid-gaugeDemo/AppDelegate.swift | 0 .../Base.lproj/LaunchScreen.xib | 0 .../Base.lproj/Main.storyboard | 0 .../AppIcon.appiconset/Contents.json | 5 + .../maskOne.imageset/Contents.json | 0 .../maskOne.imageset/switch-mask.png | Bin .../maskTwo.imageset/Contents.json | 0 .../maskTwo.imageset/maskTwo.png | Bin .../Liquid-gaugeDemo/Info.plist | 0 .../contents.xcplayground | 0 .../MyPlayground.playground/section-1.swift | 0 .../timeline.xctimeline | 0 .../Liquid-gaugeDemo/ViewController.swift | 0 .../Liquid-gaugeDemo/configuration.json | 0 .../Liquid-gaugeDemoTests/Info.plist | 0 .../Liquid_gaugeDemoTests.swift | 0 LiquidGaugeTests/Info.plist | 24 ++ LiquidGaugeTests/LiquidGaugeTests.swift | 36 ++ 28 files changed, 621 insertions(+), 77 deletions(-) create mode 100644 LiquidGauge.podspec create mode 100644 LiquidGauge.xcodeproj/project.pbxproj create mode 100644 LiquidGauge.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 LiquidGauge/Info.plist create mode 100644 LiquidGauge/LiquidGauge.h rename Liquid-gauge/Classes/GaugeStyle.swift => LiquidGauge/LiquidGaugeStyle.swift (85%) rename Liquid-gauge/Views/LiquidView.swift => LiquidGauge/LiquidGaugeView.swift (77%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo.xcodeproj/project.pbxproj (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo.xcodeproj/project.xcworkspace/xcshareddata/Liquid-gaugeDemo.xccheckout (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/AppDelegate.swift (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/Base.lproj/LaunchScreen.xib (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/Base.lproj/Main.storyboard (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/Images.xcassets/AppIcon.appiconset/Contents.json (92%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/Images.xcassets/maskOne.imageset/Contents.json (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/Images.xcassets/maskOne.imageset/switch-mask.png (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/Images.xcassets/maskTwo.imageset/Contents.json (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/Images.xcassets/maskTwo.imageset/maskTwo.png (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/Info.plist (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/MyPlayground.playground/contents.xcplayground (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/MyPlayground.playground/section-1.swift (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/MyPlayground.playground/timeline.xctimeline (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/ViewController.swift (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemo/configuration.json (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemoTests/Info.plist (100%) rename {Liquid-gaugeDemo => LiquidGaugeDemo}/Liquid-gaugeDemoTests/Liquid_gaugeDemoTests.swift (100%) create mode 100644 LiquidGaugeTests/Info.plist create mode 100644 LiquidGaugeTests/LiquidGaugeTests.swift diff --git a/LiquidGauge.podspec b/LiquidGauge.podspec new file mode 100644 index 0000000..59a51a4 --- /dev/null +++ b/LiquidGauge.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = "LiquidGauge" + s.version = "0.0.1" + s.summary = "Liquid Gauge" + s.description = <<-DESC + This library provides an easy to use and fully customizable class to simulate liquid and represent a percentage in a view easyli. + + The view content is based on a percentage and is usable as a gauge. + + The liquid view has fully customizable appearance and behavior. (See configuration section) + + The view should be used with a mask in front of it to simulate the container. + DESC + + s.homepage = "https://github.com/LiquidGauge/Liquid-Gauge" + s.license = { :type => "MIT", :file => "LICENSE" } + s.author = { "Liquid Gauge" => "todo@gmail.com" } + s.platform = :ios, "8.0" + s.source = { :git => "https://github.com/LiquidGauge/Liquid-Gauge.git", :tag => "0.0.1" } + s.source_files = "LiquidGauge/**/*.swift" +end diff --git a/LiquidGauge.xcodeproj/project.pbxproj b/LiquidGauge.xcodeproj/project.pbxproj new file mode 100644 index 0000000..5164117 --- /dev/null +++ b/LiquidGauge.xcodeproj/project.pbxproj @@ -0,0 +1,406 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + B92A3D8B1CB39F0E00142021 /* LiquidGauge.h in Headers */ = {isa = PBXBuildFile; fileRef = B92A3D8A1CB39F0E00142021 /* LiquidGauge.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B92A3D921CB39F0E00142021 /* LiquidGauge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B92A3D871CB39F0E00142021 /* LiquidGauge.framework */; }; + B92A3D971CB39F0E00142021 /* LiquidGaugeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B92A3D961CB39F0E00142021 /* LiquidGaugeTests.swift */; }; + B92A3DDC1CB3A08200142021 /* LiquidGaugeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B92A3DDB1CB3A08200142021 /* LiquidGaugeView.swift */; }; + B92A3DDE1CB3A19000142021 /* LiquidGaugeStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = B92A3DDD1CB3A19000142021 /* LiquidGaugeStyle.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + B92A3D931CB39F0E00142021 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B92A3D7E1CB39F0E00142021 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B92A3D861CB39F0E00142021; + remoteInfo = LiquidGauge; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + B92A3D871CB39F0E00142021 /* LiquidGauge.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LiquidGauge.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B92A3D8A1CB39F0E00142021 /* LiquidGauge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LiquidGauge.h; sourceTree = ""; }; + B92A3D8C1CB39F0E00142021 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B92A3D911CB39F0E00142021 /* LiquidGaugeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LiquidGaugeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B92A3D961CB39F0E00142021 /* LiquidGaugeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiquidGaugeTests.swift; sourceTree = ""; }; + B92A3D981CB39F0E00142021 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B92A3DDB1CB3A08200142021 /* LiquidGaugeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiquidGaugeView.swift; sourceTree = ""; }; + B92A3DDD1CB3A19000142021 /* LiquidGaugeStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiquidGaugeStyle.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B92A3D831CB39F0E00142021 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B92A3D8E1CB39F0E00142021 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B92A3D921CB39F0E00142021 /* LiquidGauge.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B92A3D7D1CB39F0E00142021 = { + isa = PBXGroup; + children = ( + B92A3D891CB39F0E00142021 /* LiquidGauge */, + B92A3D951CB39F0E00142021 /* LiquidGaugeTests */, + B92A3D881CB39F0E00142021 /* Products */, + ); + sourceTree = ""; + }; + B92A3D881CB39F0E00142021 /* Products */ = { + isa = PBXGroup; + children = ( + B92A3D871CB39F0E00142021 /* LiquidGauge.framework */, + B92A3D911CB39F0E00142021 /* LiquidGaugeTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + B92A3D891CB39F0E00142021 /* LiquidGauge */ = { + isa = PBXGroup; + children = ( + B92A3D8A1CB39F0E00142021 /* LiquidGauge.h */, + B92A3D8C1CB39F0E00142021 /* Info.plist */, + B92A3DDB1CB3A08200142021 /* LiquidGaugeView.swift */, + B92A3DDD1CB3A19000142021 /* LiquidGaugeStyle.swift */, + ); + path = LiquidGauge; + sourceTree = ""; + }; + B92A3D951CB39F0E00142021 /* LiquidGaugeTests */ = { + isa = PBXGroup; + children = ( + B92A3D961CB39F0E00142021 /* LiquidGaugeTests.swift */, + B92A3D981CB39F0E00142021 /* Info.plist */, + ); + path = LiquidGaugeTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + B92A3D841CB39F0E00142021 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + B92A3D8B1CB39F0E00142021 /* LiquidGauge.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + B92A3D861CB39F0E00142021 /* LiquidGauge */ = { + isa = PBXNativeTarget; + buildConfigurationList = B92A3D9B1CB39F0E00142021 /* Build configuration list for PBXNativeTarget "LiquidGauge" */; + buildPhases = ( + B92A3D821CB39F0E00142021 /* Sources */, + B92A3D831CB39F0E00142021 /* Frameworks */, + B92A3D841CB39F0E00142021 /* Headers */, + B92A3D851CB39F0E00142021 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LiquidGauge; + productName = LiquidGauge; + productReference = B92A3D871CB39F0E00142021 /* LiquidGauge.framework */; + productType = "com.apple.product-type.framework"; + }; + B92A3D901CB39F0E00142021 /* LiquidGaugeTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B92A3D9E1CB39F0E00142021 /* Build configuration list for PBXNativeTarget "LiquidGaugeTests" */; + buildPhases = ( + B92A3D8D1CB39F0E00142021 /* Sources */, + B92A3D8E1CB39F0E00142021 /* Frameworks */, + B92A3D8F1CB39F0E00142021 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B92A3D941CB39F0E00142021 /* PBXTargetDependency */, + ); + name = LiquidGaugeTests; + productName = LiquidGaugeTests; + productReference = B92A3D911CB39F0E00142021 /* LiquidGaugeTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B92A3D7E1CB39F0E00142021 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = org.triplew; + TargetAttributes = { + B92A3D861CB39F0E00142021 = { + CreatedOnToolsVersion = 7.3; + DevelopmentTeam = FFQU63M9MZ; + }; + B92A3D901CB39F0E00142021 = { + CreatedOnToolsVersion = 7.3; + DevelopmentTeam = FFQU63M9MZ; + }; + }; + }; + buildConfigurationList = B92A3D811CB39F0E00142021 /* Build configuration list for PBXProject "LiquidGauge" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = B92A3D7D1CB39F0E00142021; + productRefGroup = B92A3D881CB39F0E00142021 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B92A3D861CB39F0E00142021 /* LiquidGauge */, + B92A3D901CB39F0E00142021 /* LiquidGaugeTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B92A3D851CB39F0E00142021 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B92A3D8F1CB39F0E00142021 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B92A3D821CB39F0E00142021 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B92A3DDC1CB3A08200142021 /* LiquidGaugeView.swift in Sources */, + B92A3DDE1CB3A19000142021 /* LiquidGaugeStyle.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B92A3D8D1CB39F0E00142021 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B92A3D971CB39F0E00142021 /* LiquidGaugeTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + B92A3D941CB39F0E00142021 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B92A3D861CB39F0E00142021 /* LiquidGauge */; + targetProxy = B92A3D931CB39F0E00142021 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + B92A3D991CB39F0E00142021 /* 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; + 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; + 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_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 = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + B92A3D9A1CB39F0E00142021 /* 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; + 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; + 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 = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + B92A3D9C1CB39F0E00142021 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = LiquidGauge/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.triplew.LiquidGauge; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + B92A3D9D1CB39F0E00142021 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = LiquidGauge/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.triplew.LiquidGauge; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; + B92A3D9F1CB39F0E00142021 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = LiquidGaugeTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.triplew.LiquidGaugeTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + B92A3DA01CB39F0E00142021 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = LiquidGaugeTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.triplew.LiquidGaugeTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B92A3D811CB39F0E00142021 /* Build configuration list for PBXProject "LiquidGauge" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B92A3D991CB39F0E00142021 /* Debug */, + B92A3D9A1CB39F0E00142021 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B92A3D9B1CB39F0E00142021 /* Build configuration list for PBXNativeTarget "LiquidGauge" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B92A3D9C1CB39F0E00142021 /* Debug */, + B92A3D9D1CB39F0E00142021 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + B92A3D9E1CB39F0E00142021 /* Build configuration list for PBXNativeTarget "LiquidGaugeTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B92A3D9F1CB39F0E00142021 /* Debug */, + B92A3DA01CB39F0E00142021 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = B92A3D7E1CB39F0E00142021 /* Project object */; +} diff --git a/LiquidGauge.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/LiquidGauge.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..d3945a3 --- /dev/null +++ b/LiquidGauge.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/LiquidGauge/Info.plist b/LiquidGauge/Info.plist new file mode 100644 index 0000000..d3de8ee --- /dev/null +++ b/LiquidGauge/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/LiquidGauge/LiquidGauge.h b/LiquidGauge/LiquidGauge.h new file mode 100644 index 0000000..c207ccf --- /dev/null +++ b/LiquidGauge/LiquidGauge.h @@ -0,0 +1,19 @@ +// +// LiquidGauge.h +// LiquidGauge +// +// Created by 和田 俊輔 on 2016/04/05. +// Copyright © 2016年 org.triplew. All rights reserved. +// + +#import + +//! Project version number for LiquidGauge. +FOUNDATION_EXPORT double LiquidGaugeVersionNumber; + +//! Project version string for LiquidGauge. +FOUNDATION_EXPORT const unsigned char LiquidGaugeVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Liquid-gauge/Classes/GaugeStyle.swift b/LiquidGauge/LiquidGaugeStyle.swift similarity index 85% rename from Liquid-gauge/Classes/GaugeStyle.swift rename to LiquidGauge/LiquidGaugeStyle.swift index 88bf6fb..569437a 100644 --- a/Liquid-gauge/Classes/GaugeStyle.swift +++ b/LiquidGauge/LiquidGaugeStyle.swift @@ -1,6 +1,6 @@ // -// GaugeStyle.swift -// Liquid-gaugeDemo +// LiquidGaugeStyle.swift +// LiquidGauge // // Created by Thibault Carpentier on 12/12/14. // Copyright (c) 2014 thanbeth. All rights reserved. @@ -10,18 +10,16 @@ import UIKit class GaugeStyleAndBehavior: NSObject { typealias colorForRange = (color:UIColor!, range:NSRange) - + // MARK:Behavior variable var frequency:Double = 0.0 var amplitude:Double = 0.0 - + // MARK: Style variables var colors:[colorForRange]? = nil - + init(styleFile:String!, behaviorFile:String!) { - + } - -} - - + +} \ No newline at end of file diff --git a/Liquid-gauge/Views/LiquidView.swift b/LiquidGauge/LiquidGaugeView.swift similarity index 77% rename from Liquid-gauge/Views/LiquidView.swift rename to LiquidGauge/LiquidGaugeView.swift index 073cfa7..4bd0b5c 100644 --- a/Liquid-gauge/Views/LiquidView.swift +++ b/LiquidGauge/LiquidGaugeView.swift @@ -1,6 +1,6 @@ // -// LiquidView.swift -// Liquid-gaugeDemo +// LiquidGaugeView.swift +// LiquidGauge // // Created by Anas Ait Ali on 02/12/14. // Copyright (c) 2014 thanbeth. All rights reserved. @@ -10,31 +10,31 @@ import UIKit import CoreMotion //MARK: - LiquidView Delegate -@objc protocol LiquidViewDelegate : NSObjectProtocol { +@objc protocol LiquidGaugeViewDelegate : NSObjectProtocol { // Return a color depending on the pencent value of the gauge - optional func liquidView(liquidView: LiquidView, colorForPercent percent:Float) -> UIColor! + optional func liquidView(liquidView: LiquidGaugeView, colorForPercent percent:Float) -> UIColor! } //MARK: - LiquidView Datasource -@objc protocol LiquidViewDatasource : NSObjectProtocol { +@objc protocol LiquidGaugeViewDatasource : NSObjectProtocol { // Frequency of the liquid's waves - optional func waveFrequency(liquidView: LiquidView) -> Float - + optional func waveFrequency(liquidView: LiquidGaugeView) -> Float + // Size of the waves - optional func waveAmplitude(liquidView: LiquidView) -> Float - + optional func waveAmplitude(liquidView: LiquidGaugeView) -> Float + // Number of waves - optional func numberOfWaves(liquidView: LiquidView) -> Int + optional func numberOfWaves(liquidView: LiquidGaugeView) -> Int // Current value of the gauge in percent (%) - func gaugeValue(liquidView: LiquidView) -> Float + func gaugeValue(liquidView: LiquidGaugeView) -> Float } //MARK: -LiquidView Class -class LiquidView: UIView { - +public class LiquidGaugeView: UIView { + //MARK: - Variables //MARK: - Timers // Timer used for update drawing @@ -43,7 +43,7 @@ class LiquidView: UIView { // Update angle constant periodically so unvoluntary shaking is not taken in account var timerAccelerometer:NSTimer? = nil let refreshUpdateAccelerometerInterval:NSTimeInterval = 0.06 - + //MARK: Wave configuration // Limit refresh display and drawing, for performance var tick: Int = 0 @@ -57,7 +57,7 @@ class LiquidView: UIView { var color:UIColor = UIColor.blueColor() // The number of waves var nbWaves: Int = 1 - + //MARK: Waves User controlled values // Percentage inside the gauge var percent:Float = 50 @@ -66,7 +66,7 @@ class LiquidView: UIView { let motion = CMMotionManager() motion.gyroUpdateInterval = 0.1 return motion - }() + }() // We store the accelerometer data to reuse later var accelerometer:CMAccelerometerData? = nil // We store the angle constant (This is calculated by the timerAccelerometer callback and used during drawing) @@ -80,14 +80,14 @@ class LiquidView: UIView { } var drawingAngleConstant:Float = 0.0 var toAdd:Float = 0.0 - + //MARK: concurential acces let lockQueue = dispatch_queue_create("com.test.accelerometerLock", nil) - + //MARK: - Delegate - var delegate:LiquidViewDelegate? = nil { + var delegate:LiquidGaugeViewDelegate? = nil { willSet (value) { - if (value != nil && value!.respondsToSelector(Selector("liquidView:colorForPercent:"))) { + if (value != nil && value!.respondsToSelector(#selector(LiquidGaugeViewDelegate.liquidView(_:colorForPercent:)))) { delegateRespondTo.liquidViewColorForPercent = true } } @@ -97,19 +97,19 @@ class LiquidView: UIView { var liquidViewColorForPercent:Bool = false } var delegateRespondTo:delegateMethodCaching = delegateMethodCaching() - + //MARK: - Datasource - var datasource:LiquidViewDatasource? = nil { + var datasource:LiquidGaugeViewDatasource? = nil { willSet (newValue) { if (newValue != nil) { - datasourceRespondTo.waveFrequency = newValue!.respondsToSelector(Selector("waveFrequency:")) - datasourceRespondTo.waveAmplitude = newValue!.respondsToSelector(Selector("waveAmplitude:")) - datasourceRespondTo.gaugeValue = newValue!.respondsToSelector(Selector("gaugeValue:")) - datasourceRespondTo.numberOfWaves = newValue!.respondsToSelector(Selector("numberOfWaves:")) + datasourceRespondTo.waveFrequency = newValue!.respondsToSelector(#selector(LiquidGaugeViewDatasource.waveFrequency(_:))) + datasourceRespondTo.waveAmplitude = newValue!.respondsToSelector(#selector(LiquidGaugeViewDatasource.waveAmplitude(_:))) + datasourceRespondTo.gaugeValue = newValue!.respondsToSelector(#selector(LiquidGaugeViewDatasource.gaugeValue(_:))) + datasourceRespondTo.numberOfWaves = newValue!.respondsToSelector(#selector(LiquidGaugeViewDatasource.numberOfWaves(_:))) } } } - + struct datasourceMethodsCaching { var waveFrequency:Bool = false var waveAmplitude:Bool = false @@ -122,33 +122,33 @@ class LiquidView: UIView { //MARK: - Life cycle func initialize() { // Starting accelerometer detection -// startMotionDetect() // We should let the user start motion dectection when he needs to -> save battery - + // startMotionDetect() // We should let the user start motion dectection when he needs to -> save battery + // Redo timers invalidateTimer(&timerRedraw) invalidateTimer(&timerAccelerometer) - timerRedraw = NSTimer.scheduledTimerWithTimeInterval(refreshRedrawInterval, target: self, selector: "updateDrawing", userInfo: nil, repeats: true) - timerAccelerometer = NSTimer.scheduledTimerWithTimeInterval(refreshUpdateAccelerometerInterval, target: self, selector: "calcAngleConstant", userInfo: nil, repeats: true) - + timerRedraw = NSTimer.scheduledTimerWithTimeInterval(refreshRedrawInterval, target: self, selector: #selector(LiquidGaugeView.updateDrawing), userInfo: nil, repeats: true) + timerAccelerometer = NSTimer.scheduledTimerWithTimeInterval(refreshUpdateAccelerometerInterval, target: self, selector: #selector(LiquidGaugeView.calcAngleConstant), userInfo: nil, repeats: true) + self.setNeedsDisplay() } - override func awakeFromNib() { + override public func awakeFromNib() { super.awakeFromNib() initialize() } - + //MARK: - Drawing func updateDrawing() { let requiredTickes = 4 tick = (tick+1)%requiredTickes _phase += -Float(arc4random_uniform(180))/1000 - - var isNearlyEqual = abs(self.angleConstant - self.drawingAngleConstant) + + let isNearlyEqual = abs(self.angleConstant - self.drawingAngleConstant) if (isNearlyEqual >= 0 && isNearlyEqual <= toAdd) { self.drawingAngleConstant += toAdd } - + if (tick == 0) { self.setNeedsDisplay() } @@ -156,26 +156,26 @@ class LiquidView: UIView { // Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. - override func drawRect(rect: CGRect) { + override public func drawRect(rect: CGRect) { super.drawRect(rect) - let context : CGContextRef = UIGraphicsGetCurrentContext() - let colorSpace : CGColorSpaceRef = CGColorSpaceCreateDeviceRGB() + let context : CGContextRef = UIGraphicsGetCurrentContext()! + let colorSpace : CGColorSpaceRef = CGColorSpaceCreateDeviceRGB()! let background = UIBezierPath(rect: rect) - + UIColor(white: 0.97, alpha: 1).setFill() background.fill() drawWaves(rect, context: context, colorSpace: colorSpace) } - + func drawWaves(rect: CGRect, context: CGContextRef, colorSpace: CGColorSpaceRef) { // Drawing constants let marginLeft: Float = 0 let marginRight: Float = 0 let _density: Float = 5.0 let _lineWidth: Float = 2.0 - + if (self.datasource != nil) { self.percent = datasource!.gaugeValue(self) @@ -188,27 +188,27 @@ class LiquidView: UIView { if (self.datasourceRespondTo.numberOfWaves) { self.nbWaves = self.datasource!.numberOfWaves!(self) } - + } // constant calculated according to drawing constant (For future more scalable use) let vPosition: Float = Float(self.bounds.height) - (Float(self.bounds.height) * percent / 100.0); let width: Float = Float(self.bounds.width) - marginLeft - marginRight; let mid: Float = width / 2.0; - let stepLength = _density / width; - + _ = _density / width; + CGContextSetLineWidth(context, CGFloat(_lineWidth)) let maxAmplitudePosition = (percent >= 50) ? vPosition : abs(vPosition - Float(self.bounds.height)) let maxAmplitude: Float = maxAmplitudePosition - Float(2 * _lineWidth) let normedAmplitude: Float = _amplitude - + if (self.delegate != nil && self.delegateRespondTo.liquidViewColorForPercent) { self.color = (delegate!.liquidView!(self, colorForPercent: percent)) } - + var waveAlpha: CGFloat = 0.5 var nbWaveValue = self.nbWaves - nbWaveValue-- + nbWaveValue -= 1 while (nbWaveValue >= 0) { waveAlpha = CGFloat(1 - CGFloat(nbWaveValue) / 6) color.colorWithAlphaComponent(waveAlpha).set() @@ -243,18 +243,21 @@ class LiquidView: UIView { CGPathCloseSubpath(curve) CGContextAddPath(context, curve) CGContextFillPath(context) - nbWaveValue-- + nbWaveValue -= 1 } } - - + + // MARK: - Accelerometer methods func startMotionDetect() { - self.motionManager.startAccelerometerUpdatesToQueue(NSOperationQueue(), withHandler:{(accelerometerData:CMAccelerometerData!, error:NSError!) in - dispatch_sync(self.lockQueue) { - self.accelerometer = accelerometerData + self.motionManager.startAccelerometerUpdatesToQueue(NSOperationQueue(), withHandler: + { + (accelerometerData:CMAccelerometerData?, error:NSError?) -> Void in + dispatch_sync(self.lockQueue) { + self.accelerometer = nil //accelerometerData + } } - }) + ) } func stopMotionDetect() { @@ -265,19 +268,19 @@ class LiquidView: UIView { func calcAngleConstant() { dispatch_sync(lockQueue) { if (self.accelerometer != nil) { -// if (Int(round(abs(self.accelerometer!.acceleration.z))) == 1) { -//// return slowly to "normal" state -// self.angleConstant = 0.0 -// return -// } - + // if (Int(round(abs(self.accelerometer!.acceleration.z))) == 1) { + //// return slowly to "normal" state + // self.angleConstant = 0.0 + // return + // } + var multiplier:Float = 1.0 if (self.accelerometer!.acceleration.x < 0) { multiplier = -1.0 } - - var tmp = Float(abs(self.accelerometer!.acceleration.y)) * Float(100.0) - var intConstant = Int(tmp) + + let tmp = Float(abs(self.accelerometer!.acceleration.y)) * Float(100.0) + let intConstant = Int(tmp) self.angleConstant = (1 - (Float(intConstant) / 100)) * multiplier } } @@ -286,7 +289,7 @@ class LiquidView: UIView { func invalidateTimer(inout timer:NSTimer?) -> Bool { var success:Bool = false - + if (timer != nil && timer!.valid == true) { timer!.invalidate(); timer = nil success = true @@ -294,4 +297,3 @@ class LiquidView: UIView { return success } } - diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo.xcodeproj/project.pbxproj b/LiquidGaugeDemo/Liquid-gaugeDemo.xcodeproj/project.pbxproj similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo.xcodeproj/project.pbxproj rename to LiquidGaugeDemo/Liquid-gaugeDemo.xcodeproj/project.pbxproj diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/LiquidGaugeDemo/Liquid-gaugeDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to LiquidGaugeDemo/Liquid-gaugeDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo.xcodeproj/project.xcworkspace/xcshareddata/Liquid-gaugeDemo.xccheckout b/LiquidGaugeDemo/Liquid-gaugeDemo.xcodeproj/project.xcworkspace/xcshareddata/Liquid-gaugeDemo.xccheckout similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo.xcodeproj/project.xcworkspace/xcshareddata/Liquid-gaugeDemo.xccheckout rename to LiquidGaugeDemo/Liquid-gaugeDemo.xcodeproj/project.xcworkspace/xcshareddata/Liquid-gaugeDemo.xccheckout diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/AppDelegate.swift b/LiquidGaugeDemo/Liquid-gaugeDemo/AppDelegate.swift similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/AppDelegate.swift rename to LiquidGaugeDemo/Liquid-gaugeDemo/AppDelegate.swift diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/Base.lproj/LaunchScreen.xib b/LiquidGaugeDemo/Liquid-gaugeDemo/Base.lproj/LaunchScreen.xib similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/Base.lproj/LaunchScreen.xib rename to LiquidGaugeDemo/Liquid-gaugeDemo/Base.lproj/LaunchScreen.xib diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/Base.lproj/Main.storyboard b/LiquidGaugeDemo/Liquid-gaugeDemo/Base.lproj/Main.storyboard similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/Base.lproj/Main.storyboard rename to LiquidGaugeDemo/Liquid-gaugeDemo/Base.lproj/Main.storyboard diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/Images.xcassets/AppIcon.appiconset/Contents.json b/LiquidGaugeDemo/Liquid-gaugeDemo/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 92% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/Images.xcassets/AppIcon.appiconset/Contents.json rename to LiquidGaugeDemo/Liquid-gaugeDemo/Images.xcassets/AppIcon.appiconset/Contents.json index 36d2c80..eeea76c 100644 --- a/Liquid-gaugeDemo/Liquid-gaugeDemo/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/LiquidGaugeDemo/Liquid-gaugeDemo/Images.xcassets/AppIcon.appiconset/Contents.json @@ -59,6 +59,11 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" } ], "info" : { diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskOne.imageset/Contents.json b/LiquidGaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskOne.imageset/Contents.json similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskOne.imageset/Contents.json rename to LiquidGaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskOne.imageset/Contents.json diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskOne.imageset/switch-mask.png b/LiquidGaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskOne.imageset/switch-mask.png similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskOne.imageset/switch-mask.png rename to LiquidGaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskOne.imageset/switch-mask.png diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskTwo.imageset/Contents.json b/LiquidGaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskTwo.imageset/Contents.json similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskTwo.imageset/Contents.json rename to LiquidGaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskTwo.imageset/Contents.json diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskTwo.imageset/maskTwo.png b/LiquidGaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskTwo.imageset/maskTwo.png similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskTwo.imageset/maskTwo.png rename to LiquidGaugeDemo/Liquid-gaugeDemo/Images.xcassets/maskTwo.imageset/maskTwo.png diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/Info.plist b/LiquidGaugeDemo/Liquid-gaugeDemo/Info.plist similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/Info.plist rename to LiquidGaugeDemo/Liquid-gaugeDemo/Info.plist diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/contents.xcplayground b/LiquidGaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/contents.xcplayground similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/contents.xcplayground rename to LiquidGaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/contents.xcplayground diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/section-1.swift b/LiquidGaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/section-1.swift similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/section-1.swift rename to LiquidGaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/section-1.swift diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/timeline.xctimeline b/LiquidGaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/timeline.xctimeline similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/timeline.xctimeline rename to LiquidGaugeDemo/Liquid-gaugeDemo/MyPlayground.playground/timeline.xctimeline diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/ViewController.swift b/LiquidGaugeDemo/Liquid-gaugeDemo/ViewController.swift similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/ViewController.swift rename to LiquidGaugeDemo/Liquid-gaugeDemo/ViewController.swift diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemo/configuration.json b/LiquidGaugeDemo/Liquid-gaugeDemo/configuration.json similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemo/configuration.json rename to LiquidGaugeDemo/Liquid-gaugeDemo/configuration.json diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemoTests/Info.plist b/LiquidGaugeDemo/Liquid-gaugeDemoTests/Info.plist similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemoTests/Info.plist rename to LiquidGaugeDemo/Liquid-gaugeDemoTests/Info.plist diff --git a/Liquid-gaugeDemo/Liquid-gaugeDemoTests/Liquid_gaugeDemoTests.swift b/LiquidGaugeDemo/Liquid-gaugeDemoTests/Liquid_gaugeDemoTests.swift similarity index 100% rename from Liquid-gaugeDemo/Liquid-gaugeDemoTests/Liquid_gaugeDemoTests.swift rename to LiquidGaugeDemo/Liquid-gaugeDemoTests/Liquid_gaugeDemoTests.swift diff --git a/LiquidGaugeTests/Info.plist b/LiquidGaugeTests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/LiquidGaugeTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/LiquidGaugeTests/LiquidGaugeTests.swift b/LiquidGaugeTests/LiquidGaugeTests.swift new file mode 100644 index 0000000..2d586ed --- /dev/null +++ b/LiquidGaugeTests/LiquidGaugeTests.swift @@ -0,0 +1,36 @@ +// +// LiquidGaugeTests.swift +// LiquidGaugeTests +// +// Created by 和田 俊輔 on 2016/04/05. +// Copyright © 2016年 org.triplew. All rights reserved. +// + +import XCTest +@testable import LiquidGauge + +class LiquidGaugeTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measureBlock { + // Put the code you want to measure the time of here. + } + } + +}