├── .gitignore
├── .swiftpm
└── xcode
│ └── package.xcworkspace
│ └── contents.xcworkspacedata
├── .travis.yml
├── Carthage
└── Build
│ ├── .RingPieChart.version
│ └── iOS
│ ├── EB1B512B-60AD-345A-90B0-CA75412CA17A.bcsymbolmap
│ ├── RingPieChart.framework.dSYM
│ └── Contents
│ │ ├── Info.plist
│ │ └── Resources
│ │ └── DWARF
│ │ └── RingPieChart
│ └── RingPieChart.framework
│ ├── Headers
│ ├── RingPieChart-Swift.h
│ └── RingPieChart.h
│ ├── Info.plist
│ ├── Modules
│ ├── RingPieChart.swiftmodule
│ │ ├── arm64-apple-ios.swiftdoc
│ │ ├── arm64-apple-ios.swiftmodule
│ │ ├── arm64.swiftdoc
│ │ ├── arm64.swiftmodule
│ │ ├── x86_64-apple-ios-simulator.swiftdoc
│ │ ├── x86_64-apple-ios-simulator.swiftmodule
│ │ ├── x86_64.swiftdoc
│ │ └── x86_64.swiftmodule
│ └── module.modulemap
│ └── RingPieChart
├── DemoApp
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Info.plist
├── SceneDelegate.swift
└── ViewController.swift
├── LICENSE
├── Package.swift
├── README.md
├── RingPieChart.framework.zip
├── RingPieChart.podspec
├── RingPieChart.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── xcshareddata
│ └── xcschemes
│ │ ├── DemoApp.xcscheme
│ │ ├── RingPieChart.xcscheme
│ │ └── RingPieChartTests.xcscheme
└── xcuserdata
│ └── jawadali.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── RingPieChart
├── Info.plist
├── RingPieChart.h
└── RingPieChartTest.swift
├── RingPieChartTests
├── Info.plist
└── RingPieChartTests.swift
├── Sources
└── RingPieChart
│ └── Circular.swift
├── Tests
├── LinuxMain.swift
└── RingPieChartTests
│ ├── RingPieChartTests.swift
│ └── XCTestManifests.swift
└── images
├── demo.png
└── ezgif.com-video-to-gif.gif
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /.build
3 | /Packages
4 | /*.xcodeproj
5 | xcuserdata/
6 |
--------------------------------------------------------------------------------
/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: swift #1
2 | osx_image: xcode11 #2
3 | xcode_project: RingPieChart.xcodeproj #3
4 | xcode_scheme: RingPieChartTests #4
5 | #xcode_sdk: iphonesimulator13.0 #5
6 | script:
7 | - xcodebuild clean test -project RingPieChart.xcodeproj -scheme RingPieChart -destination "platform=iOS Simulator,name=iPhone 8,OS=13.0" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -quiet
8 |
--------------------------------------------------------------------------------
/Carthage/Build/.RingPieChart.version:
--------------------------------------------------------------------------------
1 | {
2 | "Mac" : [
3 |
4 | ],
5 | "watchOS" : [
6 |
7 | ],
8 | "tvOS" : [
9 |
10 | ],
11 | "commitish" : "0.0.1",
12 | "iOS" : [
13 | {
14 | "name" : "RingPieChart",
15 | "hash" : "71dab83ef7da897faa3a075ba7ff43bbfd4e04e9636d129b840a18ecb3052305",
16 | "swiftToolchainVersion" : "5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)"
17 | }
18 | ]
19 | }
--------------------------------------------------------------------------------
/Carthage/Build/iOS/EB1B512B-60AD-345A-90B0-CA75412CA17A.bcsymbolmap:
--------------------------------------------------------------------------------
1 | BCSymbolMap Version: 2.0
2 | _$s12RingPieChart8CircularC9lineWidth12CoreGraphics7CGFloatVvM.resume.0
3 | _$s12RingPieChart8CircularCIetMg_TC
4 | _$s12RingPieChart8CircularC4drawyySo6CGRectVFTo
5 | _$s12RingPieChart8CircularC11percentages6colors8animatedACSaySdG_SaySo7UIColorCGSbtcfcfA1_
6 | _$s12RingPieChart8CircularC5coderACSgSo7NSCoderC_tcfcTo
7 | _$sIeg_IeyB_TR
8 | _$s12RingPieChart8CircularC7addArac33_A3888B0B4FE6DDE23B92175F7C243499LL4with2in10startAngle03endR0So12CAShapeLayerCSo7UIColorC_So6CGRectVS2dtF
9 | _$s12RingPieChart8CircularC5frameACSo6CGRectV_tcfcTo
10 | _$s12RingPieChart8CircularCfETo
11 | _$ss12_ArrayBufferV19_getElementSlowPathyyXlSiFSo7UIColorC_Tg5
12 | _$s12RingPieChart8CircularC17oppacityAnimation33_A3888B0B4FE6DDE23B92175F7C243499LL5index5shapeySd_So12CAShapeLayerCtFTf4nnd_n
13 | _$s12RingPieChart8CircularC17oppacityAnimation33_A3888B0B4FE6DDE23B92175F7C243499LL5index5shapeySd_So12CAShapeLayerCtFyycfU_TA
14 | _block_copy_helper
15 | _block_destroy_helper
16 | _$s12RingPieChart8CircularC10_lineWidth33_A3888B0B4FE6DDE23B92175F7C243499LL12CoreGraphics7CGFloatVvpWvd
17 | _$s12RingPieChart8CircularC12_percentages33_A3888B0B4FE6DDE23B92175F7C243499LLSaySdGvpWvd
18 | _$s12RingPieChart8CircularC7_colors33_A3888B0B4FE6DDE23B92175F7C243499LLSaySo7UIColorCGvpWvd
19 | _$s12RingPieChart8CircularC13isAnimationOn33_A3888B0B4FE6DDE23B92175F7C243499LLSbvpWvd
20 | _$s12RingPieChart8CircularC9fillLayer33_A3888B0B4FE6DDE23B92175F7C243499LLSo07CAShapeF0CvpWvd
21 | _$s12RingPieChartMXM
22 | _symbolic So6UIViewC
23 | _$s12RingPieChart8CircularCML
24 | _$s12RingPieChart8CircularCMf
25 | _symbolic _____ 12RingPieChart8CircularC
26 | _symbolic So12CAShapeLayerC
27 | _symbolic SaySdG
28 | _symbolic SaySo7UIColorCG
29 | _symbolic Sb
30 | _symbolic 12CoreGraphics7CGFloatV
31 | _$s12RingPieChart8CircularCMF
32 | _$sSo17OS_dispatch_queueCML
33 | _block_descriptor
34 | _$s8Dispatch0A13WorkItemFlagsVACs10SetAlgebraAAWL
35 | _$sSay8Dispatch0A13WorkItemFlagsVGML
36 | _$sSay8Dispatch0A13WorkItemFlagsVGSayxGSTsWL
37 | ___swift_reflection_version
38 | _objc_classes
39 | Apple clang version 11.0.0 (clang-1100.0.33.15)
40 |
41 | /Users/jawadali/Documents/RingPieChart
42 | Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
43 | /Users/jawadali/Documents/RingPieChart/RingPieChart/Circular.swift
44 | block_destroy_helper
45 |
46 | block_copy_helper
47 | $s12RingPieChart8CircularC17oppacityAnimation33_A3888B0B4FE6DDE23B92175F7C243499LL5index5shapeySd_So12CAShapeLayerCtFyycfU_TA
48 | $s12RingPieChart8CircularC17oppacityAnimation33_A3888B0B4FE6DDE23B92175F7C243499LL5index5shapeySd_So12CAShapeLayerCtFyycfU_
49 | init
50 | objectdestroy
51 | $s12RingPieChart8CircularCMa
52 | oppacityAnimation
53 | asyncAfter
54 | $sSay8Dispatch0A13WorkItemFlagsVGSayxGSTsWl
55 | $sSay8Dispatch0A13WorkItemFlagsVGMa
56 | $s8Dispatch0A13WorkItemFlagsVACs10SetAlgebraAAWl
57 | $sSo17OS_dispatch_queueCMa
58 | $ss12_ArrayBufferV19_getElementSlowPathyyXlSiFSo7UIColorC_Tg5
59 | $ss22_ContiguousArrayBufferV5countSivgSo7UIColorC_Tg5
60 | $ss12_ArrayBufferV7_natives011_ContiguousaB0VyxGvgSo7UIColorC_Tg5
61 | $ss12_ArrayBufferV9_isNativeSbvgSo7UIColorC_Tg5
62 | deinit
63 | $ss25_unimplementedInitializer9className04initD04file4line6columns5NeverOs12StaticStringV_A2JS2utFySRys5UInt8VGXEfU0_
64 | $ss25_unimplementedInitializer9className04initD04file4line6columns5NeverOs12StaticStringV_A2JS2utFySRys5UInt8VGXEfU0_yAMXEfU_
65 | addArac
66 | deg2rad
67 | _lineWidth.get
68 | $sIeg_IeyB_TR
69 | $s12RingPieChart8CircularC11percentages6colors8animatedACSaySdG_SaySo7UIColorCGSbtcfcfA1_
70 | draw
71 | subscript.get
72 | $sSa15_checkSubscript_20wasNativeTypeCheckeds16_DependenceTokenVSi_SbtFSo7UIColorC_Tg5
73 | $ss12_ArrayBufferV37_checkInoutAndNativeTypeCheckedBounds_03wasfgH0ySi_SbtFSo7UIColorC_Tg5
74 | $sSa11_getElement_20wasNativeTypeChecked22matchingSubscriptCheckxSi_Sbs16_DependenceTokenVtFSd_Tg5
75 | $ss22_ContiguousArrayBufferV19firstElementAddressSpyxGvgSd_Tg5
76 | $sSa15_checkSubscript_20wasNativeTypeCheckeds16_DependenceTokenVSi_SbtFSd_Tg5
77 | $ss12_ArrayBufferV37_checkInoutAndNativeTypeCheckedBounds_03wasfgH0ySi_SbtFSd_Tg5
78 | $ss22_ContiguousArrayBufferV5countSivgSd_Tg5
79 | _percentages.get
80 | next
81 | $sSiSQsSQ2eeoiySbx_xtFZTW
82 | $sSnyxGSlsSxRzSZ6StrideRpzrlSl9formIndex5aftery0C0Qzz_tFTWSi_Tg5
83 | $sSnsSxRzSZ6StrideRpzrlE5index5afterxx_tFSi_Tg5
84 | $sSiSxsSx8advanced2byx6StrideQz_tFTW
85 | isAnimationOn.get
86 | $sSa11_getElement_20wasNativeTypeChecked22matchingSubscriptCheckxSi_Sbs16_DependenceTokenVtFSo7UIColorC_Tg5
87 | $ss22_ContiguousArrayBufferV19firstElementAddressSpyxGvgSo7UIColorC_Tg5
88 | $sSa29_hoistableIsNativeTypeCheckedSbyFSo7UIColorC_Tg5
89 | $ss12_ArrayBufferV32arrayPropertyIsNativeTypeCheckedSbvgSo7UIColorC_Tg5
90 | $ss12_ArrayBufferV20_isNativeTypeCheckedSbvgSo7UIColorC_Tg5
91 | _colors.get
92 | count.get
93 | $sSa9_getCountSiyFSd_Tg5
94 | lineWidth.modify
95 | lineWidth.set
96 | lineWidth.get
97 | _lineWidth.set
98 | $s12RingPieChart8CircularC10_lineWidth33_A3888B0B4FE6DDE23B92175F7C243499LL12CoreGraphics7CGFloatVvpfi
99 | $s12RingPieChart8CircularC13isAnimationOn33_A3888B0B4FE6DDE23B92175F7C243499LLSbvpfi
100 | $s12RingPieChart8CircularC9fillLayer33_A3888B0B4FE6DDE23B92175F7C243499LLSo07CAShapeF0Cvpfi
101 | Apple clang version 11.0.0 (clang-1100.0.33.16)
102 | /Users/jawadali/Library/Developer/Xcode/DerivedData/RingPieChart-fcjtazjzihzswdfvczmnjvimrfuw/Build/Intermediates.noindex/ArchiveIntermediates/RingPieChart/IntermediateBuildFilesPath/RingPieChart.build/Release-iphoneos/RingPieChart.build/DerivedSources/RingPieChart_vers.c
103 |
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework.dSYM/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleIdentifier
8 | com.apple.xcode.dsym.XeroT.RingPieChart
9 | CFBundleInfoDictionaryVersion
10 | 6.0
11 | CFBundlePackageType
12 | dSYM
13 | CFBundleSignature
14 | ????
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleVersion
18 | 1
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework.dSYM/Contents/Resources/DWARF/RingPieChart:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/Carthage/Build/iOS/RingPieChart.framework.dSYM/Contents/Resources/DWARF/RingPieChart
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Headers/RingPieChart-Swift.h:
--------------------------------------------------------------------------------
1 | #ifndef TARGET_OS_SIMULATOR
2 | #include
3 | #endif
4 | #if TARGET_OS_SIMULATOR
5 | // Generated by Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
6 | #pragma clang diagnostic push
7 | #pragma clang diagnostic ignored "-Wgcc-compat"
8 |
9 | #if !defined(__has_include)
10 | # define __has_include(x) 0
11 | #endif
12 | #if !defined(__has_attribute)
13 | # define __has_attribute(x) 0
14 | #endif
15 | #if !defined(__has_feature)
16 | # define __has_feature(x) 0
17 | #endif
18 | #if !defined(__has_warning)
19 | # define __has_warning(x) 0
20 | #endif
21 |
22 | #if __has_include()
23 | # include
24 | #endif
25 |
26 | #pragma clang diagnostic ignored "-Wauto-import"
27 | #include
28 | #include
29 | #include
30 | #include
31 |
32 | #if !defined(SWIFT_TYPEDEFS)
33 | # define SWIFT_TYPEDEFS 1
34 | # if __has_include()
35 | # include
36 | # elif !defined(__cplusplus)
37 | typedef uint_least16_t char16_t;
38 | typedef uint_least32_t char32_t;
39 | # endif
40 | typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
41 | typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
42 | typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
43 | typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
44 | typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
45 | typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
46 | typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
47 | typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
48 | typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
49 | typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
50 | typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
51 | typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
52 | #endif
53 |
54 | #if !defined(SWIFT_PASTE)
55 | # define SWIFT_PASTE_HELPER(x, y) x##y
56 | # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
57 | #endif
58 | #if !defined(SWIFT_METATYPE)
59 | # define SWIFT_METATYPE(X) Class
60 | #endif
61 | #if !defined(SWIFT_CLASS_PROPERTY)
62 | # if __has_feature(objc_class_property)
63 | # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
64 | # else
65 | # define SWIFT_CLASS_PROPERTY(...)
66 | # endif
67 | #endif
68 |
69 | #if __has_attribute(objc_runtime_name)
70 | # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
71 | #else
72 | # define SWIFT_RUNTIME_NAME(X)
73 | #endif
74 | #if __has_attribute(swift_name)
75 | # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
76 | #else
77 | # define SWIFT_COMPILE_NAME(X)
78 | #endif
79 | #if __has_attribute(objc_method_family)
80 | # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
81 | #else
82 | # define SWIFT_METHOD_FAMILY(X)
83 | #endif
84 | #if __has_attribute(noescape)
85 | # define SWIFT_NOESCAPE __attribute__((noescape))
86 | #else
87 | # define SWIFT_NOESCAPE
88 | #endif
89 | #if __has_attribute(warn_unused_result)
90 | # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
91 | #else
92 | # define SWIFT_WARN_UNUSED_RESULT
93 | #endif
94 | #if __has_attribute(noreturn)
95 | # define SWIFT_NORETURN __attribute__((noreturn))
96 | #else
97 | # define SWIFT_NORETURN
98 | #endif
99 | #if !defined(SWIFT_CLASS_EXTRA)
100 | # define SWIFT_CLASS_EXTRA
101 | #endif
102 | #if !defined(SWIFT_PROTOCOL_EXTRA)
103 | # define SWIFT_PROTOCOL_EXTRA
104 | #endif
105 | #if !defined(SWIFT_ENUM_EXTRA)
106 | # define SWIFT_ENUM_EXTRA
107 | #endif
108 | #if !defined(SWIFT_CLASS)
109 | # if __has_attribute(objc_subclassing_restricted)
110 | # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
111 | # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
112 | # else
113 | # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
114 | # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
115 | # endif
116 | #endif
117 | #if !defined(SWIFT_RESILIENT_CLASS)
118 | # if __has_attribute(objc_class_stub)
119 | # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
120 | # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
121 | # else
122 | # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
123 | # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
124 | # endif
125 | #endif
126 |
127 | #if !defined(SWIFT_PROTOCOL)
128 | # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
129 | # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
130 | #endif
131 |
132 | #if !defined(SWIFT_EXTENSION)
133 | # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
134 | #endif
135 |
136 | #if !defined(OBJC_DESIGNATED_INITIALIZER)
137 | # if __has_attribute(objc_designated_initializer)
138 | # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
139 | # else
140 | # define OBJC_DESIGNATED_INITIALIZER
141 | # endif
142 | #endif
143 | #if !defined(SWIFT_ENUM_ATTR)
144 | # if defined(__has_attribute) && __has_attribute(enum_extensibility)
145 | # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
146 | # else
147 | # define SWIFT_ENUM_ATTR(_extensibility)
148 | # endif
149 | #endif
150 | #if !defined(SWIFT_ENUM)
151 | # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
152 | # if __has_feature(generalized_swift_name)
153 | # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
154 | # else
155 | # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
156 | # endif
157 | #endif
158 | #if !defined(SWIFT_UNAVAILABLE)
159 | # define SWIFT_UNAVAILABLE __attribute__((unavailable))
160 | #endif
161 | #if !defined(SWIFT_UNAVAILABLE_MSG)
162 | # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
163 | #endif
164 | #if !defined(SWIFT_AVAILABILITY)
165 | # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
166 | #endif
167 | #if !defined(SWIFT_WEAK_IMPORT)
168 | # define SWIFT_WEAK_IMPORT __attribute__((weak_import))
169 | #endif
170 | #if !defined(SWIFT_DEPRECATED)
171 | # define SWIFT_DEPRECATED __attribute__((deprecated))
172 | #endif
173 | #if !defined(SWIFT_DEPRECATED_MSG)
174 | # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
175 | #endif
176 | #if __has_feature(attribute_diagnose_if_objc)
177 | # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
178 | #else
179 | # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
180 | #endif
181 | #if !defined(IBSegueAction)
182 | # define IBSegueAction
183 | #endif
184 | #if __has_feature(modules)
185 | #if __has_warning("-Watimport-in-framework-header")
186 | #pragma clang diagnostic ignored "-Watimport-in-framework-header"
187 | #endif
188 | @import CoreGraphics;
189 | @import UIKit;
190 | #endif
191 |
192 | #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
193 | #pragma clang diagnostic ignored "-Wduplicate-method-arg"
194 | #if __has_warning("-Wpragma-clang-attribute")
195 | # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
196 | #endif
197 | #pragma clang diagnostic ignored "-Wunknown-pragmas"
198 | #pragma clang diagnostic ignored "-Wnullability"
199 |
200 | #if __has_attribute(external_source_symbol)
201 | # pragma push_macro("any")
202 | # undef any
203 | # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="RingPieChart",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
204 | # pragma pop_macro("any")
205 | #endif
206 |
207 | @class NSCoder;
208 |
209 | SWIFT_CLASS("_TtC12RingPieChart8Circular")
210 | @interface Circular : UIView
211 | - (void)drawRect:(CGRect)rect;
212 | - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
213 | - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
214 | @end
215 |
216 | #if __has_attribute(external_source_symbol)
217 | # pragma clang attribute pop
218 | #endif
219 | #pragma clang diagnostic pop
220 |
221 | #else
222 | // Generated by Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
223 | #pragma clang diagnostic push
224 | #pragma clang diagnostic ignored "-Wgcc-compat"
225 |
226 | #if !defined(__has_include)
227 | # define __has_include(x) 0
228 | #endif
229 | #if !defined(__has_attribute)
230 | # define __has_attribute(x) 0
231 | #endif
232 | #if !defined(__has_feature)
233 | # define __has_feature(x) 0
234 | #endif
235 | #if !defined(__has_warning)
236 | # define __has_warning(x) 0
237 | #endif
238 |
239 | #if __has_include()
240 | # include
241 | #endif
242 |
243 | #pragma clang diagnostic ignored "-Wauto-import"
244 | #include
245 | #include
246 | #include
247 | #include
248 |
249 | #if !defined(SWIFT_TYPEDEFS)
250 | # define SWIFT_TYPEDEFS 1
251 | # if __has_include()
252 | # include
253 | # elif !defined(__cplusplus)
254 | typedef uint_least16_t char16_t;
255 | typedef uint_least32_t char32_t;
256 | # endif
257 | typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
258 | typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
259 | typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
260 | typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
261 | typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
262 | typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
263 | typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
264 | typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
265 | typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
266 | typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
267 | typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
268 | typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
269 | #endif
270 |
271 | #if !defined(SWIFT_PASTE)
272 | # define SWIFT_PASTE_HELPER(x, y) x##y
273 | # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
274 | #endif
275 | #if !defined(SWIFT_METATYPE)
276 | # define SWIFT_METATYPE(X) Class
277 | #endif
278 | #if !defined(SWIFT_CLASS_PROPERTY)
279 | # if __has_feature(objc_class_property)
280 | # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
281 | # else
282 | # define SWIFT_CLASS_PROPERTY(...)
283 | # endif
284 | #endif
285 |
286 | #if __has_attribute(objc_runtime_name)
287 | # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
288 | #else
289 | # define SWIFT_RUNTIME_NAME(X)
290 | #endif
291 | #if __has_attribute(swift_name)
292 | # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
293 | #else
294 | # define SWIFT_COMPILE_NAME(X)
295 | #endif
296 | #if __has_attribute(objc_method_family)
297 | # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
298 | #else
299 | # define SWIFT_METHOD_FAMILY(X)
300 | #endif
301 | #if __has_attribute(noescape)
302 | # define SWIFT_NOESCAPE __attribute__((noescape))
303 | #else
304 | # define SWIFT_NOESCAPE
305 | #endif
306 | #if __has_attribute(warn_unused_result)
307 | # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
308 | #else
309 | # define SWIFT_WARN_UNUSED_RESULT
310 | #endif
311 | #if __has_attribute(noreturn)
312 | # define SWIFT_NORETURN __attribute__((noreturn))
313 | #else
314 | # define SWIFT_NORETURN
315 | #endif
316 | #if !defined(SWIFT_CLASS_EXTRA)
317 | # define SWIFT_CLASS_EXTRA
318 | #endif
319 | #if !defined(SWIFT_PROTOCOL_EXTRA)
320 | # define SWIFT_PROTOCOL_EXTRA
321 | #endif
322 | #if !defined(SWIFT_ENUM_EXTRA)
323 | # define SWIFT_ENUM_EXTRA
324 | #endif
325 | #if !defined(SWIFT_CLASS)
326 | # if __has_attribute(objc_subclassing_restricted)
327 | # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
328 | # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
329 | # else
330 | # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
331 | # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
332 | # endif
333 | #endif
334 | #if !defined(SWIFT_RESILIENT_CLASS)
335 | # if __has_attribute(objc_class_stub)
336 | # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
337 | # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
338 | # else
339 | # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
340 | # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
341 | # endif
342 | #endif
343 |
344 | #if !defined(SWIFT_PROTOCOL)
345 | # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
346 | # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
347 | #endif
348 |
349 | #if !defined(SWIFT_EXTENSION)
350 | # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
351 | #endif
352 |
353 | #if !defined(OBJC_DESIGNATED_INITIALIZER)
354 | # if __has_attribute(objc_designated_initializer)
355 | # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
356 | # else
357 | # define OBJC_DESIGNATED_INITIALIZER
358 | # endif
359 | #endif
360 | #if !defined(SWIFT_ENUM_ATTR)
361 | # if defined(__has_attribute) && __has_attribute(enum_extensibility)
362 | # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
363 | # else
364 | # define SWIFT_ENUM_ATTR(_extensibility)
365 | # endif
366 | #endif
367 | #if !defined(SWIFT_ENUM)
368 | # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
369 | # if __has_feature(generalized_swift_name)
370 | # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
371 | # else
372 | # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
373 | # endif
374 | #endif
375 | #if !defined(SWIFT_UNAVAILABLE)
376 | # define SWIFT_UNAVAILABLE __attribute__((unavailable))
377 | #endif
378 | #if !defined(SWIFT_UNAVAILABLE_MSG)
379 | # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
380 | #endif
381 | #if !defined(SWIFT_AVAILABILITY)
382 | # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
383 | #endif
384 | #if !defined(SWIFT_WEAK_IMPORT)
385 | # define SWIFT_WEAK_IMPORT __attribute__((weak_import))
386 | #endif
387 | #if !defined(SWIFT_DEPRECATED)
388 | # define SWIFT_DEPRECATED __attribute__((deprecated))
389 | #endif
390 | #if !defined(SWIFT_DEPRECATED_MSG)
391 | # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
392 | #endif
393 | #if __has_feature(attribute_diagnose_if_objc)
394 | # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
395 | #else
396 | # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
397 | #endif
398 | #if !defined(IBSegueAction)
399 | # define IBSegueAction
400 | #endif
401 | #if __has_feature(modules)
402 | #if __has_warning("-Watimport-in-framework-header")
403 | #pragma clang diagnostic ignored "-Watimport-in-framework-header"
404 | #endif
405 | @import CoreGraphics;
406 | @import UIKit;
407 | #endif
408 |
409 | #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
410 | #pragma clang diagnostic ignored "-Wduplicate-method-arg"
411 | #if __has_warning("-Wpragma-clang-attribute")
412 | # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
413 | #endif
414 | #pragma clang diagnostic ignored "-Wunknown-pragmas"
415 | #pragma clang diagnostic ignored "-Wnullability"
416 |
417 | #if __has_attribute(external_source_symbol)
418 | # pragma push_macro("any")
419 | # undef any
420 | # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="RingPieChart",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
421 | # pragma pop_macro("any")
422 | #endif
423 |
424 | @class NSCoder;
425 |
426 | SWIFT_CLASS("_TtC12RingPieChart8Circular")
427 | @interface Circular : UIView
428 | - (void)drawRect:(CGRect)rect;
429 | - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
430 | - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
431 | @end
432 |
433 | #if __has_attribute(external_source_symbol)
434 | # pragma clang attribute pop
435 | #endif
436 | #pragma clang diagnostic pop
437 |
438 | #endif
439 |
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Headers/RingPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // RingPieChart.h
3 | // RingPieChart
4 | //
5 | // Created by Jawad Ali on 19/02/2020.
6 | // Copyright © 2020 Jawad Ali. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for RingPieChart.
12 | FOUNDATION_EXPORT double RingPieChartVersionNumber;
13 |
14 | //! Project version string for RingPieChart.
15 | FOUNDATION_EXPORT const unsigned char RingPieChartVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/Carthage/Build/iOS/RingPieChart.framework/Info.plist
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/arm64-apple-ios.swiftdoc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/arm64-apple-ios.swiftdoc
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/arm64-apple-ios.swiftmodule:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/arm64-apple-ios.swiftmodule
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/arm64.swiftdoc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/arm64.swiftdoc
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/arm64.swiftmodule:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/arm64.swiftmodule
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/x86_64-apple-ios-simulator.swiftdoc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/x86_64-apple-ios-simulator.swiftdoc
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/x86_64-apple-ios-simulator.swiftmodule:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/x86_64.swiftdoc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/x86_64.swiftdoc
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/x86_64.swiftmodule:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/Carthage/Build/iOS/RingPieChart.framework/Modules/RingPieChart.swiftmodule/x86_64.swiftmodule
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module RingPieChart {
2 | umbrella header "RingPieChart.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
8 | module RingPieChart.Swift {
9 | header "RingPieChart-Swift.h"
10 | requires objc
11 | }
12 |
--------------------------------------------------------------------------------
/Carthage/Build/iOS/RingPieChart.framework/RingPieChart:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/Carthage/Build/iOS/RingPieChart.framework/RingPieChart
--------------------------------------------------------------------------------
/DemoApp/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // DemoApp
4 | //
5 | // Created by Jawad Ali on 19/02/2020.
6 | // Copyright © 2020 Jawad Ali. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @available(iOS 13.0, *)
12 | @UIApplicationMain
13 | class AppDelegate: UIResponder, UIApplicationDelegate {
14 |
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | // MARK: UISceneSession Lifecycle
23 |
24 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
25 | // Called when a new scene session is being created.
26 | // Use this method to select a configuration to create the new scene with.
27 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
28 | }
29 |
30 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
31 | // Called when the user discards a scene session.
32 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
33 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
34 | }
35 |
36 |
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/DemoApp/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/DemoApp/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/DemoApp/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/DemoApp/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/DemoApp/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | $(MARKETING_VERSION)
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UIApplicationSceneManifest
24 |
25 | UIApplicationSupportsMultipleScenes
26 |
27 | UISceneConfigurations
28 |
29 | UIWindowSceneSessionRoleApplication
30 |
31 |
32 | UISceneConfigurationName
33 | Default Configuration
34 | UISceneDelegateClassName
35 | $(PRODUCT_MODULE_NAME).SceneDelegate
36 | UISceneStoryboardFile
37 | Main
38 |
39 |
40 |
41 |
42 | UILaunchStoryboardName
43 | LaunchScreen
44 | UIMainStoryboardFile
45 | Main
46 | UIRequiredDeviceCapabilities
47 |
48 | armv7
49 |
50 | UISupportedInterfaceOrientations
51 |
52 | UIInterfaceOrientationPortrait
53 | UIInterfaceOrientationLandscapeLeft
54 | UIInterfaceOrientationLandscapeRight
55 |
56 | UISupportedInterfaceOrientations~ipad
57 |
58 | UIInterfaceOrientationPortrait
59 | UIInterfaceOrientationPortraitUpsideDown
60 | UIInterfaceOrientationLandscapeLeft
61 | UIInterfaceOrientationLandscapeRight
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/DemoApp/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // DemoApp
4 | //
5 | // Created by Jawad Ali on 19/02/2020.
6 | // Copyright © 2020 Jawad Ali. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @available(iOS 13.0, *)
12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
21 | guard let _ = (scene as? UIWindowScene) else { return }
22 | }
23 |
24 | func sceneDidDisconnect(_ scene: UIScene) {
25 | // Called as the scene is being released by the system.
26 | // This occurs shortly after the scene enters the background, or when its session is discarded.
27 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
28 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
29 | }
30 |
31 | func sceneDidBecomeActive(_ scene: UIScene) {
32 | // Called when the scene has moved from an inactive state to an active state.
33 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
34 | }
35 |
36 | func sceneWillResignActive(_ scene: UIScene) {
37 | // Called when the scene will move from an active state to an inactive state.
38 | // This may occur due to temporary interruptions (ex. an incoming phone call).
39 | }
40 |
41 | func sceneWillEnterForeground(_ scene: UIScene) {
42 | // Called as the scene transitions from the background to the foreground.
43 | // Use this method to undo the changes made on entering the background.
44 | }
45 |
46 | func sceneDidEnterBackground(_ scene: UIScene) {
47 | // Called as the scene transitions from the foreground to the background.
48 | // Use this method to save data, release shared resources, and store enough scene-specific state information
49 | // to restore the scene back to its current state.
50 | }
51 |
52 |
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/DemoApp/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // DemoApp
4 | //
5 | // Created by Jawad Ali on 19/02/2020.
6 | // Copyright © 2020 Jawad Ali. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import RingPieChart
11 |
12 | class ViewController: UIViewController {
13 |
14 | @IBOutlet weak private var percentageSegment: UISegmentedControl!
15 | @IBOutlet weak private var animationSegment: UISegmentedControl!
16 | private var cir :Circular!
17 |
18 | override func viewDidAppear(_ animated: Bool) {
19 | addToView()
20 | }
21 |
22 | private func addToView() {
23 | if (cir != nil) {
24 | cir.removeFromSuperview()
25 | }
26 |
27 | cir = Circular(percentages: [42,27,18,13], colors: [#colorLiteral(red: 0.2768642902, green: 0.552749753, blue: 0.9582422376, alpha: 1),#colorLiteral(red: 0.6800097227, green: 0.2969456911, blue: 0.8304955363, alpha: 1),#colorLiteral(red: 0.9592140317, green: 0.4973406196, blue: 0.08628573269, alpha: 1),#colorLiteral(red: 0.9573473334, green: 0.2803060114, blue: 0.4532059431, alpha: 1)])
28 | cir.animationType = AnimationStyle.init(rawValue: animationSegment.selectedSegmentIndex) ?? .animationFan
29 | cir.showPercentageStyle = PercentageStyle.init(rawValue: percentageSegment.selectedSegmentIndex) ?? .none
30 | cir.frame = CGRect(x: 50, y: 50, width: 300, height: 300)
31 | cir.lineWidth = 10
32 | cir.center = self.view.center
33 |
34 | self.view.addSubview(cir)
35 | }
36 |
37 | @IBAction private func animationStyles(_ sender: UISegmentedControl) {
38 | addToView()
39 | }
40 |
41 | @IBAction private func percentagestyles(_ sender: UISegmentedControl) {
42 | addToView()
43 | }
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Jawad Ali
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.1
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "RingPieChart",
8 | products: [
9 | // Products define the executables and libraries produced by a package, and make them visible to other packages.
10 | .library(
11 | name: "RingPieChart",
12 | targets: ["RingPieChart"]),
13 | ],
14 | dependencies: [
15 | // Dependencies declare other packages that this package depends on.
16 | // .package(url: /* package url */, from: "1.0.0"),
17 | ],
18 | targets: [
19 | // Targets are the basic building blocks of a package. A target can define a module or a test suite.
20 | // Targets can depend on other targets in this package, and on products in packages which this package depends on.
21 | .target(
22 | name: "RingPieChart",
23 | dependencies: []),
24 | .testTarget(
25 | name: "RingPieChartTests",
26 | dependencies: ["RingPieChart"]),
27 | ]
28 | )
29 |
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | RingPieChart
4 |
5 | [](https://travis-ci.org/jwd-ali/RingPieChart)
6 | [](https://cocoapods.org/pods/RingPieChart)
7 | [](https://github.com/Carthage/Carthage)
8 | [](https://cocoapods.org/pods/RingPieChart)
9 | [](https://cocoapods.org/pods/RingPieChart)
10 | [](https://swift.org)
11 |
12 | Add Beautiful Ring Piechart in your Project
13 |
14 | ___
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | ## Requirements
25 |
26 | - iOS 10.0+ / Mac OS X 10.9+ / watchOS 2.0+ / tvOS 9.0+
27 | - Xcode 8.0+
28 |
29 | ## Installation
30 |
31 | ### [CocoaPods](http://cocoapods.org)
32 |
33 | To integrate **RingPieChart** into your Xcode project using CocoaPods, specify it in your `Podfile`:
34 |
35 | ```ruby
36 | use_frameworks!
37 |
38 | pod 'RingPieChart'
39 | ```
40 |
41 | Then, run the following command:
42 |
43 | ```bash
44 | $ pod install
45 | ```
46 |
47 | ### [Carthage](http://github.com/Carthage/Carthage)
48 |
49 | To integrate `RingPieChart` into your Xcode project using Carthage, specify it in your `Cartfile`:
50 |
51 | ```ogdl
52 | github "jwd-ali/RingPieChart"
53 | ```
54 |
55 | ### [Swift Package Manager (SPM)](https://swift.org/package-manager)
56 |
57 | #### Prerequisites
58 | - OSX
59 |
60 |
61 | #### Update `Package.swift`
62 | To integrate `RingPieChart` in your project, add the proper description to your `Package.swift` file:
63 | ```swift
64 | // swift-tools-version:5.0
65 | import PackageDescription
66 |
67 | let package = Package(
68 | name: "YOUR_PROJECT_NAME",
69 | dependencies: [
70 | .package(url: "https://github.com/jwd-ali/RingPieChart.git", from: "2.0.0")
71 | ],
72 | targets: [
73 | .target(
74 | name: "YOUR_TARGET_NAME",
75 | dependencies: ["RingPieChart"]
76 | ),
77 | ...
78 | ]
79 | )
80 | ```
81 |
82 | ### Manually
83 |
84 | If you prefer not to use a dependency manager, you can integrate RingPieChart into your project manually.
85 |
86 | - Add sources into your project:
87 | - Drag `Circular.swift`
88 |
89 | ## Usage
90 |
91 | > If you are using any dependency manager (pods , carthage , package manager)to integrate RingPieChart. Import RingPieChart first:
92 | > ```swift
93 | > import RingPieChart
94 | > ```
95 |
96 | > And for Manuall install you dont need to import anything
97 |
98 | - Init your ring with `percentages` and `colors`:
99 | ```swift
100 | let chart = Circular(percentages: [42,27,18,13], colors: [.blue,.purple,.orange,.red],aimationType: .animationFadeIn,showPercentageStyle: .inward)
101 | // OR
102 | let chart = Circular(percentages: [42,27,18,13], colors: [.blue,.purple,.orange,.red])
103 | ```
104 | Animation is True by default
105 | you can set frame or add constraints to chart
106 |
107 | ```swift
108 | chart.frame = CGRect(x: 50, y: 50, width: 250, height: 250)
109 | self.view .addSubview(chart)
110 | ```
111 | You can add chart line width by setting lineWidth property like this
112 | ```swift
113 | chart.lineWidth = 12
114 | ```
115 | Ring chart Has 5 values for its Animation Enum
116 | ```swift
117 | public enum AnimationStyle: Int {
118 | case animationFanAll
119 | case animationFan
120 | case animationFadeIn
121 | case animationthreeD
122 | case none
123 | }
124 | ```
125 | and 4 different styles of showing percentages. You can choose accoding to your UI needs
126 |
127 | ```swift
128 | public enum PercentageStyle : Int {
129 | case none
130 | case inward
131 | case outward
132 | case over
133 |
134 | }
135 | ```
136 |
137 | You can pass them in an initialiser or set there value after intialisation
138 | ```swift
139 | chart.animationType = .animationFan
140 | chart.showPercentageStyle = .outward
141 | ```
142 | Congratulations! You're done.
143 |
144 |
145 |
146 |
147 |
148 |
149 | ## Contributing
150 |
151 | I’d love to have help on this project. For small changes please [open a pull request](https://github.com/jwd-ali/RingPieChart/pulls), for larger changes please [open an issue](https://github.com/jwd-ali/RingPieChart/issues) first to discuss what you’d like to see.
152 |
153 |
154 | License
155 | -------
156 |
157 | RingPieChart is under [MIT](https://opensource.org/licenses/MIT). See [LICENSE](LICENSE) file for more info.
158 |
--------------------------------------------------------------------------------
/RingPieChart.framework.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/RingPieChart.framework.zip
--------------------------------------------------------------------------------
/RingPieChart.podspec:
--------------------------------------------------------------------------------
1 |
2 | Pod::Spec.new do |s|
3 | s.name = "RingPieChart"
4 | s.version = "2.0.0"
5 | s.summary = "RingPieChart framework"
6 | s.description = <<-DESC
7 | RingPieChart framework pod can create beautiful Ring Chart showing different colors and percentages of any data. its easy to use and efficient
8 | DESC
9 | s.homepage = "https://github.com/jwd-ali/IOS-Portfolio"
10 | s.license = "MIT"
11 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" }
12 | s.authors = { "Jawad Ali" => "L060214@gmail.com" }
13 | s.platforms = { :ios => "9.0" }
14 | s.source = { :git => "https://github.com/jwd-ali/RingPieChart.git", :tag => "#{s.version}" }
15 |
16 | s.source_files = "RingPieChart/**/*.{h,m,swift}"
17 | s.requires_arc = true
18 | s.swift_version = "5.0"
19 | s.frameworks = "XCTest"
20 |
21 | end
22 |
--------------------------------------------------------------------------------
/RingPieChart.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | E36BB04523FD379C00859DAD /* RingPieChart.h in Headers */ = {isa = PBXBuildFile; fileRef = E36BB04323FD379C00859DAD /* RingPieChart.h */; settings = {ATTRIBUTES = (Public, ); }; };
11 | E36BB05423FD37E500859DAD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E36BB05323FD37E500859DAD /* AppDelegate.swift */; };
12 | E36BB05623FD37E500859DAD /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E36BB05523FD37E500859DAD /* SceneDelegate.swift */; };
13 | E36BB05823FD37E500859DAD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E36BB05723FD37E500859DAD /* ViewController.swift */; };
14 | E36BB05B23FD37E500859DAD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E36BB05923FD37E500859DAD /* Main.storyboard */; };
15 | E36BB05D23FD37E600859DAD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E36BB05C23FD37E600859DAD /* Assets.xcassets */; };
16 | E36BB06023FD37E600859DAD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E36BB05E23FD37E600859DAD /* LaunchScreen.storyboard */; };
17 | E36BB07023FD63D700859DAD /* RingPieChartTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E36BB06F23FD63D700859DAD /* RingPieChartTests.swift */; };
18 | E36BB07223FD63D700859DAD /* RingPieChart.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E36BB04023FD379C00859DAD /* RingPieChart.framework */; };
19 | E36BB07823FD63E300859DAD /* RingPieChartTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = E36BB06723FD636C00859DAD /* RingPieChartTest.swift */; };
20 | E36BB07B23FD6B4700859DAD /* RingPieChart.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E36BB04023FD379C00859DAD /* RingPieChart.framework */; };
21 | E36BB07C23FD6B4700859DAD /* RingPieChart.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E36BB04023FD379C00859DAD /* RingPieChart.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
22 | E36BB0A123FE89F700859DAD /* Circular.swift in Sources */ = {isa = PBXBuildFile; fileRef = E36BB0A023FE89F700859DAD /* Circular.swift */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXContainerItemProxy section */
26 | E36BB07323FD63D700859DAD /* PBXContainerItemProxy */ = {
27 | isa = PBXContainerItemProxy;
28 | containerPortal = E36BB03723FD379C00859DAD /* Project object */;
29 | proxyType = 1;
30 | remoteGlobalIDString = E36BB03F23FD379C00859DAD;
31 | remoteInfo = RingPieChart;
32 | };
33 | E36BB07E23FD6E8500859DAD /* PBXContainerItemProxy */ = {
34 | isa = PBXContainerItemProxy;
35 | containerPortal = E36BB03723FD379C00859DAD /* Project object */;
36 | proxyType = 1;
37 | remoteGlobalIDString = E36BB05023FD37E500859DAD;
38 | remoteInfo = DemoApp;
39 | };
40 | /* End PBXContainerItemProxy section */
41 |
42 | /* Begin PBXCopyFilesBuildPhase section */
43 | E36BB07D23FD6B4700859DAD /* Embed Frameworks */ = {
44 | isa = PBXCopyFilesBuildPhase;
45 | buildActionMask = 2147483647;
46 | dstPath = "";
47 | dstSubfolderSpec = 10;
48 | files = (
49 | E36BB07C23FD6B4700859DAD /* RingPieChart.framework in Embed Frameworks */,
50 | );
51 | name = "Embed Frameworks";
52 | runOnlyForDeploymentPostprocessing = 0;
53 | };
54 | /* End PBXCopyFilesBuildPhase section */
55 |
56 | /* Begin PBXFileReference section */
57 | E36BB04023FD379C00859DAD /* RingPieChart.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RingPieChart.framework; sourceTree = BUILT_PRODUCTS_DIR; };
58 | E36BB04323FD379C00859DAD /* RingPieChart.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RingPieChart.h; sourceTree = ""; };
59 | E36BB04423FD379C00859DAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
60 | E36BB05123FD37E500859DAD /* DemoApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
61 | E36BB05323FD37E500859DAD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
62 | E36BB05523FD37E500859DAD /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; };
63 | E36BB05723FD37E500859DAD /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
64 | E36BB05A23FD37E500859DAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
65 | E36BB05C23FD37E600859DAD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
66 | E36BB05F23FD37E600859DAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
67 | E36BB06123FD37E600859DAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
68 | E36BB06723FD636C00859DAD /* RingPieChartTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RingPieChartTest.swift; sourceTree = ""; };
69 | E36BB06D23FD63D700859DAD /* RingPieChartTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RingPieChartTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
70 | E36BB06F23FD63D700859DAD /* RingPieChartTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RingPieChartTests.swift; sourceTree = ""; };
71 | E36BB07123FD63D700859DAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
72 | E36BB0A023FE89F700859DAD /* Circular.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Circular.swift; path = Sources/RingPieChart/Circular.swift; sourceTree = SOURCE_ROOT; };
73 | /* End PBXFileReference section */
74 |
75 | /* Begin PBXFrameworksBuildPhase section */
76 | E36BB03D23FD379C00859DAD /* Frameworks */ = {
77 | isa = PBXFrameworksBuildPhase;
78 | buildActionMask = 2147483647;
79 | files = (
80 | );
81 | runOnlyForDeploymentPostprocessing = 0;
82 | };
83 | E36BB04E23FD37E500859DAD /* Frameworks */ = {
84 | isa = PBXFrameworksBuildPhase;
85 | buildActionMask = 2147483647;
86 | files = (
87 | E36BB07B23FD6B4700859DAD /* RingPieChart.framework in Frameworks */,
88 | );
89 | runOnlyForDeploymentPostprocessing = 0;
90 | };
91 | E36BB06A23FD63D700859DAD /* Frameworks */ = {
92 | isa = PBXFrameworksBuildPhase;
93 | buildActionMask = 2147483647;
94 | files = (
95 | E36BB07223FD63D700859DAD /* RingPieChart.framework in Frameworks */,
96 | );
97 | runOnlyForDeploymentPostprocessing = 0;
98 | };
99 | /* End PBXFrameworksBuildPhase section */
100 |
101 | /* Begin PBXGroup section */
102 | E36BB03623FD379C00859DAD = {
103 | isa = PBXGroup;
104 | children = (
105 | E36BB04223FD379C00859DAD /* RingPieChart */,
106 | E36BB05223FD37E500859DAD /* DemoApp */,
107 | E36BB06E23FD63D700859DAD /* RingPieChartTests */,
108 | E36BB04123FD379C00859DAD /* Products */,
109 | E36BB07923FD6B3200859DAD /* Frameworks */,
110 | );
111 | sourceTree = "";
112 | };
113 | E36BB04123FD379C00859DAD /* Products */ = {
114 | isa = PBXGroup;
115 | children = (
116 | E36BB04023FD379C00859DAD /* RingPieChart.framework */,
117 | E36BB05123FD37E500859DAD /* DemoApp.app */,
118 | E36BB06D23FD63D700859DAD /* RingPieChartTests.xctest */,
119 | );
120 | name = Products;
121 | sourceTree = "";
122 | };
123 | E36BB04223FD379C00859DAD /* RingPieChart */ = {
124 | isa = PBXGroup;
125 | children = (
126 | E36BB04323FD379C00859DAD /* RingPieChart.h */,
127 | E36BB0A023FE89F700859DAD /* Circular.swift */,
128 | E36BB06723FD636C00859DAD /* RingPieChartTest.swift */,
129 | E36BB04423FD379C00859DAD /* Info.plist */,
130 | );
131 | path = RingPieChart;
132 | sourceTree = "";
133 | };
134 | E36BB05223FD37E500859DAD /* DemoApp */ = {
135 | isa = PBXGroup;
136 | children = (
137 | E36BB05323FD37E500859DAD /* AppDelegate.swift */,
138 | E36BB05523FD37E500859DAD /* SceneDelegate.swift */,
139 | E36BB05723FD37E500859DAD /* ViewController.swift */,
140 | E36BB05923FD37E500859DAD /* Main.storyboard */,
141 | E36BB05C23FD37E600859DAD /* Assets.xcassets */,
142 | E36BB05E23FD37E600859DAD /* LaunchScreen.storyboard */,
143 | E36BB06123FD37E600859DAD /* Info.plist */,
144 | );
145 | path = DemoApp;
146 | sourceTree = "";
147 | };
148 | E36BB06E23FD63D700859DAD /* RingPieChartTests */ = {
149 | isa = PBXGroup;
150 | children = (
151 | E36BB06F23FD63D700859DAD /* RingPieChartTests.swift */,
152 | E36BB07123FD63D700859DAD /* Info.plist */,
153 | );
154 | path = RingPieChartTests;
155 | sourceTree = "";
156 | };
157 | E36BB07923FD6B3200859DAD /* Frameworks */ = {
158 | isa = PBXGroup;
159 | children = (
160 | );
161 | name = Frameworks;
162 | sourceTree = "";
163 | };
164 | /* End PBXGroup section */
165 |
166 | /* Begin PBXHeadersBuildPhase section */
167 | E36BB03B23FD379C00859DAD /* Headers */ = {
168 | isa = PBXHeadersBuildPhase;
169 | buildActionMask = 2147483647;
170 | files = (
171 | E36BB04523FD379C00859DAD /* RingPieChart.h in Headers */,
172 | );
173 | runOnlyForDeploymentPostprocessing = 0;
174 | };
175 | /* End PBXHeadersBuildPhase section */
176 |
177 | /* Begin PBXNativeTarget section */
178 | E36BB03F23FD379C00859DAD /* RingPieChart */ = {
179 | isa = PBXNativeTarget;
180 | buildConfigurationList = E36BB04823FD379C00859DAD /* Build configuration list for PBXNativeTarget "RingPieChart" */;
181 | buildPhases = (
182 | E36BB03B23FD379C00859DAD /* Headers */,
183 | E36BB03C23FD379C00859DAD /* Sources */,
184 | E36BB03D23FD379C00859DAD /* Frameworks */,
185 | E36BB03E23FD379C00859DAD /* Resources */,
186 | );
187 | buildRules = (
188 | );
189 | dependencies = (
190 | );
191 | name = RingPieChart;
192 | productName = RingPieChart;
193 | productReference = E36BB04023FD379C00859DAD /* RingPieChart.framework */;
194 | productType = "com.apple.product-type.framework";
195 | };
196 | E36BB05023FD37E500859DAD /* DemoApp */ = {
197 | isa = PBXNativeTarget;
198 | buildConfigurationList = E36BB06223FD37E600859DAD /* Build configuration list for PBXNativeTarget "DemoApp" */;
199 | buildPhases = (
200 | E36BB04D23FD37E500859DAD /* Sources */,
201 | E36BB04E23FD37E500859DAD /* Frameworks */,
202 | E36BB04F23FD37E500859DAD /* Resources */,
203 | E36BB07D23FD6B4700859DAD /* Embed Frameworks */,
204 | );
205 | buildRules = (
206 | );
207 | dependencies = (
208 | );
209 | name = DemoApp;
210 | productName = DemoApp;
211 | productReference = E36BB05123FD37E500859DAD /* DemoApp.app */;
212 | productType = "com.apple.product-type.application";
213 | };
214 | E36BB06C23FD63D700859DAD /* RingPieChartTests */ = {
215 | isa = PBXNativeTarget;
216 | buildConfigurationList = E36BB07523FD63D700859DAD /* Build configuration list for PBXNativeTarget "RingPieChartTests" */;
217 | buildPhases = (
218 | E36BB06923FD63D700859DAD /* Sources */,
219 | E36BB06A23FD63D700859DAD /* Frameworks */,
220 | E36BB06B23FD63D700859DAD /* Resources */,
221 | );
222 | buildRules = (
223 | );
224 | dependencies = (
225 | E36BB07423FD63D700859DAD /* PBXTargetDependency */,
226 | E36BB07F23FD6E8500859DAD /* PBXTargetDependency */,
227 | );
228 | name = RingPieChartTests;
229 | productName = RingPieChartTests;
230 | productReference = E36BB06D23FD63D700859DAD /* RingPieChartTests.xctest */;
231 | productType = "com.apple.product-type.bundle.unit-test";
232 | };
233 | /* End PBXNativeTarget section */
234 |
235 | /* Begin PBXProject section */
236 | E36BB03723FD379C00859DAD /* Project object */ = {
237 | isa = PBXProject;
238 | attributes = {
239 | LastSwiftUpdateCheck = 1130;
240 | LastUpgradeCheck = 1130;
241 | ORGANIZATIONNAME = "Jawad Ali";
242 | TargetAttributes = {
243 | E36BB03F23FD379C00859DAD = {
244 | CreatedOnToolsVersion = 11.3;
245 | LastSwiftMigration = 1130;
246 | };
247 | E36BB05023FD37E500859DAD = {
248 | CreatedOnToolsVersion = 11.3;
249 | };
250 | E36BB06C23FD63D700859DAD = {
251 | CreatedOnToolsVersion = 11.3;
252 | TestTargetID = E36BB05023FD37E500859DAD;
253 | };
254 | };
255 | };
256 | buildConfigurationList = E36BB03A23FD379C00859DAD /* Build configuration list for PBXProject "RingPieChart" */;
257 | compatibilityVersion = "Xcode 9.3";
258 | developmentRegion = en;
259 | hasScannedForEncodings = 0;
260 | knownRegions = (
261 | en,
262 | Base,
263 | );
264 | mainGroup = E36BB03623FD379C00859DAD;
265 | productRefGroup = E36BB04123FD379C00859DAD /* Products */;
266 | projectDirPath = "";
267 | projectRoot = "";
268 | targets = (
269 | E36BB03F23FD379C00859DAD /* RingPieChart */,
270 | E36BB05023FD37E500859DAD /* DemoApp */,
271 | E36BB06C23FD63D700859DAD /* RingPieChartTests */,
272 | );
273 | };
274 | /* End PBXProject section */
275 |
276 | /* Begin PBXResourcesBuildPhase section */
277 | E36BB03E23FD379C00859DAD /* Resources */ = {
278 | isa = PBXResourcesBuildPhase;
279 | buildActionMask = 2147483647;
280 | files = (
281 | );
282 | runOnlyForDeploymentPostprocessing = 0;
283 | };
284 | E36BB04F23FD37E500859DAD /* Resources */ = {
285 | isa = PBXResourcesBuildPhase;
286 | buildActionMask = 2147483647;
287 | files = (
288 | E36BB06023FD37E600859DAD /* LaunchScreen.storyboard in Resources */,
289 | E36BB05D23FD37E600859DAD /* Assets.xcassets in Resources */,
290 | E36BB05B23FD37E500859DAD /* Main.storyboard in Resources */,
291 | );
292 | runOnlyForDeploymentPostprocessing = 0;
293 | };
294 | E36BB06B23FD63D700859DAD /* Resources */ = {
295 | isa = PBXResourcesBuildPhase;
296 | buildActionMask = 2147483647;
297 | files = (
298 | );
299 | runOnlyForDeploymentPostprocessing = 0;
300 | };
301 | /* End PBXResourcesBuildPhase section */
302 |
303 | /* Begin PBXSourcesBuildPhase section */
304 | E36BB03C23FD379C00859DAD /* Sources */ = {
305 | isa = PBXSourcesBuildPhase;
306 | buildActionMask = 2147483647;
307 | files = (
308 | E36BB0A123FE89F700859DAD /* Circular.swift in Sources */,
309 | );
310 | runOnlyForDeploymentPostprocessing = 0;
311 | };
312 | E36BB04D23FD37E500859DAD /* Sources */ = {
313 | isa = PBXSourcesBuildPhase;
314 | buildActionMask = 2147483647;
315 | files = (
316 | E36BB05823FD37E500859DAD /* ViewController.swift in Sources */,
317 | E36BB05423FD37E500859DAD /* AppDelegate.swift in Sources */,
318 | E36BB05623FD37E500859DAD /* SceneDelegate.swift in Sources */,
319 | );
320 | runOnlyForDeploymentPostprocessing = 0;
321 | };
322 | E36BB06923FD63D700859DAD /* Sources */ = {
323 | isa = PBXSourcesBuildPhase;
324 | buildActionMask = 2147483647;
325 | files = (
326 | E36BB07023FD63D700859DAD /* RingPieChartTests.swift in Sources */,
327 | E36BB07823FD63E300859DAD /* RingPieChartTest.swift in Sources */,
328 | );
329 | runOnlyForDeploymentPostprocessing = 0;
330 | };
331 | /* End PBXSourcesBuildPhase section */
332 |
333 | /* Begin PBXTargetDependency section */
334 | E36BB07423FD63D700859DAD /* PBXTargetDependency */ = {
335 | isa = PBXTargetDependency;
336 | target = E36BB03F23FD379C00859DAD /* RingPieChart */;
337 | targetProxy = E36BB07323FD63D700859DAD /* PBXContainerItemProxy */;
338 | };
339 | E36BB07F23FD6E8500859DAD /* PBXTargetDependency */ = {
340 | isa = PBXTargetDependency;
341 | target = E36BB05023FD37E500859DAD /* DemoApp */;
342 | targetProxy = E36BB07E23FD6E8500859DAD /* PBXContainerItemProxy */;
343 | };
344 | /* End PBXTargetDependency section */
345 |
346 | /* Begin PBXVariantGroup section */
347 | E36BB05923FD37E500859DAD /* Main.storyboard */ = {
348 | isa = PBXVariantGroup;
349 | children = (
350 | E36BB05A23FD37E500859DAD /* Base */,
351 | );
352 | name = Main.storyboard;
353 | sourceTree = "";
354 | };
355 | E36BB05E23FD37E600859DAD /* LaunchScreen.storyboard */ = {
356 | isa = PBXVariantGroup;
357 | children = (
358 | E36BB05F23FD37E600859DAD /* Base */,
359 | );
360 | name = LaunchScreen.storyboard;
361 | sourceTree = "";
362 | };
363 | /* End PBXVariantGroup section */
364 |
365 | /* Begin XCBuildConfiguration section */
366 | E36BB04623FD379C00859DAD /* Debug */ = {
367 | isa = XCBuildConfiguration;
368 | buildSettings = {
369 | ALWAYS_SEARCH_USER_PATHS = NO;
370 | CLANG_ANALYZER_NONNULL = YES;
371 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
372 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
373 | CLANG_CXX_LIBRARY = "libc++";
374 | CLANG_ENABLE_MODULES = YES;
375 | CLANG_ENABLE_OBJC_ARC = YES;
376 | CLANG_ENABLE_OBJC_WEAK = YES;
377 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
378 | CLANG_WARN_BOOL_CONVERSION = YES;
379 | CLANG_WARN_COMMA = YES;
380 | CLANG_WARN_CONSTANT_CONVERSION = YES;
381 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
382 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
383 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
384 | CLANG_WARN_EMPTY_BODY = YES;
385 | CLANG_WARN_ENUM_CONVERSION = YES;
386 | CLANG_WARN_INFINITE_RECURSION = YES;
387 | CLANG_WARN_INT_CONVERSION = YES;
388 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
389 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
390 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
391 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
392 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
393 | CLANG_WARN_STRICT_PROTOTYPES = YES;
394 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
395 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
396 | CLANG_WARN_UNREACHABLE_CODE = YES;
397 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
398 | CODE_SIGN_IDENTITY = "Apple Development";
399 | COPY_PHASE_STRIP = NO;
400 | CURRENT_PROJECT_VERSION = 1;
401 | DEBUG_INFORMATION_FORMAT = dwarf;
402 | ENABLE_STRICT_OBJC_MSGSEND = YES;
403 | ENABLE_TESTABILITY = YES;
404 | GCC_C_LANGUAGE_STANDARD = gnu11;
405 | GCC_DYNAMIC_NO_PIC = NO;
406 | GCC_NO_COMMON_BLOCKS = YES;
407 | GCC_OPTIMIZATION_LEVEL = 0;
408 | GCC_PREPROCESSOR_DEFINITIONS = (
409 | "DEBUG=1",
410 | "$(inherited)",
411 | );
412 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
413 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
414 | GCC_WARN_UNDECLARED_SELECTOR = YES;
415 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
416 | GCC_WARN_UNUSED_FUNCTION = YES;
417 | GCC_WARN_UNUSED_VARIABLE = YES;
418 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
419 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
420 | MTL_FAST_MATH = YES;
421 | ONLY_ACTIVE_ARCH = YES;
422 | SDKROOT = iphoneos;
423 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
424 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
425 | VERSIONING_SYSTEM = "apple-generic";
426 | VERSION_INFO_PREFIX = "";
427 | };
428 | name = Debug;
429 | };
430 | E36BB04723FD379C00859DAD /* Release */ = {
431 | isa = XCBuildConfiguration;
432 | buildSettings = {
433 | ALWAYS_SEARCH_USER_PATHS = NO;
434 | CLANG_ANALYZER_NONNULL = YES;
435 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
436 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
437 | CLANG_CXX_LIBRARY = "libc++";
438 | CLANG_ENABLE_MODULES = YES;
439 | CLANG_ENABLE_OBJC_ARC = YES;
440 | CLANG_ENABLE_OBJC_WEAK = YES;
441 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
442 | CLANG_WARN_BOOL_CONVERSION = YES;
443 | CLANG_WARN_COMMA = YES;
444 | CLANG_WARN_CONSTANT_CONVERSION = YES;
445 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
446 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
447 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
448 | CLANG_WARN_EMPTY_BODY = YES;
449 | CLANG_WARN_ENUM_CONVERSION = YES;
450 | CLANG_WARN_INFINITE_RECURSION = YES;
451 | CLANG_WARN_INT_CONVERSION = YES;
452 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
453 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
454 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
455 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
456 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
457 | CLANG_WARN_STRICT_PROTOTYPES = YES;
458 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
459 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
460 | CLANG_WARN_UNREACHABLE_CODE = YES;
461 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
462 | CODE_SIGN_IDENTITY = "Apple Development";
463 | COPY_PHASE_STRIP = NO;
464 | CURRENT_PROJECT_VERSION = 1;
465 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
466 | ENABLE_NS_ASSERTIONS = NO;
467 | ENABLE_STRICT_OBJC_MSGSEND = YES;
468 | GCC_C_LANGUAGE_STANDARD = gnu11;
469 | GCC_NO_COMMON_BLOCKS = YES;
470 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
471 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
472 | GCC_WARN_UNDECLARED_SELECTOR = YES;
473 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
474 | GCC_WARN_UNUSED_FUNCTION = YES;
475 | GCC_WARN_UNUSED_VARIABLE = YES;
476 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
477 | MTL_ENABLE_DEBUG_INFO = NO;
478 | MTL_FAST_MATH = YES;
479 | SDKROOT = iphoneos;
480 | SWIFT_COMPILATION_MODE = wholemodule;
481 | SWIFT_OPTIMIZATION_LEVEL = "-O";
482 | VALIDATE_PRODUCT = YES;
483 | VERSIONING_SYSTEM = "apple-generic";
484 | VERSION_INFO_PREFIX = "";
485 | };
486 | name = Release;
487 | };
488 | E36BB04923FD379C00859DAD /* Debug */ = {
489 | isa = XCBuildConfiguration;
490 | buildSettings = {
491 | CLANG_ENABLE_MODULES = YES;
492 | CODE_SIGN_IDENTITY = "Apple Development";
493 | CODE_SIGN_STYLE = Automatic;
494 | DEFINES_MODULE = YES;
495 | DEVELOPMENT_TEAM = M5DBAJ72E6;
496 | DYLIB_COMPATIBILITY_VERSION = 1;
497 | DYLIB_CURRENT_VERSION = 1;
498 | DYLIB_INSTALL_NAME_BASE = "@rpath";
499 | INFOPLIST_FILE = RingPieChart/Info.plist;
500 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
501 | LD_RUNPATH_SEARCH_PATHS = (
502 | "$(inherited)",
503 | "@executable_path/Frameworks",
504 | "@loader_path/Frameworks",
505 | );
506 | MARKETING_VERSION = 1.0.0;
507 | PRODUCT_BUNDLE_IDENTIFIER = XeroT.RingPieChart;
508 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
509 | PROVISIONING_PROFILE_SPECIFIER = "";
510 | SKIP_INSTALL = YES;
511 | SUPPORTS_MACCATALYST = NO;
512 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
513 | SWIFT_VERSION = 5.0;
514 | TARGETED_DEVICE_FAMILY = "1,2";
515 | };
516 | name = Debug;
517 | };
518 | E36BB04A23FD379C00859DAD /* Release */ = {
519 | isa = XCBuildConfiguration;
520 | buildSettings = {
521 | CLANG_ENABLE_MODULES = YES;
522 | CODE_SIGN_IDENTITY = "Apple Development";
523 | CODE_SIGN_STYLE = Automatic;
524 | DEFINES_MODULE = YES;
525 | DEVELOPMENT_TEAM = M5DBAJ72E6;
526 | DYLIB_COMPATIBILITY_VERSION = 1;
527 | DYLIB_CURRENT_VERSION = 1;
528 | DYLIB_INSTALL_NAME_BASE = "@rpath";
529 | INFOPLIST_FILE = RingPieChart/Info.plist;
530 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
531 | LD_RUNPATH_SEARCH_PATHS = (
532 | "$(inherited)",
533 | "@executable_path/Frameworks",
534 | "@loader_path/Frameworks",
535 | );
536 | MARKETING_VERSION = 1.0.0;
537 | PRODUCT_BUNDLE_IDENTIFIER = XeroT.RingPieChart;
538 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
539 | PROVISIONING_PROFILE_SPECIFIER = "";
540 | SKIP_INSTALL = YES;
541 | SUPPORTS_MACCATALYST = NO;
542 | SWIFT_VERSION = 5.0;
543 | TARGETED_DEVICE_FAMILY = "1,2";
544 | };
545 | name = Release;
546 | };
547 | E36BB06323FD37E600859DAD /* Debug */ = {
548 | isa = XCBuildConfiguration;
549 | buildSettings = {
550 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
551 | CODE_SIGN_IDENTITY = "Apple Development";
552 | CODE_SIGN_STYLE = Automatic;
553 | DEVELOPMENT_TEAM = M5DBAJ72E6;
554 | INFOPLIST_FILE = DemoApp/Info.plist;
555 | LD_RUNPATH_SEARCH_PATHS = (
556 | "$(inherited)",
557 | "@executable_path/Frameworks",
558 | );
559 | MARKETING_VERSION = 1.0.0;
560 | PRODUCT_BUNDLE_IDENTIFIER = XeroT.DemoApp;
561 | PRODUCT_NAME = "$(TARGET_NAME)";
562 | PROVISIONING_PROFILE_SPECIFIER = "";
563 | SWIFT_VERSION = 5.0;
564 | TARGETED_DEVICE_FAMILY = "1,2";
565 | };
566 | name = Debug;
567 | };
568 | E36BB06423FD37E600859DAD /* Release */ = {
569 | isa = XCBuildConfiguration;
570 | buildSettings = {
571 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
572 | CODE_SIGN_IDENTITY = "Apple Development";
573 | CODE_SIGN_STYLE = Automatic;
574 | DEVELOPMENT_TEAM = M5DBAJ72E6;
575 | INFOPLIST_FILE = DemoApp/Info.plist;
576 | LD_RUNPATH_SEARCH_PATHS = (
577 | "$(inherited)",
578 | "@executable_path/Frameworks",
579 | );
580 | MARKETING_VERSION = 1.0.0;
581 | PRODUCT_BUNDLE_IDENTIFIER = XeroT.DemoApp;
582 | PRODUCT_NAME = "$(TARGET_NAME)";
583 | PROVISIONING_PROFILE_SPECIFIER = "";
584 | SWIFT_VERSION = 5.0;
585 | TARGETED_DEVICE_FAMILY = "1,2";
586 | };
587 | name = Release;
588 | };
589 | E36BB07623FD63D700859DAD /* Debug */ = {
590 | isa = XCBuildConfiguration;
591 | buildSettings = {
592 | BUNDLE_LOADER = "$(TEST_HOST)";
593 | CODE_SIGN_IDENTITY = "Apple Development";
594 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
595 | CODE_SIGN_STYLE = Automatic;
596 | DEVELOPMENT_TEAM = M5DBAJ72E6;
597 | INFOPLIST_FILE = RingPieChartTests/Info.plist;
598 | LD_RUNPATH_SEARCH_PATHS = (
599 | "$(inherited)",
600 | "@executable_path/Frameworks",
601 | "@loader_path/Frameworks",
602 | );
603 | PRODUCT_BUNDLE_IDENTIFIER = XeroT.RingPieChartTests;
604 | PRODUCT_NAME = "$(TARGET_NAME)";
605 | PROVISIONING_PROFILE_SPECIFIER = "";
606 | SUPPORTS_MACCATALYST = NO;
607 | SWIFT_VERSION = 5.0;
608 | TARGETED_DEVICE_FAMILY = "1,2";
609 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DemoApp.app/DemoApp";
610 | };
611 | name = Debug;
612 | };
613 | E36BB07723FD63D700859DAD /* Release */ = {
614 | isa = XCBuildConfiguration;
615 | buildSettings = {
616 | BUNDLE_LOADER = "$(TEST_HOST)";
617 | CODE_SIGN_IDENTITY = "Apple Development";
618 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
619 | CODE_SIGN_STYLE = Automatic;
620 | DEVELOPMENT_TEAM = M5DBAJ72E6;
621 | INFOPLIST_FILE = RingPieChartTests/Info.plist;
622 | LD_RUNPATH_SEARCH_PATHS = (
623 | "$(inherited)",
624 | "@executable_path/Frameworks",
625 | "@loader_path/Frameworks",
626 | );
627 | PRODUCT_BUNDLE_IDENTIFIER = XeroT.RingPieChartTests;
628 | PRODUCT_NAME = "$(TARGET_NAME)";
629 | PROVISIONING_PROFILE_SPECIFIER = "";
630 | SUPPORTS_MACCATALYST = NO;
631 | SWIFT_VERSION = 5.0;
632 | TARGETED_DEVICE_FAMILY = "1,2";
633 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DemoApp.app/DemoApp";
634 | };
635 | name = Release;
636 | };
637 | /* End XCBuildConfiguration section */
638 |
639 | /* Begin XCConfigurationList section */
640 | E36BB03A23FD379C00859DAD /* Build configuration list for PBXProject "RingPieChart" */ = {
641 | isa = XCConfigurationList;
642 | buildConfigurations = (
643 | E36BB04623FD379C00859DAD /* Debug */,
644 | E36BB04723FD379C00859DAD /* Release */,
645 | );
646 | defaultConfigurationIsVisible = 0;
647 | defaultConfigurationName = Release;
648 | };
649 | E36BB04823FD379C00859DAD /* Build configuration list for PBXNativeTarget "RingPieChart" */ = {
650 | isa = XCConfigurationList;
651 | buildConfigurations = (
652 | E36BB04923FD379C00859DAD /* Debug */,
653 | E36BB04A23FD379C00859DAD /* Release */,
654 | );
655 | defaultConfigurationIsVisible = 0;
656 | defaultConfigurationName = Release;
657 | };
658 | E36BB06223FD37E600859DAD /* Build configuration list for PBXNativeTarget "DemoApp" */ = {
659 | isa = XCConfigurationList;
660 | buildConfigurations = (
661 | E36BB06323FD37E600859DAD /* Debug */,
662 | E36BB06423FD37E600859DAD /* Release */,
663 | );
664 | defaultConfigurationIsVisible = 0;
665 | defaultConfigurationName = Release;
666 | };
667 | E36BB07523FD63D700859DAD /* Build configuration list for PBXNativeTarget "RingPieChartTests" */ = {
668 | isa = XCConfigurationList;
669 | buildConfigurations = (
670 | E36BB07623FD63D700859DAD /* Debug */,
671 | E36BB07723FD63D700859DAD /* Release */,
672 | );
673 | defaultConfigurationIsVisible = 0;
674 | defaultConfigurationName = Release;
675 | };
676 | /* End XCConfigurationList section */
677 | };
678 | rootObject = E36BB03723FD379C00859DAD /* Project object */;
679 | }
680 |
--------------------------------------------------------------------------------
/RingPieChart.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RingPieChart.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RingPieChart.xcodeproj/xcshareddata/xcschemes/DemoApp.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
45 |
51 |
52 |
53 |
54 |
60 |
62 |
68 |
69 |
70 |
71 |
73 |
74 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/RingPieChart.xcodeproj/xcshareddata/xcschemes/RingPieChart.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
44 |
45 |
46 |
47 |
48 |
58 |
59 |
65 |
66 |
72 |
73 |
74 |
75 |
77 |
78 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/RingPieChart.xcodeproj/xcshareddata/xcschemes/RingPieChartTests.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/RingPieChart.xcodeproj/xcuserdata/jawadali.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DemoApp.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 | RingPieChart.xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 1
16 |
17 | RingPieChartTests.xcscheme_^#shared#^_
18 |
19 | orderHint
20 | 2
21 |
22 |
23 | SuppressBuildableAutocreation
24 |
25 | E36BB03F23FD379C00859DAD
26 |
27 | primary
28 |
29 |
30 | E36BB05023FD37E500859DAD
31 |
32 | primary
33 |
34 |
35 | E36BB06C23FD63D700859DAD
36 |
37 | primary
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/RingPieChart/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | $(MARKETING_VERSION)
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RingPieChart/RingPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // RingPieChart.h
3 | // RingPieChart
4 | //
5 | // Created by Jawad Ali on 19/02/2020.
6 | // Copyright © 2020 Jawad Ali. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for RingPieChart.
12 | FOUNDATION_EXPORT double RingPieChartVersionNumber;
13 |
14 | //! Project version string for RingPieChart.
15 | FOUNDATION_EXPORT const unsigned char RingPieChartVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/RingPieChart/RingPieChartTest.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RingPieChartTest.swift
3 | // RingPieChart
4 | //
5 | // Created by Jawad Ali on 19/02/2020.
6 | // Copyright © 2020 Jawad Ali. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class RingPieChartTest: XCTestCase {
12 |
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | self.measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/RingPieChartTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/RingPieChartTests/RingPieChartTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RingPieChartTests.swift
3 | // RingPieChartTests
4 | //
5 | // Created by Jawad Ali on 19/02/2020.
6 | // Copyright © 2020 Jawad Ali. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class RingPieChartTests: XCTestCase {
12 |
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDown() {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() {
27 | // This is an example of a performance test case.
28 | measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/Sources/RingPieChart/Circular.swift:
--------------------------------------------------------------------------------
1 | //
2 | // circular.swift
3 | // bezierPath
4 | //
5 | // Created by Jawad Ali on 18/02/2020.
6 | // Copyright © 2020 Jawad Ali. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | // MARK: - Enums
11 | public enum AnimationStyle: Int {
12 | case animationFanAll
13 | case animationFan
14 | case animationFadeIn
15 | case animationthreeD
16 | case none
17 | }
18 |
19 | public enum PercentageStyle : Int {
20 | case none
21 | case inward
22 | case outward
23 | case over
24 |
25 | }
26 | open class Circular: UIView {
27 |
28 | // MARK: - Public Properties
29 | public var animationType: AnimationStyle {
30 | get {
31 | return _animationType
32 | }
33 | set(newValue) {
34 | _animationType = newValue
35 | setNeedsDisplay()
36 | }
37 | }
38 |
39 | public var showPercentageStyle: PercentageStyle {
40 | get {
41 | return _showPercentageStyle
42 | }
43 | set(newValue) {
44 | _showPercentageStyle = newValue
45 | setNeedsDisplay()
46 | }
47 | }
48 |
49 | public var lineWidth: CGFloat {
50 | get {
51 | return _lineWidth
52 | }
53 | set(newValue) {
54 | _lineWidth = newValue
55 | setNeedsDisplay()
56 | }
57 | }
58 |
59 | // MARK:- Private Variable
60 |
61 | private var _percentages: [Double]
62 |
63 | private var _colors: [UIColor]
64 |
65 | private var _lineWidth = CGFloat( 10.0)
66 |
67 | private var _animationType: AnimationStyle
68 |
69 | private var _showPercentageStyle: PercentageStyle
70 |
71 |
72 |
73 | //MARK:- draw
74 |
75 | override public func draw(_ rect: CGRect) {
76 | var startAngle = -90.0
77 |
78 | for i in 0..<_percentages.count {
79 |
80 | let endAngle = startAngle + ( _percentages[i] * 3.6 ) - 4
81 |
82 | let shapeLayer = self.addArac(with: _colors[i], in: rect, startAngle: startAngle, endAngle: endAngle)
83 | showAnimationStyle(index: Double(i), shapeLayer: shapeLayer, startAngle: startAngle, endAngle: endAngle)
84 | showPercentages(midAngel:startAngle + (endAngle - startAngle)/2, percentage: _percentages[i])
85 |
86 | startAngle = (endAngle + 4 )
87 | }
88 |
89 | }
90 |
91 | //MARK:- inializer
92 |
93 | public init(percentages:[Double],colors:[UIColor],aimationType:AnimationStyle = .animationFanAll , showPercentageStyle: PercentageStyle = .none) {
94 |
95 | self._percentages = percentages
96 | self._colors = colors
97 | self._animationType = aimationType
98 | self._showPercentageStyle = showPercentageStyle
99 | super.init(frame:CGRect.zero)
100 | self.backgroundColor = .clear
101 | self.clipsToBounds = false
102 | }
103 |
104 | required public init?(coder: NSCoder) {
105 | // super.init(coder: coder)
106 | fatalError("init(coder:) has not been implemented")
107 | }
108 |
109 |
110 | //MARK:- Animations Functions
111 | private func showAnimationStyle(index:Double,shapeLayer:CAShapeLayer,startAngle:Double,endAngle:Double) {
112 |
113 | switch _animationType {
114 | case .animationFanAll:
115 | maskEachLayerAnimation(startAngal: startAngle, endAngal: endAngle + 4 , shape: shapeLayer)
116 | case .animationFan:
117 | if Int(index) == _percentages.count - 1 {
118 | maskAnimation()
119 | }
120 | case .animationFadeIn:
121 | oppacityAnimation(index: index, shape: shapeLayer)
122 | case .animationthreeD:
123 | transformAnimation(index: index, shape: shapeLayer)
124 | case .none:
125 | break
126 |
127 | }
128 | }
129 |
130 | private func oppacityAnimation(index:Double,shape:CAShapeLayer) {
131 | shape.opacity = 0
132 | DispatchQueue.main.asyncAfter(deadline: .now() + Double(index)/2.5 ) {
133 | shape.opacity = 1
134 | let animation = CABasicAnimation(keyPath: "opacity")
135 | animation.fromValue = 0
136 | animation.toValue = 1
137 | animation.duration = 1
138 | shape.add(animation, forKey: nil)
139 | }
140 | }
141 |
142 | private func transformAnimation(index:Double,shape:CAShapeLayer){
143 | shape.opacity = 0
144 | DispatchQueue.main.asyncAfter(deadline: .now() + Double(index)/2.5 ) {
145 | shape.opacity = 1
146 | let animation = CABasicAnimation(keyPath: "transform")
147 | animation.fromValue = CATransform3DMakeScale(0, 0, 1)
148 | animation.toValue = CATransform3DIdentity
149 | animation.duration = 1
150 | shape.add(animation, forKey: nil)
151 | }
152 | }
153 |
154 | private func maskEachLayerAnimation(startAngal:Double,endAngal:Double,shape:CAShapeLayer){
155 |
156 | let shapeLayer = CAShapeLayer()
157 | shapeLayer.fillColor = UIColor.clear.cgColor
158 | shapeLayer.strokeColor = UIColor.green.cgColor
159 | shapeLayer.lineWidth = max( bounds.maxX,bounds.maxY)/5
160 | shapeLayer.frame = bounds
161 | let center = CGPoint(x: bounds.midX, y: bounds.midY)
162 | let longestSide = max(bounds.height,bounds.width)
163 | shapeLayer.path = UIBezierPath(arcCenter: center, radius: longestSide/2, startAngle: CGFloat(startAngal).deg2rad(), endAngle: CGFloat(endAngal ).deg2rad(), clockwise: true).cgPath
164 | shapeLayer.strokeEnd = 0
165 | shape.mask = shapeLayer
166 |
167 | addAnimationToLayer(toLayer: shape, fromLayer: shapeLayer)
168 |
169 | }
170 |
171 | private func maskAnimation() {
172 |
173 | let shapeLayer = CAShapeLayer()
174 | shapeLayer.fillColor = UIColor.clear.cgColor
175 | shapeLayer.strokeColor = UIColor.white.cgColor
176 | shapeLayer.lineWidth = max( bounds.maxX,bounds.maxY)/2
177 | shapeLayer.frame = bounds
178 | let path = UIBezierPath(arcCenter: CGPoint(x:bounds.midX,y:bounds.midY), radius:max( bounds.maxX/2,bounds.maxY/2), startAngle: CGFloat(-89.0).deg2rad(), endAngle: CGFloat( 270.0).deg2rad(), clockwise: true)
179 |
180 | shapeLayer.path = path.cgPath
181 | shapeLayer.strokeEnd = 0
182 | self.layer.mask = shapeLayer
183 |
184 | addAnimationToLayer(toLayer: self.layer, fromLayer: shapeLayer)
185 |
186 | }
187 |
188 | private func addAnimationToLayer(toLayer:CALayer , fromLayer:CAShapeLayer) {
189 |
190 | CATransaction.begin()
191 | CATransaction.setCompletionBlock {
192 | toLayer.mask = nil
193 | }
194 |
195 | let animation = CABasicAnimation(keyPath: "strokeEnd")
196 | animation.beginTime = CACurrentMediaTime() + 0.3
197 | animation.fromValue = 0
198 | animation.toValue = 1
199 | animation.fillMode = .forwards
200 | animation.isRemovedOnCompletion = false
201 | animation.duration = 1
202 | fromLayer.add(animation, forKey: "line")
203 |
204 | CATransaction.commit()
205 |
206 | }
207 |
208 | //MARK:- show percentages
209 | private func showPercentages(midAngel:Double, percentage:Double) {
210 |
211 | guard let radius = getRadiusOfPercentage() else {
212 | return
213 | }
214 |
215 | let center = CGPoint(x: bounds.maxX / 2, y: bounds.maxY / 2)
216 |
217 | let x = center.x + (radius) * CGFloat(cos(CGFloat(midAngel).deg2rad()))
218 | let y = center.y + (radius) * CGFloat(sin(CGFloat(midAngel).deg2rad()))
219 |
220 |
221 | let percentageLabel = UILabel(frame: CGRect.zero)
222 | percentageLabel.frame = CGRect.zero
223 | percentageLabel.text = String(percentage)
224 | percentageLabel.textColor = .black
225 | percentageLabel.font = UIFont.boldSystemFont(ofSize: 12)
226 | percentageLabel.sizeToFit()
227 | percentageLabel.center = CGPoint(x:x,y:y)
228 | addSubview(percentageLabel)
229 | percentageLabel.alpha = 0
230 |
231 | var delay = 1.5
232 | if self.animationType == .none {
233 | delay = 0
234 | }
235 |
236 | UIView.animate(withDuration: 0.5, delay: delay, options: .curveEaseOut, animations: {
237 | percentageLabel.alpha = 1
238 | })
239 | }
240 |
241 | private func getRadiusOfPercentage() -> CGFloat? {
242 | let longestSide = max(bounds.height,bounds.width)
243 | switch self.showPercentageStyle {
244 | case .inward:
245 | return longestSide/3 - lineWidth
246 | case .over:
247 | return longestSide/2 - lineWidth
248 | case .outward:
249 | return longestSide/2 + lineWidth + 5
250 | case .none:
251 | return nil
252 | }
253 | }
254 |
255 | //MARK:- Drawing Code
256 |
257 | private func addArac(with color:UIColor ,in rect:CGRect, startAngle:Double , endAngle:Double)-> CAShapeLayer {
258 |
259 | let center = CGPoint(x: rect.maxX / 2, y: rect.maxY / 2)
260 |
261 | let longestSide = max(rect.height,rect.width)
262 |
263 | let lineWidth = CGFloat(self._lineWidth / 20)
264 |
265 | let smallCircleRadious = (longestSide / (2 + lineWidth))
266 |
267 | let startAngle = CGFloat(startAngle)
268 |
269 | let endAngle = CGFloat(endAngle)
270 |
271 | let outerRadious = (longestSide / 2)
272 |
273 | let midPoint = (longestSide / (2 + lineWidth/2.7))
274 |
275 | let path = UIBezierPath()
276 |
277 | let x3 = center.x + (outerRadious) * CGFloat(cos(startAngle.deg2rad()))
278 | let y3 = center.y + (outerRadious) * CGFloat(sin(startAngle.deg2rad()))
279 |
280 |
281 | let x4 = center.x + (smallCircleRadious) * CGFloat(cos(startAngle.deg2rad()))
282 | let y4 = center.y + (smallCircleRadious) * CGFloat(sin(startAngle.deg2rad()))
283 |
284 |
285 | let x5 = center.x + (midPoint) * CGFloat(cos((startAngle + self._lineWidth * 0.5).deg2rad()))
286 | let y5 = center.y + (midPoint) * CGFloat(sin((startAngle + self._lineWidth * 0.5).deg2rad()))
287 |
288 | path.move(to: CGPoint(x:x4,y:y4))
289 | path.addQuadCurve(to: CGPoint(x:x3,y:y3), controlPoint: CGPoint(x:x5,y:y5))
290 |
291 | path.addArc(withCenter:center, radius:outerRadious, startAngle: startAngle.deg2rad() , endAngle: endAngle.deg2rad(), clockwise: true)
292 |
293 | let x1 = center.x + (outerRadious) * CGFloat(cos(endAngle.deg2rad()))
294 | let y1 = center.y + (outerRadious) * CGFloat(sin(endAngle.deg2rad()))
295 |
296 | let x6 = center.x + (midPoint) * CGFloat(cos((endAngle + self._lineWidth * 0.6).deg2rad()))
297 | let y6 = center.y + (midPoint) * CGFloat(sin((endAngle + self._lineWidth * 0.6).deg2rad()))
298 |
299 | let x2 = center.x + (smallCircleRadious) * CGFloat(cos(endAngle.deg2rad()))
300 | let y2 = center.y + (smallCircleRadious) * CGFloat(sin(endAngle.deg2rad()))
301 |
302 |
303 | path.move(to: CGPoint(x:x1,y:y1))
304 | path.addQuadCurve(to: CGPoint(x:x2,y:y2), controlPoint: CGPoint(x:x6,y:y6))
305 | path.addArc(withCenter:center, radius: smallCircleRadious, startAngle: endAngle.deg2rad(), endAngle: startAngle.deg2rad(), clockwise: false)
306 |
307 |
308 | let shape = CAShapeLayer()
309 | shape.frame = bounds
310 | shape.lineCap = .round
311 | shape.fillColor = color.cgColor
312 | shape.path = path.cgPath
313 | layer.addSublayer(shape)
314 |
315 | return shape
316 |
317 | }
318 | }
319 | extension CGFloat {
320 | func deg2rad() -> CGFloat {
321 | return self * .pi / 180
322 | }
323 | }
324 |
--------------------------------------------------------------------------------
/Tests/LinuxMain.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 |
3 | import RingPieChartTests
4 |
5 | var tests = [XCTestCaseEntry]()
6 | tests += RingPieChartTests.allTests()
7 | XCTMain(tests)
8 |
--------------------------------------------------------------------------------
/Tests/RingPieChartTests/RingPieChartTests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | @testable import RingPieChart
3 |
4 | final class RingPieChartTests: XCTestCase {
5 | func testExample() {
6 | // This is an example of a functional test case.
7 | // Use XCTAssert and related functions to verify your tests produce the correct
8 | // results.
9 | // XCTAssertEqual(RingPieChart().text, "Hello, World!")
10 | }
11 |
12 | static var allTests = [
13 | ("testExample", testExample),
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/Tests/RingPieChartTests/XCTestManifests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 |
3 | #if !canImport(ObjectiveC)
4 | public func allTests() -> [XCTestCaseEntry] {
5 | return [
6 | testCase(RingPieChartTests.allTests),
7 | ]
8 | }
9 | #endif
10 |
--------------------------------------------------------------------------------
/images/demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/images/demo.png
--------------------------------------------------------------------------------
/images/ezgif.com-video-to-gif.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwd-ali/RingPieChart/8a5a76c1f6db562ab382bebb4b7c079b30fc4008/images/ezgif.com-video-to-gif.gif
--------------------------------------------------------------------------------