Compare commits
63 Commits
1.5.0-beta1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| a51611e086 | |||
| e593fcfdd3 | |||
| ccac563a6d | |||
| 05d7ea54b7 | |||
| 488603e406 | |||
| b2cdaaa095 | |||
| 84ea211cdd | |||
| 146bb5811f | |||
| a7ab1885e2 | |||
| 11099e4240 | |||
| 06f166642e | |||
| d095f0663c | |||
| 43c20d9a81 | |||
| 8bf2b40707 | |||
| ba525189fb | |||
| 86dbfc98d4 | |||
| 1a0b0b90e5 | |||
| 2d1d00f381 | |||
| bec3dafb2c | |||
| 0aed134ea3 | |||
| cbe03ad40c | |||
| 0447a3d5eb | |||
| 9a74a70278 | |||
| 8e5a2cc59d | |||
| adb66054af | |||
| 5345928bfe | |||
| 33f6d27ff3 | |||
| 6f7a685c73 | |||
| 8aaa5325d3 | |||
| b7c304f9eb | |||
| 18690e9771 | |||
| f8d9edb269 | |||
| 03955bacfe | |||
| 7d05adf351 | |||
| a7644df9ba | |||
| f85ba09cc1 | |||
| af627388be | |||
| 6b2b815c8b | |||
| fbd7293f78 | |||
| ff704621e9 | |||
| 39b9e6bd1c | |||
| 797a5ba108 | |||
| 5e2d0a8d5a | |||
| 9cee5ecd92 | |||
| 087361dc92 | |||
| 441acb0ddb | |||
| 5609e781ef | |||
| 427d5d5592 | |||
| edeba04ff9 | |||
| f185b1f33d | |||
| 79bf0d3457 | |||
| 4f2cfc1687 | |||
| 174357710b | |||
| f10c403fc2 | |||
| 1e16600001 | |||
| 094a5a64e5 | |||
| 3c38489154 | |||
| 1d9ab519f1 | |||
| 60d95709c7 | |||
| 0e95379f6d | |||
| d15df140c4 | |||
| 63ae2ea28d | |||
| 36160ed532 |
@@ -1,6 +1,13 @@
|
||||
# Mac OS X
|
||||
.DS_Store
|
||||
|
||||
# Xcode
|
||||
#
|
||||
|
||||
## Build generated
|
||||
build/
|
||||
DerivedData
|
||||
|
||||
## Various settings
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
@@ -10,17 +17,23 @@ build/
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
|
||||
## Other
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
*.xcuserstate
|
||||
*.xcscmblueprint
|
||||
|
||||
## Obj-C/Swift specific
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.xcuserstate
|
||||
|
||||
# CocoaPods
|
||||
#
|
||||
# We recommend against adding the Pods directory to your .gitignore. However
|
||||
# you should judge for yourself, the pros and cons are mentioned at:
|
||||
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
|
||||
#
|
||||
# Pods/
|
||||
## Playgrounds
|
||||
timeline.xctimeline
|
||||
playground.xcworkspace
|
||||
|
||||
# Swift Package Manager
|
||||
.build/
|
||||
|
||||
# Carthage
|
||||
Carthage/Build
|
||||
@@ -0,0 +1 @@
|
||||
4.0
|
||||
|
Before Width: | Height: | Size: 861 KiB After Width: | Height: | Size: 861 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@@ -0,0 +1,398 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3CFA1D9A21720FB70094F95E /* KDCircularProgress.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC6FF0C71D92FEA9002E6571 /* KDCircularProgress.framework */; };
|
||||
3CFA1D9B21720FB70094F95E /* KDCircularProgress.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BC6FF0C71D92FEA9002E6571 /* KDCircularProgress.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
BC5B0C1D1D92F75600B43506 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC5B0C1C1D92F75600B43506 /* AppDelegate.swift */; };
|
||||
BC5B0C1F1D92F75600B43506 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC5B0C1E1D92F75600B43506 /* ViewController.swift */; };
|
||||
BC5B0C221D92F75600B43506 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC5B0C201D92F75600B43506 /* Main.storyboard */; };
|
||||
BC5B0C241D92F75600B43506 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BC5B0C231D92F75600B43506 /* Assets.xcassets */; };
|
||||
BC5B0C271D92F75600B43506 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC5B0C251D92F75600B43506 /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
3CFA1D9C21720FB70094F95E /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = BC5B0C2E1D92F76E00B43506 /* KDCircularProgress.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = BC5B0BE71D92F4FA00B43506;
|
||||
remoteInfo = "KDCircularProgress iOS";
|
||||
};
|
||||
BC6FF0C61D92FEA9002E6571 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = BC5B0C2E1D92F76E00B43506 /* KDCircularProgress.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = BC5B0BE81D92F4FA00B43506;
|
||||
remoteInfo = "KDCircularProgress iOS";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
3CFA1D9E21720FB70094F95E /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
3CFA1D9B21720FB70094F95E /* KDCircularProgress.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
BC5B0C191D92F75600B43506 /* iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BC5B0C1C1D92F75600B43506 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
BC5B0C1E1D92F75600B43506 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
BC5B0C211D92F75600B43506 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
BC5B0C231D92F75600B43506 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
BC5B0C261D92F75600B43506 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
BC5B0C281D92F75600B43506 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
BC5B0C2E1D92F76E00B43506 /* KDCircularProgress.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = KDCircularProgress.xcodeproj; path = ../../KDCircularProgress.xcodeproj; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
BC5B0C161D92F75600B43506 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3CFA1D9A21720FB70094F95E /* KDCircularProgress.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
BC5B0C101D92F75600B43506 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC5B0C1B1D92F75600B43506 /* iOS Example */,
|
||||
BC5B0C1A1D92F75600B43506 /* Products */,
|
||||
BC5B0C2E1D92F76E00B43506 /* KDCircularProgress.xcodeproj */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC5B0C1A1D92F75600B43506 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC5B0C191D92F75600B43506 /* iOS Example.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC5B0C1B1D92F75600B43506 /* iOS Example */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC5B0C1C1D92F75600B43506 /* AppDelegate.swift */,
|
||||
BC5B0C1E1D92F75600B43506 /* ViewController.swift */,
|
||||
BC5B0C201D92F75600B43506 /* Main.storyboard */,
|
||||
BC5B0C231D92F75600B43506 /* Assets.xcassets */,
|
||||
BC5B0C251D92F75600B43506 /* LaunchScreen.storyboard */,
|
||||
BC5B0C281D92F75600B43506 /* Info.plist */,
|
||||
);
|
||||
path = "iOS Example";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC6FF0C21D92FEA8002E6571 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC6FF0C71D92FEA9002E6571 /* KDCircularProgress.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
BC5B0C181D92F75600B43506 /* iOS Example */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = BC5B0C2B1D92F75600B43506 /* Build configuration list for PBXNativeTarget "iOS Example" */;
|
||||
buildPhases = (
|
||||
BC5B0C151D92F75600B43506 /* Sources */,
|
||||
BC5B0C161D92F75600B43506 /* Frameworks */,
|
||||
BC5B0C171D92F75600B43506 /* Resources */,
|
||||
3CFA1D9E21720FB70094F95E /* Embed Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3CFA1D9D21720FB70094F95E /* PBXTargetDependency */,
|
||||
);
|
||||
name = "iOS Example";
|
||||
productName = "iOS Example";
|
||||
productReference = BC5B0C191D92F75600B43506 /* iOS Example.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
BC5B0C111D92F75600B43506 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0800;
|
||||
LastUpgradeCheck = 1000;
|
||||
ORGANIZATIONNAME = "Kaan Dedeoglu";
|
||||
TargetAttributes = {
|
||||
BC5B0C181D92F75600B43506 = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
LastSwiftMigration = 1020;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = BC5B0C141D92F75600B43506 /* Build configuration list for PBXProject "iOS Example" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = BC5B0C101D92F75600B43506;
|
||||
productRefGroup = BC5B0C1A1D92F75600B43506 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = BC6FF0C21D92FEA8002E6571 /* Products */;
|
||||
ProjectRef = BC5B0C2E1D92F76E00B43506 /* KDCircularProgress.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
BC5B0C181D92F75600B43506 /* iOS Example */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
BC6FF0C71D92FEA9002E6571 /* KDCircularProgress.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = KDCircularProgress.framework;
|
||||
remoteRef = BC6FF0C61D92FEA9002E6571 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
BC5B0C171D92F75600B43506 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BC5B0C271D92F75600B43506 /* LaunchScreen.storyboard in Resources */,
|
||||
BC5B0C241D92F75600B43506 /* Assets.xcassets in Resources */,
|
||||
BC5B0C221D92F75600B43506 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
BC5B0C151D92F75600B43506 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BC5B0C1F1D92F75600B43506 /* ViewController.swift in Sources */,
|
||||
BC5B0C1D1D92F75600B43506 /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
3CFA1D9D21720FB70094F95E /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = "KDCircularProgress iOS";
|
||||
targetProxy = 3CFA1D9C21720FB70094F95E /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
BC5B0C201D92F75600B43506 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
BC5B0C211D92F75600B43506 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC5B0C251D92F75600B43506 /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
BC5B0C261D92F75600B43506 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
BC5B0C291D92F75600B43506 /* 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_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_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_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
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 = 10.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
BC5B0C2A1D92F75600B43506 /* 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_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_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_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
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 = 10.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
BC5B0C2C1D92F75600B43506 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = "iOS Example/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.kaandedeoglu.KDCircularProgress.iOS-Example";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
BC5B0C2D1D92F75600B43506 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = "iOS Example/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.kaandedeoglu.KDCircularProgress.iOS-Example";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
BC5B0C141D92F75600B43506 /* Build configuration list for PBXProject "iOS Example" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
BC5B0C291D92F75600B43506 /* Debug */,
|
||||
BC5B0C2A1D92F75600B43506 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
BC5B0C2B1D92F75600B43506 /* Build configuration list for PBXNativeTarget "iOS Example" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
BC5B0C2C1D92F75600B43506 /* Debug */,
|
||||
BC5B0C2D1D92F75600B43506 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = BC5B0C111D92F75600B43506 /* Project object */;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
//
|
||||
// AppDelegate.swift
|
||||
// KDCircularProgressExample
|
||||
// iOS Example
|
||||
//
|
||||
// Created by Kaan Dedeoglu on 2/12/15.
|
||||
// Copyright (c) 2015 Kaan Dedeoglu. All rights reserved.
|
||||
// Created by Kaan Dedeoglu on 9/21/16.
|
||||
// Copyright © 2016 Kaan Dedeoglu. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
@@ -14,14 +14,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
// Override point for customization after application launch.
|
||||
return true
|
||||
}
|
||||
|
||||
func applicationWillResignActive(_ application: UIApplication) {
|
||||
// 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.
|
||||
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
func applicationDidEnterBackground(_ application: UIApplication) {
|
||||
@@ -30,7 +30,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
}
|
||||
|
||||
func applicationWillEnterForeground(_ application: UIApplication) {
|
||||
// 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.
|
||||
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@@ -1,68 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16A319" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="9wL-Dp-scG">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="ufC-wZ-h7g">
|
||||
<scene sceneID="Fjt-bB-ckB">
|
||||
<objects>
|
||||
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="KDCircularProgressExample" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<viewController id="9wL-Dp-scG" customClass="ViewController" customModule="iOS_Example" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="ghF-CJ-0yv"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="o67-py-2aK"/>
|
||||
<viewControllerLayoutGuide type="top" id="g4C-sr-w9g"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="yjB-on-Hkq"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<view key="view" contentMode="scaleToFill" id="nbo-Tj-Bre">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="360" translatesAutoresizingMaskIntoConstraints="NO" id="BHN-x6-Zsx">
|
||||
<rect key="frame" x="61" y="478" width="198" height="31"/>
|
||||
<animations/>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="360" translatesAutoresizingMaskIntoConstraints="NO" id="GNJ-D7-iKp">
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="6DH-hv-h4S"/>
|
||||
<constraint firstAttribute="width" constant="194" id="oTI-kD-sOa"/>
|
||||
<constraint firstAttribute="width" constant="194" id="Ngq-EV-BQc"/>
|
||||
<constraint firstAttribute="height" constant="30" id="i7l-jw-4bx"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<action selector="sliderDidChangeValue:" destination="vXZ-lx-hvc" eventType="valueChanged" id="Wfm-n6-qzL"/>
|
||||
<action selector="sliderDidChangeValue:" destination="9wL-Dp-scG" eventType="valueChanged" id="NsE-GI-Orr"/>
|
||||
</connections>
|
||||
</slider>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5M2-Yi-RuL">
|
||||
<rect key="frame" x="112" y="523" width="96" height="30"/>
|
||||
<animations/>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9ev-GJ-qTG">
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="96" id="T9z-qf-POZ"/>
|
||||
<constraint firstAttribute="height" constant="30" id="h5a-bV-EMl"/>
|
||||
<constraint firstAttribute="width" constant="96" id="Zrl-Sg-9Zb"/>
|
||||
<constraint firstAttribute="height" constant="30" id="xHF-qf-Hbd"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Animate">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="animateButtonTapped:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="b0F-cY-phl"/>
|
||||
<action selector="animateButtonTapped:" destination="9wL-Dp-scG" eventType="touchUpInside" id="Av2-DJ-CaL"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wev-Tz-pfW" customClass="KDCircularProgress" customModule="KDCircularProgressExample" customModuleProvider="target">
|
||||
<rect key="frame" x="60" y="20" width="200" height="200"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UvS-lo-pbU" customClass="KDCircularProgress" customModule="KDCircularProgress">
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="200" id="191-H5-EIc"/>
|
||||
<constraint firstAttribute="width" secondItem="wev-Tz-pfW" secondAttribute="height" multiplier="1:1" id="Fsf-y4-1ta"/>
|
||||
<constraint firstAttribute="width" secondItem="UvS-lo-pbU" secondAttribute="height" multiplier="1:1" id="uuX-Hh-HwZ"/>
|
||||
<constraint firstAttribute="width" constant="200" id="zDC-WB-HLr"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="angle">
|
||||
<integer key="value" value="320"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="IBColor1">
|
||||
<color key="value" red="0.97441762909999996" green="1" blue="0.31255436479999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="0.97441762909999996" green="1" blue="0.31255436479999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="IBColor2">
|
||||
<color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="IBColor3">
|
||||
<color key="value" red="0.085719833812801863" green="0.98039215690000003" blue="0.39604470297983985" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="0.085719833810000007" green="0.98039215690000003" blue="0.396044703" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="startAngle">
|
||||
<integer key="value" value="-90"/>
|
||||
@@ -84,21 +79,20 @@
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.4736600907821229" green="0.4736600907821229" blue="0.4736600907821229" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" red="0.47366009079999999" green="0.47366009079999999" blue="0.47366009079999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="BHN-x6-Zsx" secondAttribute="centerX" id="Arq-5P-YRp"/>
|
||||
<constraint firstItem="wev-Tz-pfW" firstAttribute="top" secondItem="ghF-CJ-0yv" secondAttribute="bottom" id="EcI-a0-AkN"/>
|
||||
<constraint firstItem="5M2-Yi-RuL" firstAttribute="top" secondItem="BHN-x6-Zsx" secondAttribute="bottom" constant="15" id="GMQ-0i-VMb"/>
|
||||
<constraint firstAttribute="centerX" secondItem="5M2-Yi-RuL" secondAttribute="centerX" id="IEH-Lm-rgx"/>
|
||||
<constraint firstAttribute="centerX" secondItem="wev-Tz-pfW" secondAttribute="centerX" id="jKJ-82-cfb"/>
|
||||
<constraint firstItem="o67-py-2aK" firstAttribute="top" secondItem="5M2-Yi-RuL" secondAttribute="bottom" constant="15" id="zhX-dr-Rnn"/>
|
||||
<constraint firstAttribute="centerX" secondItem="9ev-GJ-qTG" secondAttribute="centerX" id="9yk-kN-NUL"/>
|
||||
<constraint firstItem="yjB-on-Hkq" firstAttribute="top" secondItem="9ev-GJ-qTG" secondAttribute="bottom" constant="15" id="DSI-Wt-vfI"/>
|
||||
<constraint firstAttribute="centerX" secondItem="UvS-lo-pbU" secondAttribute="centerX" id="FlC-G1-Xy3"/>
|
||||
<constraint firstItem="UvS-lo-pbU" firstAttribute="top" secondItem="g4C-sr-w9g" secondAttribute="bottom" id="dqi-TN-cym"/>
|
||||
<constraint firstAttribute="centerX" secondItem="GNJ-D7-iKp" secondAttribute="centerX" id="p8v-RV-Bqd"/>
|
||||
<constraint firstItem="9ev-GJ-qTG" firstAttribute="top" secondItem="GNJ-D7-iKp" secondAttribute="bottom" constant="15" id="wOd-cK-tlp"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="CFY-zW-EEf" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="410" y="396"/>
|
||||
<point key="canvasLocation" x="-370" y="104"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.kaandedeoglu.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
@@ -16,8 +16,6 @@
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
@@ -1,12 +1,13 @@
|
||||
//
|
||||
// ViewController.swift
|
||||
// KDCircularProgressExample
|
||||
// iOS Example
|
||||
//
|
||||
// Created by Kaan Dedeoglu on 2/12/15.
|
||||
// Copyright (c) 2015 Kaan Dedeoglu. All rights reserved.
|
||||
// Created by Kaan Dedeoglu on 9/21/16.
|
||||
// Copyright © 2016 Kaan Dedeoglu. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import KDCircularProgress
|
||||
|
||||
class ViewController: UIViewController {
|
||||
var progress: KDCircularProgress!
|
||||
@@ -24,7 +25,7 @@ class ViewController: UIViewController {
|
||||
progress.roundedCorners = false
|
||||
progress.glowMode = .forward
|
||||
progress.glowAmount = 0.9
|
||||
progress.setColors(colors: UIColor.cyan() ,UIColor.white(), UIColor.magenta(), UIColor.white(), UIColor.orange())
|
||||
progress.set(colors: UIColor.cyan ,UIColor.white, UIColor.magenta, UIColor.white, UIColor.orange)
|
||||
progress.center = CGPoint(x: view.center.x, y: view.center.y + 25)
|
||||
view.addSubview(progress)
|
||||
}
|
||||
@@ -44,3 +45,4 @@ class ViewController: UIViewController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'KDCircularProgress'
|
||||
s.version = '1.4.0'
|
||||
s.version = '1.5.4'
|
||||
s.license = 'MIT'
|
||||
s.summary = 'A circular progress view with gradients written in Swift'
|
||||
s.homepage = 'https://github.com/kaandedeoglu/KDCircularProgress'
|
||||
s.authors = { 'Kaan Dedeoglu' => 'kaandedeoglu@me.com' }
|
||||
s.source = { :git => 'https://github.com/kaandedeoglu/KDCircularProgress.git', :tag => s.version }
|
||||
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.ios.deployment_target = '9.0'
|
||||
|
||||
s.source_files = 'KDCircularProgress/*.swift'
|
||||
s.requires_arc = true
|
||||
|
||||
@@ -0,0 +1,357 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
BC5B0BED1D92F4FA00B43506 /* KDCircularProgress.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5B0BEB1D92F4FA00B43506 /* KDCircularProgress.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
BC5B0BF11D92F50000B43506 /* KDCircularProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC5B0BE11D92F4AF00B43506 /* KDCircularProgress.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
BC5B0BE11D92F4AF00B43506 /* KDCircularProgress.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = KDCircularProgress.swift; path = KDCircularProgress/KDCircularProgress.swift; sourceTree = "<group>"; };
|
||||
BC5B0BE81D92F4FA00B43506 /* KDCircularProgress.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = KDCircularProgress.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BC5B0BEB1D92F4FA00B43506 /* KDCircularProgress.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = KDCircularProgress.h; path = KDCircularProgress/KDCircularProgress.h; sourceTree = "<group>"; };
|
||||
BC5B0BEC1D92F4FA00B43506 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = KDCircularProgress/Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
BC5B0BE41D92F4FA00B43506 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
BC5B0BD81D92F42D00B43506 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC5B0BDF1D92F46F00B43506 /* Sources */,
|
||||
BC5B0BE91D92F4FA00B43506 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC5B0BDF1D92F46F00B43506 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC5B0BE11D92F4AF00B43506 /* KDCircularProgress.swift */,
|
||||
BC5B0BEB1D92F4FA00B43506 /* KDCircularProgress.h */,
|
||||
BC5B0BEC1D92F4FA00B43506 /* Info.plist */,
|
||||
);
|
||||
name = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC5B0BE91D92F4FA00B43506 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC5B0BE81D92F4FA00B43506 /* KDCircularProgress.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
BC5B0BE51D92F4FA00B43506 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BC5B0BED1D92F4FA00B43506 /* KDCircularProgress.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
BC5B0BE71D92F4FA00B43506 /* KDCircularProgress iOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = BC5B0BEE1D92F4FA00B43506 /* Build configuration list for PBXNativeTarget "KDCircularProgress iOS" */;
|
||||
buildPhases = (
|
||||
BC5B0BE31D92F4FA00B43506 /* Sources */,
|
||||
BC5B0BE41D92F4FA00B43506 /* Frameworks */,
|
||||
BC5B0BE51D92F4FA00B43506 /* Headers */,
|
||||
BC5B0BE61D92F4FA00B43506 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "KDCircularProgress iOS";
|
||||
productName = "KDCircularProgress iOS";
|
||||
productReference = BC5B0BE81D92F4FA00B43506 /* KDCircularProgress.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
BC5B0BD91D92F42D00B43506 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1000;
|
||||
TargetAttributes = {
|
||||
BC5B0BE71D92F4FA00B43506 = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
LastSwiftMigration = 1020;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = BC5B0BDC1D92F42D00B43506 /* Build configuration list for PBXProject "KDCircularProgress" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = BC5B0BD81D92F42D00B43506;
|
||||
productRefGroup = BC5B0BE91D92F4FA00B43506 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
BC5B0BE71D92F4FA00B43506 /* KDCircularProgress iOS */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
BC5B0BE61D92F4FA00B43506 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
BC5B0BE31D92F4FA00B43506 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BC5B0BF11D92F50000B43506 /* KDCircularProgress.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
BC5B0BDD1D92F42D00B43506 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
BC5B0BDE1D92F42D00B43506 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
BC5B0BEF1D92F4FA00B43506 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES_NONAGGRESSIVE;
|
||||
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_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_MOVES = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
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;
|
||||
INFOPLIST_FILE = KDCircularProgress/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = kaandedeoglu.KDCircularProgress;
|
||||
PRODUCT_NAME = KDCircularProgress;
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
BC5B0BF01D92F4FA00B43506 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES_NONAGGRESSIVE;
|
||||
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_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_MOVES = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
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;
|
||||
INFOPLIST_FILE = KDCircularProgress/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = kaandedeoglu.KDCircularProgress;
|
||||
PRODUCT_NAME = KDCircularProgress;
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
BC5B0BDC1D92F42D00B43506 /* Build configuration list for PBXProject "KDCircularProgress" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
BC5B0BDD1D92F42D00B43506 /* Debug */,
|
||||
BC5B0BDE1D92F42D00B43506 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
BC5B0BEE1D92F4FA00B43506 /* Build configuration list for PBXNativeTarget "KDCircularProgress iOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
BC5B0BEF1D92F4FA00B43506 /* Debug */,
|
||||
BC5B0BF01D92F4FA00B43506 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = BC5B0BD91D92F42D00B43506 /* Project object */;
|
||||
}
|
||||
@@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:KDCircularProgressExample.xcodeproj">
|
||||
location = "self:KDCircularProgress.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1000"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "BC5B0BE71D92F4FA00B43506"
|
||||
BuildableName = "KDCircularProgress.framework"
|
||||
BlueprintName = "KDCircularProgress iOS"
|
||||
ReferencedContainer = "container:KDCircularProgress.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "BC5B0BE71D92F4FA00B43506"
|
||||
BuildableName = "KDCircularProgress.framework"
|
||||
BlueprintName = "KDCircularProgress iOS"
|
||||
ReferencedContainer = "container:KDCircularProgress.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "BC5B0BE71D92F4FA00B43506"
|
||||
BuildableName = "KDCircularProgress.framework"
|
||||
BlueprintName = "KDCircularProgress iOS"
|
||||
ReferencedContainer = "container:KDCircularProgress.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "container:KDCircularProgress.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Example/iOS Example/iOS Example.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -7,18 +7,18 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.kaandedeoglu.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<string>1.5.4</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// KDCircularProgress iOS.h
|
||||
// KDCircularProgress iOS
|
||||
//
|
||||
// Copyright (c) 2019 Kaan Dedeoglu. All rights reserved.
|
||||
//
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for KDCircularProgress.
|
||||
FOUNDATION_EXPORT double KDCircularProgressVersionNumber;
|
||||
|
||||
//! Project version string for KDCircularProgress.
|
||||
FOUNDATION_EXPORT const unsigned char KDCircularProgressVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <KDCircularProgress/PublicHeader.h>
|
||||
|
||||
|
||||
@@ -2,96 +2,45 @@
|
||||
// KDCircularProgress.swift
|
||||
// KDCircularProgress
|
||||
//
|
||||
// Created by Kaan Dedeoglu on 1/14/15.
|
||||
// Copyright (c) 2015 Kaan Dedeoglu. All rights reserved.
|
||||
// Copyright (c) 2019 Kaan Dedeoglu. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
public enum KDCircularProgressGlowMode {
|
||||
@objc public enum KDCircularProgressGlowMode: Int {
|
||||
case forward, reverse, constant, noGlow
|
||||
}
|
||||
|
||||
@IBDesignable
|
||||
public class KDCircularProgress: UIView {
|
||||
|
||||
private struct Conversion {
|
||||
static func degreesToRadians (value:CGFloat) -> CGFloat {
|
||||
return value * CGFloat.pi / 180.0
|
||||
}
|
||||
}
|
||||
|
||||
private struct Utility {
|
||||
static func clamp<T: Comparable>(value: T, minMax: (T, T)) -> T {
|
||||
let (min, max) = minMax
|
||||
if value < min {
|
||||
return min
|
||||
} else if value > max {
|
||||
return max
|
||||
} else {
|
||||
return value
|
||||
}
|
||||
}
|
||||
|
||||
static func inverseLerp(value: CGFloat, minMax: (CGFloat, CGFloat)) -> CGFloat {
|
||||
return (value - minMax.0) / (minMax.1 - minMax.0)
|
||||
}
|
||||
|
||||
static func lerp(value: CGFloat, minMax: (CGFloat, CGFloat)) -> CGFloat {
|
||||
return (minMax.1 - minMax.0) * value + minMax.0
|
||||
}
|
||||
|
||||
static func colorLerp(value: CGFloat, minMax: (UIColor, UIColor)) -> UIColor {
|
||||
let clampedValue = clamp(value: value, minMax: (0, 1))
|
||||
|
||||
let zero: CGFloat = 0
|
||||
|
||||
var (r0, g0, b0, a0) = (zero, zero, zero, zero)
|
||||
minMax.0.getRed(&r0, green: &g0, blue: &b0, alpha: &a0)
|
||||
|
||||
var (r1, g1, b1, a1) = (zero, zero, zero, zero)
|
||||
minMax.1.getRed(&r1, green: &g1, blue: &b1, alpha: &a1)
|
||||
|
||||
return UIColor(red: lerp(value: clampedValue, minMax: (r0, r1)), green: lerp(value: clampedValue, minMax: (g0, g1)), blue: lerp(value: clampedValue, minMax: (b0, b1)), alpha: lerp(value: clampedValue, minMax: (a0, a1)))
|
||||
}
|
||||
|
||||
static func mod(value: Double, range: Double, minMax: (Double, Double)) -> Double {
|
||||
let (min, max) = minMax
|
||||
assert(abs(range) <= abs(max - min), "range should be <= than the interval")
|
||||
if value >= min && value <= max {
|
||||
return value
|
||||
} else if value < min {
|
||||
return mod(value: value + range, range: range, minMax: minMax)
|
||||
} else {
|
||||
return mod(value: value - range, range: range, minMax: minMax)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@objcMembers
|
||||
public class KDCircularProgress: UIView, CAAnimationDelegate {
|
||||
private var progressLayer: KDCircularProgressViewLayer {
|
||||
get {
|
||||
return layer as! KDCircularProgressViewLayer
|
||||
}
|
||||
}
|
||||
|
||||
private var radius: CGFloat! {
|
||||
private var radius: CGFloat = 0.0 {
|
||||
didSet {
|
||||
progressLayer.radius = radius
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var angle: Double = 0 {
|
||||
public var progress: Double {
|
||||
get { return angle.mod(between: 0.0, and: 360.0, byIncrementing: 360.0) / 360.0 }
|
||||
set { angle = newValue.clamp(lowerBound: 0.0, upperBound: 1.0) * 360.0 }
|
||||
}
|
||||
|
||||
@IBInspectable public var angle: Double = 0.0 {
|
||||
didSet {
|
||||
if self.isAnimating() {
|
||||
self.pauseAnimation()
|
||||
}
|
||||
pauseIfAnimating()
|
||||
progressLayer.angle = angle
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var startAngle: Double = 0 {
|
||||
@IBInspectable public var startAngle: Double = 0.0 {
|
||||
didSet {
|
||||
startAngle = Utility.mod(value: startAngle, range: 360, minMax: (0, 360))
|
||||
startAngle = startAngle.mod(between: 0.0, and: 360.0, byIncrementing: 360.0)
|
||||
progressLayer.startAngle = startAngle
|
||||
progressLayer.setNeedsDisplay()
|
||||
}
|
||||
@@ -116,40 +65,40 @@ public class KDCircularProgress: UIView {
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var gradientRotateSpeed: CGFloat = 0 {
|
||||
@IBInspectable public var gradientRotateSpeed: CGFloat = 0.0 {
|
||||
didSet {
|
||||
progressLayer.gradientRotateSpeed = gradientRotateSpeed
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var glowAmount: CGFloat = 1.0 {//Between 0 and 1
|
||||
@IBInspectable public var glowAmount: CGFloat = 1.0 {
|
||||
didSet {
|
||||
glowAmount = Utility.clamp(value: glowAmount, minMax: (0, 1))
|
||||
glowAmount = glowAmount.clamp(lowerBound: 0.0, upperBound: 1.0)
|
||||
progressLayer.glowAmount = glowAmount
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var glowMode: KDCircularProgressGlowMode = .forward {
|
||||
public var glowMode: KDCircularProgressGlowMode = .forward {
|
||||
didSet {
|
||||
progressLayer.glowMode = glowMode
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var progressThickness: CGFloat = 0.4 {//Between 0 and 1
|
||||
@IBInspectable public var progressThickness: CGFloat = 0.4 {
|
||||
didSet {
|
||||
progressThickness = Utility.clamp(value: progressThickness, minMax: (0, 1))
|
||||
progressLayer.progressThickness = progressThickness/2
|
||||
progressThickness = progressThickness.clamp(lowerBound: 0.0, upperBound: 1.0)
|
||||
progressLayer.progressThickness = progressThickness / 2.0
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var trackThickness: CGFloat = 0.5 {//Between 0 and 1
|
||||
didSet {
|
||||
trackThickness = Utility.clamp(value: trackThickness, minMax: (0, 1))
|
||||
progressLayer.trackThickness = trackThickness/2
|
||||
trackThickness = trackThickness.clamp(lowerBound: 0.0, upperBound: 1.0)
|
||||
progressLayer.trackThickness = trackThickness / 2.0
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var trackColor: UIColor = .black() {
|
||||
@IBInspectable public var trackColor: UIColor = .black {
|
||||
didSet {
|
||||
progressLayer.trackColor = trackColor
|
||||
progressLayer.setNeedsDisplay()
|
||||
@@ -158,22 +107,13 @@ public class KDCircularProgress: UIView {
|
||||
|
||||
@IBInspectable public var progressInsideFillColor: UIColor? = nil {
|
||||
didSet {
|
||||
if let color = progressInsideFillColor {
|
||||
progressLayer.progressInsideFillColor = color
|
||||
} else {
|
||||
progressLayer.progressInsideFillColor = .clear()
|
||||
}
|
||||
progressLayer.progressInsideFillColor = progressInsideFillColor ?? .clear
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var progressColors: [UIColor]! {
|
||||
get {
|
||||
return progressLayer.colorsArray
|
||||
}
|
||||
|
||||
set(newValue) {
|
||||
setColors(colors: newValue)
|
||||
}
|
||||
public var progressColors: [UIColor] {
|
||||
get { return progressLayer.colorsArray }
|
||||
set { set(colors: newValue) }
|
||||
}
|
||||
|
||||
//These are used only from the Interface-Builder. Changing these from code will have no effect.
|
||||
@@ -186,21 +126,18 @@ public class KDCircularProgress: UIView {
|
||||
|
||||
override public init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
isUserInteractionEnabled = false
|
||||
setInitialValues()
|
||||
refreshValues()
|
||||
checkAndSetIBColors()
|
||||
}
|
||||
|
||||
convenience public init(frame:CGRect, colors: UIColor...) {
|
||||
self.init(frame: frame)
|
||||
setColors(colors: colors)
|
||||
set(colors: colors)
|
||||
}
|
||||
|
||||
required public init(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)!
|
||||
required public init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
translatesAutoresizingMaskIntoConstraints = false
|
||||
isUserInteractionEnabled = false
|
||||
setInitialValues()
|
||||
refreshValues()
|
||||
}
|
||||
@@ -209,19 +146,19 @@ public class KDCircularProgress: UIView {
|
||||
checkAndSetIBColors()
|
||||
}
|
||||
|
||||
override public class func layerClass() -> AnyClass {
|
||||
override public class var layerClass: AnyClass {
|
||||
return KDCircularProgressViewLayer.self
|
||||
}
|
||||
|
||||
public override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
radius = (frame.size.width/2.0) * 0.8
|
||||
radius = (frame.size.width / 2.0) * 0.8
|
||||
}
|
||||
|
||||
private func setInitialValues() {
|
||||
radius = (frame.size.width/2.0) * 0.8 //We always apply a 20% padding, stopping glows from being clipped
|
||||
backgroundColor = .clear()
|
||||
setColors(colors: .white(), .cyan())
|
||||
radius = (frame.size.width / 2.0) * 0.8 //We always apply a 20% padding, stopping glows from being clipped
|
||||
backgroundColor = .clear
|
||||
set(colors: .white, .cyan)
|
||||
}
|
||||
|
||||
private func refreshValues() {
|
||||
@@ -233,46 +170,44 @@ public class KDCircularProgress: UIView {
|
||||
progressLayer.gradientRotateSpeed = gradientRotateSpeed
|
||||
progressLayer.glowAmount = glowAmount
|
||||
progressLayer.glowMode = glowMode
|
||||
progressLayer.progressThickness = progressThickness/2
|
||||
progressLayer.progressThickness = progressThickness / 2.0
|
||||
progressLayer.trackColor = trackColor
|
||||
progressLayer.trackThickness = trackThickness/2
|
||||
progressLayer.trackThickness = trackThickness / 2.0
|
||||
}
|
||||
|
||||
private func checkAndSetIBColors() {
|
||||
let nonNilColors = [IBColor1, IBColor2, IBColor3].flatMap { $0 }
|
||||
if !nonNilColors.isEmpty {
|
||||
setColors(colors: nonNilColors)
|
||||
let IBColors = [IBColor1, IBColor2, IBColor3].compactMap { $0 }
|
||||
if IBColors.isEmpty == false {
|
||||
set(colors: IBColors)
|
||||
}
|
||||
}
|
||||
|
||||
public func setColors(colors: UIColor...) {
|
||||
setColors(colors: colors)
|
||||
public func set(colors: UIColor...) {
|
||||
set(colors: colors)
|
||||
}
|
||||
|
||||
private func setColors(colors: [UIColor]) {
|
||||
private func set(colors: [UIColor]) {
|
||||
progressLayer.colorsArray = colors
|
||||
progressLayer.setNeedsDisplay()
|
||||
}
|
||||
|
||||
public func animate(fromAngle: Double, toAngle: Double, duration: TimeInterval, relativeDuration: Bool = true, completion: ((Bool) -> Void)?) {
|
||||
if isAnimating() {
|
||||
pauseAnimation()
|
||||
}
|
||||
|
||||
pauseIfAnimating()
|
||||
let animationDuration: TimeInterval
|
||||
if relativeDuration {
|
||||
animationDuration = duration
|
||||
} else {
|
||||
let traveledAngle = Utility.mod(value: toAngle - fromAngle, range: 360, minMax: (0, 360))
|
||||
let scaledDuration = (TimeInterval(traveledAngle) * duration) / 360
|
||||
let traveledAngle = (toAngle - fromAngle).mod(between: 0.0, and: 360.0, byIncrementing: 360.0)
|
||||
let scaledDuration = TimeInterval(traveledAngle) * duration / 360.0
|
||||
animationDuration = scaledDuration
|
||||
}
|
||||
|
||||
let animation = CABasicAnimation(keyPath: "angle")
|
||||
let animation = CABasicAnimation(keyPath: #keyPath(KDCircularProgressViewLayer.angle))
|
||||
animation.fromValue = fromAngle
|
||||
animation.toValue = toAngle
|
||||
animation.duration = animationDuration
|
||||
animation.delegate = self
|
||||
animation.isRemovedOnCompletion = false
|
||||
angle = toAngle
|
||||
animationCompletionBlock = completion
|
||||
|
||||
@@ -280,9 +215,7 @@ public class KDCircularProgress: UIView {
|
||||
}
|
||||
|
||||
public func animate(toAngle: Double, duration: TimeInterval, relativeDuration: Bool = true, completion: ((Bool) -> Void)?) {
|
||||
if isAnimating() {
|
||||
pauseAnimation()
|
||||
}
|
||||
pauseIfAnimating()
|
||||
animate(fromAngle: angle, toAngle: toAngle, duration: duration, relativeDuration: relativeDuration, completion: completion)
|
||||
}
|
||||
|
||||
@@ -291,12 +224,16 @@ public class KDCircularProgress: UIView {
|
||||
|
||||
let currentValue = presentationLayer.angle
|
||||
progressLayer.removeAllAnimations()
|
||||
animationCompletionBlock = nil
|
||||
angle = currentValue
|
||||
}
|
||||
|
||||
private func pauseIfAnimating() {
|
||||
if isAnimating() {
|
||||
pauseAnimation()
|
||||
}
|
||||
}
|
||||
|
||||
public func stopAnimation() {
|
||||
animationCompletionBlock = nil
|
||||
progressLayer.removeAllAnimations()
|
||||
angle = 0
|
||||
}
|
||||
@@ -305,22 +242,18 @@ public class KDCircularProgress: UIView {
|
||||
return progressLayer.animation(forKey: "angle") != nil
|
||||
}
|
||||
|
||||
override public func animationDidStop(_ anim: CAAnimation, finished flag: Bool) {
|
||||
if let completionBlock = animationCompletionBlock {
|
||||
completionBlock(flag)
|
||||
animationCompletionBlock = nil
|
||||
}
|
||||
public func animationDidStop(_ anim: CAAnimation, finished flag: Bool) {
|
||||
animationCompletionBlock?(flag)
|
||||
animationCompletionBlock = nil
|
||||
}
|
||||
|
||||
public override func didMoveToWindow() {
|
||||
if let window = window {
|
||||
progressLayer.contentsScale = window.screen.scale
|
||||
}
|
||||
window.map { progressLayer.contentsScale = $0.screen.scale }
|
||||
}
|
||||
|
||||
public override func willMove(toSuperview newSuperview: UIView?) {
|
||||
if newSuperview == nil && isAnimating() {
|
||||
pauseAnimation()
|
||||
if newSuperview == nil {
|
||||
pauseIfAnimating()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,50 +266,44 @@ public class KDCircularProgress: UIView {
|
||||
|
||||
private class KDCircularProgressViewLayer: CALayer {
|
||||
@NSManaged var angle: Double
|
||||
var radius: CGFloat! {
|
||||
didSet {
|
||||
invalidateGradientCache()
|
||||
}
|
||||
var radius: CGFloat = 0.0 {
|
||||
didSet { invalidateGradientCache() }
|
||||
}
|
||||
var startAngle: Double!
|
||||
var clockwise: Bool! {
|
||||
var startAngle: Double = 0.0
|
||||
var clockwise: Bool = true {
|
||||
didSet {
|
||||
if clockwise != oldValue {
|
||||
invalidateGradientCache()
|
||||
}
|
||||
}
|
||||
}
|
||||
var roundedCorners: Bool!
|
||||
var lerpColorMode: Bool!
|
||||
var gradientRotateSpeed: CGFloat! {
|
||||
didSet {
|
||||
invalidateGradientCache()
|
||||
}
|
||||
var roundedCorners: Bool = true
|
||||
var lerpColorMode: Bool = false
|
||||
var gradientRotateSpeed: CGFloat = 0.0 {
|
||||
didSet { invalidateGradientCache() }
|
||||
}
|
||||
var glowAmount: CGFloat!
|
||||
var glowMode: KDCircularProgressGlowMode!
|
||||
var progressThickness: CGFloat!
|
||||
var trackThickness: CGFloat!
|
||||
var trackColor: UIColor!
|
||||
var progressInsideFillColor = UIColor.clear()
|
||||
var colorsArray: [UIColor]! {
|
||||
didSet {
|
||||
invalidateGradientCache()
|
||||
}
|
||||
var glowAmount: CGFloat = 0.0
|
||||
var glowMode: KDCircularProgressGlowMode = .forward
|
||||
var progressThickness: CGFloat = 0.5
|
||||
var trackThickness: CGFloat = 0.5
|
||||
var trackColor: UIColor = .black
|
||||
var progressInsideFillColor: UIColor = .clear
|
||||
var colorsArray: [UIColor] = [] {
|
||||
didSet { invalidateGradientCache() }
|
||||
}
|
||||
private var gradientCache: CGGradient?
|
||||
private var locationsCache: [CGFloat]?
|
||||
|
||||
private struct GlowConstants {
|
||||
private enum GlowConstants {
|
||||
private static let sizeToGlowRatio: CGFloat = 0.00015
|
||||
static func glowAmount(forAngle angle: Double, glowAmount: CGFloat, glowMode: KDCircularProgressGlowMode, size: CGFloat) -> CGFloat {
|
||||
switch glowMode {
|
||||
case .forward:
|
||||
return CGFloat(angle) * size * sizeToGlowRatio * glowAmount
|
||||
case .reverse:
|
||||
return CGFloat(360 - angle) * size * sizeToGlowRatio * glowAmount
|
||||
return CGFloat(360.0 - angle) * size * sizeToGlowRatio * glowAmount
|
||||
case .constant:
|
||||
return 360 * size * sizeToGlowRatio * glowAmount
|
||||
return 360.0 * size * sizeToGlowRatio * glowAmount
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
@@ -384,10 +311,13 @@ public class KDCircularProgress: UIView {
|
||||
}
|
||||
|
||||
override class func needsDisplay(forKey key: String) -> Bool {
|
||||
return key == "angle" ? true : super.needsDisplay(forKey: key)
|
||||
if key == #keyPath(angle) {
|
||||
return true
|
||||
}
|
||||
return super.needsDisplay(forKey: key)
|
||||
}
|
||||
|
||||
override init(layer: AnyObject) {
|
||||
override init(layer: Any) {
|
||||
super.init(layer: layer)
|
||||
let progressLayer = layer as! KDCircularProgressViewLayer
|
||||
radius = progressLayer.radius
|
||||
@@ -423,9 +353,12 @@ public class KDCircularProgress: UIView {
|
||||
|
||||
let trackLineWidth = radius * trackThickness
|
||||
let progressLineWidth = radius * progressThickness
|
||||
let arcRadius = max(radius - trackLineWidth/2, radius - progressLineWidth/2)
|
||||
ctx.addArc(centerX: width/2.0, y: height/2.0, radius: arcRadius, startAngle: 0, endAngle: CGFloat.pi * 2, clockwise: 0)
|
||||
trackColor.set()
|
||||
let arcRadius = max(radius - trackLineWidth / 2.0, radius - progressLineWidth / 2.0)
|
||||
ctx.addArc(center: CGPoint(x: width / 2.0, y: height / 2.0),
|
||||
radius: arcRadius,
|
||||
startAngle: 0,
|
||||
endAngle: CGFloat.pi * 2,
|
||||
clockwise: false)
|
||||
ctx.setStrokeColor(trackColor.cgColor)
|
||||
ctx.setFillColor(progressInsideFillColor.cgColor)
|
||||
ctx.setLineWidth(trackLineWidth)
|
||||
@@ -435,18 +368,27 @@ public class KDCircularProgress: UIView {
|
||||
UIGraphicsBeginImageContextWithOptions(size, false, 0.0)
|
||||
|
||||
let imageCtx = UIGraphicsGetCurrentContext()
|
||||
let reducedAngle = Utility.mod(value: angle, range: 360, minMax: (0, 360))
|
||||
let fromAngle = Conversion.degreesToRadians(value: CGFloat(-startAngle))
|
||||
let toAngle = Conversion.degreesToRadians(value: CGFloat((clockwise == true ? -reducedAngle : reducedAngle) - startAngle))
|
||||
|
||||
imageCtx?.addArc(centerX: width/2.0, y: height/2.0, radius: arcRadius, startAngle: fromAngle, endAngle: toAngle, clockwise: clockwise == true ? 1 : 0)
|
||||
|
||||
let glowValue = GlowConstants.glowAmount(forAngle: reducedAngle, glowAmount: glowAmount, glowMode: glowMode, size: width)
|
||||
if glowValue > 0 {
|
||||
imageCtx?.setShadow(offset: CGSize.zero, blur: glowValue, color: UIColor.black().cgColor)
|
||||
let canonicalAngle = angle.mod(between: 0.0, and: 360.0, byIncrementing: 360.0)
|
||||
let fromAngle = -startAngle.radians
|
||||
let toAngle: Double
|
||||
if clockwise {
|
||||
toAngle = (-canonicalAngle - startAngle).radians
|
||||
} else {
|
||||
toAngle = (canonicalAngle - startAngle).radians
|
||||
}
|
||||
|
||||
let linecap: CGLineCap = roundedCorners == true ? .round : .butt
|
||||
imageCtx?.addArc(center: CGPoint(x: width / 2.0, y: height / 2.0),
|
||||
radius: arcRadius,
|
||||
startAngle: CGFloat(fromAngle),
|
||||
endAngle: CGFloat(toAngle),
|
||||
clockwise: clockwise)
|
||||
|
||||
let glowValue = GlowConstants.glowAmount(forAngle: canonicalAngle, glowAmount: glowAmount, glowMode: glowMode, size: width)
|
||||
if glowValue > 0 {
|
||||
imageCtx?.setShadow(offset: .zero, blur: glowValue, color: UIColor.black.cgColor)
|
||||
}
|
||||
|
||||
let linecap: CGLineCap = roundedCorners ? .round : .butt
|
||||
imageCtx?.setLineCap(linecap)
|
||||
imageCtx?.setLineWidth(progressLineWidth)
|
||||
imageCtx?.drawPath(using: .stroke)
|
||||
@@ -455,82 +397,63 @@ public class KDCircularProgress: UIView {
|
||||
UIGraphicsEndImageContext()
|
||||
|
||||
ctx.saveGState()
|
||||
ctx.clipToMask(bounds, mask: drawMask)
|
||||
ctx.clip(to: bounds, mask: drawMask)
|
||||
|
||||
//Gradient - Fill
|
||||
if !lerpColorMode && colorsArray.count > 1 {
|
||||
let rgbColorsArray: [UIColor] = colorsArray.map { color in // Make sure every color in colors array is in RGB color space
|
||||
if color.cgColor.numberOfComponents == 2 {
|
||||
if let whiteValue = color.cgColor.components?[0] {
|
||||
return UIColor(red: whiteValue, green: whiteValue, blue: whiteValue, alpha: 1.0)
|
||||
} else {
|
||||
return UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
|
||||
}
|
||||
} else {
|
||||
return color
|
||||
}
|
||||
}
|
||||
|
||||
let componentsArray = rgbColorsArray.flatMap { color -> [CGFloat] in
|
||||
let components: UnsafePointer<CGFloat> = color.cgColor.components!
|
||||
return [components[0], components[1], components[2], 1.0]
|
||||
}
|
||||
|
||||
drawGradientWith(context: ctx, componentsArray: componentsArray)
|
||||
if colorsArray.isEmpty {
|
||||
fillRect(withContext: ctx, color: .white)
|
||||
} else if colorsArray.count == 1 {
|
||||
fillRect(withContext: ctx, color: colorsArray[0])
|
||||
} else if lerpColorMode {
|
||||
lerp(withContext: ctx, colorsArray: colorsArray)
|
||||
} else {
|
||||
var color: UIColor?
|
||||
if colorsArray.isEmpty {
|
||||
color = UIColor.white()
|
||||
} else if colorsArray.count == 1 {
|
||||
color = colorsArray[0]
|
||||
} else {
|
||||
// lerpColorMode is true
|
||||
let t = CGFloat(reducedAngle) / 360
|
||||
let steps = colorsArray.count - 1
|
||||
let step = 1 / CGFloat(steps)
|
||||
for i in 1...steps {
|
||||
let fi = CGFloat(i)
|
||||
if (t <= fi * step || i == steps) {
|
||||
let colorT = Utility.inverseLerp(value: t, minMax: ((fi - 1) * step, fi * step))
|
||||
color = Utility.colorLerp(value: colorT, minMax: (colorsArray[i - 1], colorsArray[i]))
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let color = color {
|
||||
fillRectWith(context: ctx, color: color)
|
||||
}
|
||||
drawGradient(withContext: ctx, colorsArray: colorsArray)
|
||||
}
|
||||
|
||||
ctx.restoreGState()
|
||||
UIGraphicsPopContext()
|
||||
}
|
||||
|
||||
private func fillRectWith(context: CGContext!, color: UIColor) {
|
||||
private func lerp(withContext context: CGContext, colorsArray: [UIColor]) {
|
||||
let canonicalAngle = angle.mod(between: 0.0, and: 360.0, byIncrementing: 360.0)
|
||||
let percentage = canonicalAngle / 360.0
|
||||
let steps = colorsArray.count - 1
|
||||
let step = 1.0 / Double(steps)
|
||||
|
||||
for i in 1...steps {
|
||||
let di = Double(i)
|
||||
if percentage <= di * step || i == steps {
|
||||
let colorT = percentage.inverseLerp(min: (di - 1) * step, max: di * step)
|
||||
let color = colorT.colorLerp(minColor: colorsArray[i - 1], maxColor: colorsArray[i])
|
||||
fillRect(withContext: context, color: color)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func fillRect(withContext context: CGContext, color: UIColor) {
|
||||
context.setFillColor(color.cgColor)
|
||||
context.fill(bounds)
|
||||
}
|
||||
|
||||
private func drawGradientWith(context: CGContext!, componentsArray: [CGFloat]) {
|
||||
private func drawGradient(withContext context: CGContext, colorsArray: [UIColor]) {
|
||||
let baseSpace = CGColorSpaceCreateDeviceRGB()
|
||||
let locations = locationsCache ?? gradientLocationsFor(colorCount: componentsArray.count/4, gradientWidth: bounds.size.width)
|
||||
let locations = locationsCache ?? gradientLocationsFor(colorCount: colorsArray.count, gradientWidth: bounds.size.width)
|
||||
let gradient: CGGradient
|
||||
|
||||
if let cachedGradient = gradientCache {
|
||||
gradient = cachedGradient
|
||||
} else {
|
||||
guard let cachedGradient = CGGradient(colorComponentsSpace: baseSpace, components: componentsArray, locations: locations,count: componentsArray.count / 4) else {
|
||||
return
|
||||
}
|
||||
guard let newGradient = CGGradient(colorSpace: baseSpace, colorComponents: colorsArray.rgbNormalized.componentsJoined,
|
||||
locations: locations, count: colorsArray.count) else { return }
|
||||
|
||||
gradientCache = cachedGradient
|
||||
gradient = cachedGradient
|
||||
gradientCache = newGradient
|
||||
gradient = newGradient
|
||||
}
|
||||
|
||||
let halfX = bounds.size.width / 2.0
|
||||
let floatPi = CGFloat.pi
|
||||
let rotateSpeed = clockwise == true ? gradientRotateSpeed : gradientRotateSpeed * -1
|
||||
let angleInRadians = Conversion.degreesToRadians(value: rotateSpeed! * CGFloat(angle) - 90)
|
||||
let rotateSpeed = clockwise == true ? gradientRotateSpeed : gradientRotateSpeed * -1.0
|
||||
let angleInRadians = (rotateSpeed * CGFloat(angle) - 90.0).radians
|
||||
let oppositeAngle = angleInRadians > floatPi ? angleInRadians - floatPi : angleInRadians + floatPi
|
||||
|
||||
let startPoint = CGPoint(x: (cos(angleInRadians) * halfX) + halfX, y: (sin(angleInRadians) * halfX) + halfX)
|
||||
@@ -540,18 +463,16 @@ public class KDCircularProgress: UIView {
|
||||
}
|
||||
|
||||
private func gradientLocationsFor(colorCount: Int, gradientWidth: CGFloat) -> [CGFloat] {
|
||||
if colorCount == 0 || gradientWidth == 0 {
|
||||
return []
|
||||
} else {
|
||||
let progressLineWidth = radius * progressThickness
|
||||
let firstPoint = gradientWidth/2 - (radius - progressLineWidth/2)
|
||||
let increment = (gradientWidth - (2*firstPoint))/CGFloat(colorCount - 1)
|
||||
|
||||
let locationsArray = (0..<colorCount).map { firstPoint + (CGFloat($0) * increment) }
|
||||
let result = locationsArray.map { $0 / gradientWidth }
|
||||
locationsCache = result
|
||||
return result
|
||||
}
|
||||
guard colorCount > 0, gradientWidth > 0 else { return [] }
|
||||
|
||||
let progressLineWidth = radius * progressThickness
|
||||
let firstPoint = gradientWidth / 2.0 - (radius - progressLineWidth / 2.0)
|
||||
let increment = (gradientWidth - (2.0 * firstPoint)) / CGFloat(colorCount - 1)
|
||||
|
||||
let locationsArray = (0..<colorCount).map { firstPoint + (CGFloat($0) * increment) }
|
||||
let result = locationsArray.map { $0 / gradientWidth }
|
||||
locationsCache = result
|
||||
return result
|
||||
}
|
||||
|
||||
private func invalidateGradientCache() {
|
||||
@@ -560,3 +481,76 @@ public class KDCircularProgress: UIView {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Some helper extensions below
|
||||
|
||||
private extension Array where Element == UIColor {
|
||||
// Make sure every color in colors array is in RGB color space
|
||||
var rgbNormalized: [UIColor] {
|
||||
return map { color in
|
||||
guard color.cgColor.numberOfComponents == 2 else {
|
||||
return color
|
||||
}
|
||||
|
||||
let white: CGFloat = color.cgColor.components![0]
|
||||
return UIColor(red: white, green: white, blue: white, alpha: 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
var componentsJoined: [CGFloat] {
|
||||
return flatMap { $0.cgColor.components ?? [] }
|
||||
}
|
||||
}
|
||||
|
||||
private extension Comparable {
|
||||
func clamp(lowerBound: Self, upperBound: Self) -> Self {
|
||||
return min(max(self, lowerBound), upperBound)
|
||||
}
|
||||
}
|
||||
|
||||
private extension FloatingPoint {
|
||||
var radians: Self {
|
||||
return self * .pi / Self(180)
|
||||
}
|
||||
|
||||
func mod(between left: Self, and right: Self, byIncrementing interval: Self) -> Self {
|
||||
assert(interval > 0)
|
||||
assert(interval <= right - left)
|
||||
assert(right > left)
|
||||
|
||||
if self >= left, self <= right {
|
||||
return self
|
||||
} else if self < left {
|
||||
return (self + interval).mod(between: left, and: right, byIncrementing: interval)
|
||||
} else {
|
||||
return (self - interval).mod(between: left, and: right, byIncrementing: interval)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private extension BinaryFloatingPoint {
|
||||
func inverseLerp(min: Self, max: Self) -> Self {
|
||||
return (self - min) / (max - min)
|
||||
}
|
||||
|
||||
func lerp(min: Self, max: Self) -> Self {
|
||||
return (max - min) * self + min
|
||||
}
|
||||
|
||||
func colorLerp(minColor: UIColor, maxColor: UIColor) -> UIColor {
|
||||
let clampedValue = CGFloat(self.clamp(lowerBound: 0.0, upperBound: 1.0))
|
||||
let zero = CGFloat(0.0)
|
||||
|
||||
|
||||
var (r0, g0, b0, a0) = (zero, zero, zero, zero)
|
||||
minColor.getRed(&r0, green: &g0, blue: &b0, alpha: &a0)
|
||||
|
||||
var (r1, g1, b1, a1) = (zero, zero, zero, zero)
|
||||
maxColor.getRed(&r1, green: &g1, blue: &b1, alpha: &a1)
|
||||
|
||||
return UIColor(red: clampedValue.lerp(min: r0, max: r1),
|
||||
green: clampedValue.lerp(min: g0, max: g1),
|
||||
blue: clampedValue.lerp(min: b0, max: b1),
|
||||
alpha: clampedValue.lerp(min: a0, max: a1))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,442 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
BC9E758C1A8CE4A500B1DF3D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC9E758B1A8CE4A500B1DF3D /* AppDelegate.swift */; };
|
||||
BC9E758E1A8CE4A500B1DF3D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC9E758D1A8CE4A500B1DF3D /* ViewController.swift */; };
|
||||
BC9E75911A8CE4A500B1DF3D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC9E758F1A8CE4A500B1DF3D /* Main.storyboard */; };
|
||||
BC9E75931A8CE4A500B1DF3D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BC9E75921A8CE4A500B1DF3D /* Images.xcassets */; };
|
||||
BC9E75961A8CE4A500B1DF3D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC9E75941A8CE4A500B1DF3D /* LaunchScreen.xib */; };
|
||||
BC9E75A21A8CE4A500B1DF3D /* KDCircularProgressExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC9E75A11A8CE4A500B1DF3D /* KDCircularProgressExampleTests.swift */; };
|
||||
BC9E75AD1A8CE4CC00B1DF3D /* KDCircularProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC9E75AC1A8CE4CC00B1DF3D /* KDCircularProgress.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
BC9E759C1A8CE4A500B1DF3D /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = BC9E757E1A8CE4A500B1DF3D /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = BC9E75851A8CE4A500B1DF3D;
|
||||
remoteInfo = KDCircularProgressExample;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
BC9E75861A8CE4A500B1DF3D /* KDCircularProgressExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KDCircularProgressExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BC9E758A1A8CE4A500B1DF3D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
BC9E758B1A8CE4A500B1DF3D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
BC9E758D1A8CE4A500B1DF3D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
BC9E75901A8CE4A500B1DF3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
BC9E75921A8CE4A500B1DF3D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
BC9E75951A8CE4A500B1DF3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
|
||||
BC9E759B1A8CE4A500B1DF3D /* KDCircularProgressExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KDCircularProgressExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BC9E75A01A8CE4A500B1DF3D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
BC9E75A11A8CE4A500B1DF3D /* KDCircularProgressExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KDCircularProgressExampleTests.swift; sourceTree = "<group>"; };
|
||||
BC9E75AC1A8CE4CC00B1DF3D /* KDCircularProgress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = KDCircularProgress.swift; path = ../KDCircularProgress/KDCircularProgress.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
BC9E75831A8CE4A500B1DF3D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
BC9E75981A8CE4A500B1DF3D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
BC9E757D1A8CE4A500B1DF3D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC9E75881A8CE4A500B1DF3D /* KDCircularProgressExample */,
|
||||
BC9E759E1A8CE4A500B1DF3D /* KDCircularProgressExampleTests */,
|
||||
BC9E75871A8CE4A500B1DF3D /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC9E75871A8CE4A500B1DF3D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC9E75861A8CE4A500B1DF3D /* KDCircularProgressExample.app */,
|
||||
BC9E759B1A8CE4A500B1DF3D /* KDCircularProgressExampleTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC9E75881A8CE4A500B1DF3D /* KDCircularProgressExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC9E75AB1A8CE4B000B1DF3D /* KDCircularProgress */,
|
||||
BC9E758B1A8CE4A500B1DF3D /* AppDelegate.swift */,
|
||||
BC9E758D1A8CE4A500B1DF3D /* ViewController.swift */,
|
||||
BC9E758F1A8CE4A500B1DF3D /* Main.storyboard */,
|
||||
BC9E75921A8CE4A500B1DF3D /* Images.xcassets */,
|
||||
BC9E75941A8CE4A500B1DF3D /* LaunchScreen.xib */,
|
||||
BC9E75891A8CE4A500B1DF3D /* Supporting Files */,
|
||||
);
|
||||
path = KDCircularProgressExample;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC9E75891A8CE4A500B1DF3D /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC9E758A1A8CE4A500B1DF3D /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC9E759E1A8CE4A500B1DF3D /* KDCircularProgressExampleTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC9E75A11A8CE4A500B1DF3D /* KDCircularProgressExampleTests.swift */,
|
||||
BC9E759F1A8CE4A500B1DF3D /* Supporting Files */,
|
||||
);
|
||||
path = KDCircularProgressExampleTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC9E759F1A8CE4A500B1DF3D /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC9E75A01A8CE4A500B1DF3D /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC9E75AB1A8CE4B000B1DF3D /* KDCircularProgress */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BC9E75AC1A8CE4CC00B1DF3D /* KDCircularProgress.swift */,
|
||||
);
|
||||
name = KDCircularProgress;
|
||||
path = ..;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
BC9E75851A8CE4A500B1DF3D /* KDCircularProgressExample */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = BC9E75A51A8CE4A500B1DF3D /* Build configuration list for PBXNativeTarget "KDCircularProgressExample" */;
|
||||
buildPhases = (
|
||||
BC9E75821A8CE4A500B1DF3D /* Sources */,
|
||||
BC9E75831A8CE4A500B1DF3D /* Frameworks */,
|
||||
BC9E75841A8CE4A500B1DF3D /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = KDCircularProgressExample;
|
||||
productName = KDCircularProgressExample;
|
||||
productReference = BC9E75861A8CE4A500B1DF3D /* KDCircularProgressExample.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
BC9E759A1A8CE4A500B1DF3D /* KDCircularProgressExampleTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = BC9E75A81A8CE4A500B1DF3D /* Build configuration list for PBXNativeTarget "KDCircularProgressExampleTests" */;
|
||||
buildPhases = (
|
||||
BC9E75971A8CE4A500B1DF3D /* Sources */,
|
||||
BC9E75981A8CE4A500B1DF3D /* Frameworks */,
|
||||
BC9E75991A8CE4A500B1DF3D /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
BC9E759D1A8CE4A500B1DF3D /* PBXTargetDependency */,
|
||||
);
|
||||
name = KDCircularProgressExampleTests;
|
||||
productName = KDCircularProgressExampleTests;
|
||||
productReference = BC9E759B1A8CE4A500B1DF3D /* KDCircularProgressExampleTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
BC9E757E1A8CE4A500B1DF3D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 0610;
|
||||
ORGANIZATIONNAME = "Kaan Dedeoglu";
|
||||
TargetAttributes = {
|
||||
BC9E75851A8CE4A500B1DF3D = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
LastSwiftMigration = 0800;
|
||||
};
|
||||
BC9E759A1A8CE4A500B1DF3D = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
LastSwiftMigration = 0800;
|
||||
TestTargetID = BC9E75851A8CE4A500B1DF3D;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = BC9E75811A8CE4A500B1DF3D /* Build configuration list for PBXProject "KDCircularProgressExample" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = BC9E757D1A8CE4A500B1DF3D;
|
||||
productRefGroup = BC9E75871A8CE4A500B1DF3D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
BC9E75851A8CE4A500B1DF3D /* KDCircularProgressExample */,
|
||||
BC9E759A1A8CE4A500B1DF3D /* KDCircularProgressExampleTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
BC9E75841A8CE4A500B1DF3D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BC9E75911A8CE4A500B1DF3D /* Main.storyboard in Resources */,
|
||||
BC9E75961A8CE4A500B1DF3D /* LaunchScreen.xib in Resources */,
|
||||
BC9E75931A8CE4A500B1DF3D /* Images.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
BC9E75991A8CE4A500B1DF3D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
BC9E75821A8CE4A500B1DF3D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BC9E75AD1A8CE4CC00B1DF3D /* KDCircularProgress.swift in Sources */,
|
||||
BC9E758E1A8CE4A500B1DF3D /* ViewController.swift in Sources */,
|
||||
BC9E758C1A8CE4A500B1DF3D /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
BC9E75971A8CE4A500B1DF3D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BC9E75A21A8CE4A500B1DF3D /* KDCircularProgressExampleTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
BC9E759D1A8CE4A500B1DF3D /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = BC9E75851A8CE4A500B1DF3D /* KDCircularProgressExample */;
|
||||
targetProxy = BC9E759C1A8CE4A500B1DF3D /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
BC9E758F1A8CE4A500B1DF3D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
BC9E75901A8CE4A500B1DF3D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BC9E75941A8CE4A500B1DF3D /* LaunchScreen.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
BC9E75951A8CE4A500B1DF3D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
BC9E75A31A8CE4A500B1DF3D /* 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;
|
||||
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;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
BC9E75A41A8CE4A500B1DF3D /* 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;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
BC9E75A61A8CE4A500B1DF3D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = KDCircularProgressExample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
BC9E75A71A8CE4A500B1DF3D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = KDCircularProgressExample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
BC9E75A91A8CE4A500B1DF3D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = KDCircularProgressExampleTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KDCircularProgressExample.app/KDCircularProgressExample";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
BC9E75AA1A8CE4A500B1DF3D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = KDCircularProgressExampleTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KDCircularProgressExample.app/KDCircularProgressExample";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
BC9E75811A8CE4A500B1DF3D /* Build configuration list for PBXProject "KDCircularProgressExample" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
BC9E75A31A8CE4A500B1DF3D /* Debug */,
|
||||
BC9E75A41A8CE4A500B1DF3D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
BC9E75A51A8CE4A500B1DF3D /* Build configuration list for PBXNativeTarget "KDCircularProgressExample" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
BC9E75A61A8CE4A500B1DF3D /* Debug */,
|
||||
BC9E75A71A8CE4A500B1DF3D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
BC9E75A81A8CE4A500B1DF3D /* Build configuration list for PBXNativeTarget "KDCircularProgressExampleTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
BC9E75A91A8CE4A500B1DF3D /* Debug */,
|
||||
BC9E75AA1A8CE4A500B1DF3D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = BC9E757E1A8CE4A500B1DF3D /* Project object */;
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0610"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "BC9E75851A8CE4A500B1DF3D"
|
||||
BuildableName = "KDCircularProgressExample.app"
|
||||
BlueprintName = "KDCircularProgressExample"
|
||||
ReferencedContainer = "container:KDCircularProgressExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "NO"
|
||||
buildForArchiving = "NO"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "BC9E759A1A8CE4A500B1DF3D"
|
||||
BuildableName = "KDCircularProgressExampleTests.xctest"
|
||||
BlueprintName = "KDCircularProgressExampleTests"
|
||||
ReferencedContainer = "container:KDCircularProgressExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "BC9E759A1A8CE4A500B1DF3D"
|
||||
BuildableName = "KDCircularProgressExampleTests.xctest"
|
||||
BlueprintName = "KDCircularProgressExampleTests"
|
||||
ReferencedContainer = "container:KDCircularProgressExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "BC9E75851A8CE4A500B1DF3D"
|
||||
BuildableName = "KDCircularProgressExample.app"
|
||||
BlueprintName = "KDCircularProgressExample"
|
||||
ReferencedContainer = "container:KDCircularProgressExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "BC9E75851A8CE4A500B1DF3D"
|
||||
BuildableName = "KDCircularProgressExample.app"
|
||||
BlueprintName = "KDCircularProgressExample"
|
||||
ReferencedContainer = "container:KDCircularProgressExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "BC9E75851A8CE4A500B1DF3D"
|
||||
BuildableName = "KDCircularProgressExample.app"
|
||||
BlueprintName = "KDCircularProgressExample"
|
||||
ReferencedContainer = "container:KDCircularProgressExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Kaan Dedeoglu. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="KDCircularProgressExample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
|
||||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
|
||||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="548" y="455"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -1,36 +0,0 @@
|
||||
//
|
||||
// KDCircularProgressExampleTests.swift
|
||||
// KDCircularProgressExampleTests
|
||||
//
|
||||
// Created by Kaan Dedeoglu on 2/12/15.
|
||||
// Copyright (c) 2015 Kaan Dedeoglu. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import XCTest
|
||||
|
||||
class KDCircularProgressExampleTests: 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.
|
||||
XCTAssert(true, "Pass")
|
||||
}
|
||||
|
||||
func testPerformanceExample() {
|
||||
// This is an example of a performance test case.
|
||||
self.measure() {
|
||||
// Put the code you want to measure the time of here.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Kaan Dedeoglu
|
||||
Copyright (c) 2016 Kaan Dedeoglu
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// swift-tools-version:4.2
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "KDCircularProgress",
|
||||
products: [
|
||||
.library(name: "KDCircularProgress", targets: ["KDCircularProgress"])
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "KDCircularProgress",
|
||||
path: "KDCircularProgress"
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -1,89 +1,129 @@
|
||||
# KDCircularProgress
|
||||
`KDCircularProgress` is a circular progress view written in Swift. It makes it possible to have gradients in the progress view, along with glows and animations.
|
||||
|
||||
[](http://cocoapods.org/pods/KDCircularProgress)
|
||||
[](http://cocoapods.org/pods/KDCircularProgress)
|
||||
[](http://cocoapods.org/pods/KDCircularProgress)
|
||||
|
||||
`KDCircularProgress` is a circular progress view written in Swift. It makes it possible to have gradients in the progress view, along with glows and animations.
|
||||
|
||||
KDCircularProgress also has `IBInspectable` and `IBDesignable` support, so you can configure and preview inside the `Interface Builder`.
|
||||
|
||||
|
||||
Here's an example
|
||||
|
||||
[Youtube Link](http://youtu.be/iIdas72MXOg)
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
```swift
|
||||
let progress = KDCircularProgress(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
|
||||
progress.startAngle = -90
|
||||
progress.progressThickness = 0.2
|
||||
progress.trackThickness = 0.7
|
||||
progress.clockwise = true
|
||||
progress.center = view.center
|
||||
progress.gradientRotateSpeed = 2
|
||||
progress.roundedCorners = true
|
||||
progress.glowMode = .Forward
|
||||
progress.angle = 300
|
||||
progress.setColors(UIColor.cyanColor() ,UIColor.whiteColor(), UIColor.magentaColor())
|
||||
view.addSubview(progress)
|
||||
```
|
||||
## Requirements
|
||||
`KDCircularProgress` requires iOS 8+, although iOS 8 support hasn't been tested in a while.
|
||||
|
||||
## Installation
|
||||
- It's on CocoaPods under the name (you guessed it!) KDCircularProgress
|
||||
- Just drag `KDCircularProgress.swift` into your project. `Carthage` support is on To-do list.
|
||||
|
||||
### CocoaPods
|
||||
|
||||
KDCircularProgress is available through [CocoaPods](http://cocoapods.org). To install
|
||||
it, simply add the following line to your Podfile:
|
||||
|
||||
```bash
|
||||
pod 'KDCircularProgress'
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```bash
|
||||
$ pod install
|
||||
```
|
||||
|
||||
### Carthage
|
||||
|
||||
Add the line `github "kaandedeoglu/KDCircularProgress"` to your `Cartfile` and then run the command:
|
||||
|
||||
```bash
|
||||
carthage update
|
||||
```
|
||||
|
||||
|
||||
### Manually
|
||||
|
||||
Just drag `KDCircularProgress.swift` into your project.
|
||||
|
||||
## Sample Code
|
||||
Below you can see code that creates and sets up a `KCircularProgress` instance. Which gives you a configuration that looks similar to the progress in the example images.
|
||||
|
||||
```swift
|
||||
progress = KDCircularProgress(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
|
||||
progress.startAngle = -90
|
||||
progress.progressThickness = 0.2
|
||||
progress.trackThickness = 0.6
|
||||
progress.clockwise = true
|
||||
progress.gradientRotateSpeed = 2
|
||||
progress.roundedCorners = false
|
||||
progress.glowMode = .forward
|
||||
progress.glowAmount = 0.9
|
||||
progress.set(colors: UIColor.cyan ,UIColor.white, UIColor.magenta, UIColor.white, UIColor.orange)
|
||||
progress.center = CGPoint(x: view.center.x, y: view.center.y + 25)
|
||||
view.addSubview(progress)
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
####progressColors: `[UIColor]`
|
||||
#### progressColors: `[UIColor]`
|
||||
The colors used to generate the gradient of the progress. You can also set this using the variadic `setColors(UIColor...)` method. A gradient is used only if there is more than one color. A fill is used otherwise. The default is a white fill.
|
||||
|
||||
####angle: `Int`
|
||||
#### angle: `Int`
|
||||
The angle of the progress. Between 0 and 360 (inclusive). Simply change its value in order to change the visual progress of the component. Default is 0.
|
||||
|
||||
####startAngle: `Int`
|
||||
#### startAngle: `Int`
|
||||
The angle at which the progress will begin. Between 0 and 360 (inclusive), however you can pass any negative or positive values and the component will mod them automatically to the required range. Default is 0.
|
||||
|
||||
####clockwise: `Bool`
|
||||
#### clockwise: `Bool`
|
||||
Clockwise if true, Counter-clockwise if false. Default is true.
|
||||
|
||||
####roundedCorners: `Bool`
|
||||
#### roundedCorners: `Bool`
|
||||
When true, the ends of the progress track will be drawn with a half circle radius. Default is false.
|
||||
|
||||
####gradientRotateSpeed: `CGFloat`
|
||||
#### gradientRotateSpeed: `CGFloat`
|
||||
Describes how many times the underlying gradient will perform a 2π rotation for each full cycle of the progress. Integer values recommended. Default is 0.
|
||||
|
||||
####glowAmount: `CGFloat`
|
||||
#### glowAmount: `CGFloat`
|
||||
The intensity of the glow. Between 0 and 1.0. Default is 1.0.
|
||||
|
||||
####glowMode: `KDCircularProgressGlowMode`
|
||||
- **.Forward** - The glow increases proportionaly to the angle. No glow at 0 degrees and full glow at 360 degrees.
|
||||
#### glowMode: `KDCircularProgressGlowMode`
|
||||
- **.forward** - The glow increases proportionaly to the angle. No glow at 0 degrees and full glow at 360 degrees.
|
||||
|
||||
- **.Reverse** - The glow increases inversely proportional to the angle. Full glow at 0 degrees and no glow at 360 degrees.
|
||||
- **.reverse** - The glow increases inversely proportional to the angle. Full glow at 0 degrees and no glow at 360 degrees.
|
||||
|
||||
- **.Constant** - Constant glow.
|
||||
- **.constant** - Constant glow.
|
||||
|
||||
- **.NoGlow** - No glow
|
||||
- **.noGlow** - No glow
|
||||
|
||||
The default is **.Forward**
|
||||
The default is **.forward**
|
||||
|
||||
####progressThickness: `CGFloat`
|
||||
#### progressThickness: `CGFloat`
|
||||
The thickness of the progress. Between 0 and 1. Default is 0.4
|
||||
|
||||
####trackThickness: `CGFloat`
|
||||
#### trackThickness: `CGFloat`
|
||||
The thickness of the background track. Between 0 and 1. Default is 0.5
|
||||
|
||||
####trackColor: `UIColor`
|
||||
#### trackColor: `UIColor`
|
||||
The color of the background track. Default is `UIColor.blackColor()`.
|
||||
|
||||
####progressInsideFillColor: `UIColor`
|
||||
#### progressInsideFillColor: `UIColor`
|
||||
The color of the center of the circle. Default is `UIColor.clearColor()`.
|
||||
|
||||
##Methods
|
||||
## Methods
|
||||
```swift
|
||||
override public init(frame: CGRect)
|
||||
```
|
||||
@@ -95,58 +135,48 @@ convenience public init(frame:CGRect, colors: UIColor...)
|
||||
Initialize with a frame and the gradient colors.
|
||||
|
||||
```swift
|
||||
public func setColors(colors: UIColor...)
|
||||
public func set(colors: UIColor...)
|
||||
public func set(colors: [UIColor])
|
||||
```
|
||||
|
||||
Set the colors for the progress gradient.
|
||||
|
||||
|
||||
```swift
|
||||
public func animateFromAngle(fromAngle: Int, toAngle: Int, duration: NSTimeInterval, relativeDuration: Bool = true, completion: ((Bool) -> Void)?)
|
||||
```
|
||||
|
||||
Animate the progress from an initial value to a final value, with a completion block that fires after the animation is done.
|
||||
|
||||
`relativeDuration` - specify if the duration is for the specific animation or is the duration that would make a full turn.
|
||||
|
||||
|
||||
```swift
|
||||
public func animateToAngle(toAngle: Int, duration: NSTimeInterval, completion: ((Bool) -> Void)?)
|
||||
```
|
||||
|
||||
Animate the progress from the current state to a target value.
|
||||
|
||||
```swift
|
||||
public func pauseAnimation()
|
||||
```
|
||||
|
||||
Pause the animation, if any.
|
||||
|
||||
|
||||
```swift
|
||||
public func isAnimating() -> Bool
|
||||
```
|
||||
|
||||
Check if there's an active animation.
|
||||
|
||||
##Misc
|
||||
## Misc
|
||||
Prefering light colors in the gradients gives better results. As mentioned before, use square frames. Rectangular frames are not tested and might produce unexpected results.
|
||||
|
||||
##To-Do
|
||||
- [x] Add example project
|
||||
- [ ] Carthage Support
|
||||
- [x] CocoaPods Support
|
||||
- [x] IBDesignable/IBInspectable support
|
||||
- [ ] Adding a `progress` property as an alternative to `angle`
|
||||
- [ ] Clean up
|
||||
|
||||
##Contact
|
||||
## Contact
|
||||
Drop me an email if you want discuss anything further.
|
||||
|
||||
[Email](kaandedeoglu@me.com)
|
||||
|
||||
##License
|
||||
## License
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Kaan Dedeoglu
|
||||
Copyright (c) 2017 Kaan Dedeoglu
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||