├── Demo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── rashidlatif55.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Demo ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── circle_radio_selected.imageset │ │ ├── Contents.json │ │ └── radio-on-button.png │ └── circle_radio_unselected.imageset │ │ ├── Contents.json │ │ └── circle.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Demo.xcdatamodeld │ ├── .xccurrentversion │ └── Demo.xcdatamodel │ │ └── contents ├── Info.plist ├── SceneDelegate.swift └── ViewController.swift ├── DemoTests ├── DemoTests.swift └── Info.plist └── DemoUITests ├── DemoUITests.swift └── Info.plist /Demo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 34D4AE7B24DEE98700C6C66D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4AE7A24DEE98700C6C66D /* AppDelegate.swift */; }; 11 | 34D4AE7D24DEE98700C6C66D /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4AE7C24DEE98700C6C66D /* SceneDelegate.swift */; }; 12 | 34D4AE7F24DEE98700C6C66D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4AE7E24DEE98700C6C66D /* ViewController.swift */; }; 13 | 34D4AE8224DEE98700C6C66D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34D4AE8024DEE98700C6C66D /* Main.storyboard */; }; 14 | 34D4AE8524DEE98700C6C66D /* Demo.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 34D4AE8324DEE98700C6C66D /* Demo.xcdatamodeld */; }; 15 | 34D4AE8724DEE98D00C6C66D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 34D4AE8624DEE98D00C6C66D /* Assets.xcassets */; }; 16 | 34D4AE8A24DEE98D00C6C66D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34D4AE8824DEE98D00C6C66D /* LaunchScreen.storyboard */; }; 17 | 34D4AE9524DEE98D00C6C66D /* DemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4AE9424DEE98D00C6C66D /* DemoTests.swift */; }; 18 | 34D4AEA024DEE98D00C6C66D /* DemoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4AE9F24DEE98D00C6C66D /* DemoUITests.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 34D4AE9124DEE98D00C6C66D /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 34D4AE6F24DEE98700C6C66D /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 34D4AE7624DEE98700C6C66D; 27 | remoteInfo = Demo; 28 | }; 29 | 34D4AE9C24DEE98D00C6C66D /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 34D4AE6F24DEE98700C6C66D /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 34D4AE7624DEE98700C6C66D; 34 | remoteInfo = Demo; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 34D4AE7724DEE98700C6C66D /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 34D4AE7A24DEE98700C6C66D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 41 | 34D4AE7C24DEE98700C6C66D /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 42 | 34D4AE7E24DEE98700C6C66D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 43 | 34D4AE8124DEE98700C6C66D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 44 | 34D4AE8424DEE98700C6C66D /* Demo.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Demo.xcdatamodel; sourceTree = ""; }; 45 | 34D4AE8624DEE98D00C6C66D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46 | 34D4AE8924DEE98D00C6C66D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 47 | 34D4AE8B24DEE98D00C6C66D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | 34D4AE9024DEE98D00C6C66D /* DemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 34D4AE9424DEE98D00C6C66D /* DemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoTests.swift; sourceTree = ""; }; 50 | 34D4AE9624DEE98D00C6C66D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 34D4AE9B24DEE98D00C6C66D /* DemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 34D4AE9F24DEE98D00C6C66D /* DemoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoUITests.swift; sourceTree = ""; }; 53 | 34D4AEA124DEE98D00C6C66D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 34D4AE7424DEE98700C6C66D /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | 34D4AE8D24DEE98D00C6C66D /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | 34D4AE9824DEE98D00C6C66D /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | /* End PBXFrameworksBuildPhase section */ 79 | 80 | /* Begin PBXGroup section */ 81 | 34D4AE6E24DEE98700C6C66D = { 82 | isa = PBXGroup; 83 | children = ( 84 | 34D4AE7924DEE98700C6C66D /* Demo */, 85 | 34D4AE9324DEE98D00C6C66D /* DemoTests */, 86 | 34D4AE9E24DEE98D00C6C66D /* DemoUITests */, 87 | 34D4AE7824DEE98700C6C66D /* Products */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | 34D4AE7824DEE98700C6C66D /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 34D4AE7724DEE98700C6C66D /* Demo.app */, 95 | 34D4AE9024DEE98D00C6C66D /* DemoTests.xctest */, 96 | 34D4AE9B24DEE98D00C6C66D /* DemoUITests.xctest */, 97 | ); 98 | name = Products; 99 | sourceTree = ""; 100 | }; 101 | 34D4AE7924DEE98700C6C66D /* Demo */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 34D4AE7A24DEE98700C6C66D /* AppDelegate.swift */, 105 | 34D4AE7C24DEE98700C6C66D /* SceneDelegate.swift */, 106 | 34D4AE7E24DEE98700C6C66D /* ViewController.swift */, 107 | 34D4AE8024DEE98700C6C66D /* Main.storyboard */, 108 | 34D4AE8624DEE98D00C6C66D /* Assets.xcassets */, 109 | 34D4AE8824DEE98D00C6C66D /* LaunchScreen.storyboard */, 110 | 34D4AE8B24DEE98D00C6C66D /* Info.plist */, 111 | 34D4AE8324DEE98700C6C66D /* Demo.xcdatamodeld */, 112 | ); 113 | path = Demo; 114 | sourceTree = ""; 115 | }; 116 | 34D4AE9324DEE98D00C6C66D /* DemoTests */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 34D4AE9424DEE98D00C6C66D /* DemoTests.swift */, 120 | 34D4AE9624DEE98D00C6C66D /* Info.plist */, 121 | ); 122 | path = DemoTests; 123 | sourceTree = ""; 124 | }; 125 | 34D4AE9E24DEE98D00C6C66D /* DemoUITests */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 34D4AE9F24DEE98D00C6C66D /* DemoUITests.swift */, 129 | 34D4AEA124DEE98D00C6C66D /* Info.plist */, 130 | ); 131 | path = DemoUITests; 132 | sourceTree = ""; 133 | }; 134 | /* End PBXGroup section */ 135 | 136 | /* Begin PBXNativeTarget section */ 137 | 34D4AE7624DEE98700C6C66D /* Demo */ = { 138 | isa = PBXNativeTarget; 139 | buildConfigurationList = 34D4AEA424DEE98D00C6C66D /* Build configuration list for PBXNativeTarget "Demo" */; 140 | buildPhases = ( 141 | 34D4AE7324DEE98700C6C66D /* Sources */, 142 | 34D4AE7424DEE98700C6C66D /* Frameworks */, 143 | 34D4AE7524DEE98700C6C66D /* Resources */, 144 | ); 145 | buildRules = ( 146 | ); 147 | dependencies = ( 148 | ); 149 | name = Demo; 150 | productName = Demo; 151 | productReference = 34D4AE7724DEE98700C6C66D /* Demo.app */; 152 | productType = "com.apple.product-type.application"; 153 | }; 154 | 34D4AE8F24DEE98D00C6C66D /* DemoTests */ = { 155 | isa = PBXNativeTarget; 156 | buildConfigurationList = 34D4AEA724DEE98D00C6C66D /* Build configuration list for PBXNativeTarget "DemoTests" */; 157 | buildPhases = ( 158 | 34D4AE8C24DEE98D00C6C66D /* Sources */, 159 | 34D4AE8D24DEE98D00C6C66D /* Frameworks */, 160 | 34D4AE8E24DEE98D00C6C66D /* Resources */, 161 | ); 162 | buildRules = ( 163 | ); 164 | dependencies = ( 165 | 34D4AE9224DEE98D00C6C66D /* PBXTargetDependency */, 166 | ); 167 | name = DemoTests; 168 | productName = DemoTests; 169 | productReference = 34D4AE9024DEE98D00C6C66D /* DemoTests.xctest */; 170 | productType = "com.apple.product-type.bundle.unit-test"; 171 | }; 172 | 34D4AE9A24DEE98D00C6C66D /* DemoUITests */ = { 173 | isa = PBXNativeTarget; 174 | buildConfigurationList = 34D4AEAA24DEE98D00C6C66D /* Build configuration list for PBXNativeTarget "DemoUITests" */; 175 | buildPhases = ( 176 | 34D4AE9724DEE98D00C6C66D /* Sources */, 177 | 34D4AE9824DEE98D00C6C66D /* Frameworks */, 178 | 34D4AE9924DEE98D00C6C66D /* Resources */, 179 | ); 180 | buildRules = ( 181 | ); 182 | dependencies = ( 183 | 34D4AE9D24DEE98D00C6C66D /* PBXTargetDependency */, 184 | ); 185 | name = DemoUITests; 186 | productName = DemoUITests; 187 | productReference = 34D4AE9B24DEE98D00C6C66D /* DemoUITests.xctest */; 188 | productType = "com.apple.product-type.bundle.ui-testing"; 189 | }; 190 | /* End PBXNativeTarget section */ 191 | 192 | /* Begin PBXProject section */ 193 | 34D4AE6F24DEE98700C6C66D /* Project object */ = { 194 | isa = PBXProject; 195 | attributes = { 196 | LastSwiftUpdateCheck = 1160; 197 | LastUpgradeCheck = 1160; 198 | ORGANIZATIONNAME = "Cmall biz llc"; 199 | TargetAttributes = { 200 | 34D4AE7624DEE98700C6C66D = { 201 | CreatedOnToolsVersion = 11.6; 202 | }; 203 | 34D4AE8F24DEE98D00C6C66D = { 204 | CreatedOnToolsVersion = 11.6; 205 | TestTargetID = 34D4AE7624DEE98700C6C66D; 206 | }; 207 | 34D4AE9A24DEE98D00C6C66D = { 208 | CreatedOnToolsVersion = 11.6; 209 | TestTargetID = 34D4AE7624DEE98700C6C66D; 210 | }; 211 | }; 212 | }; 213 | buildConfigurationList = 34D4AE7224DEE98700C6C66D /* Build configuration list for PBXProject "Demo" */; 214 | compatibilityVersion = "Xcode 9.3"; 215 | developmentRegion = en; 216 | hasScannedForEncodings = 0; 217 | knownRegions = ( 218 | en, 219 | Base, 220 | ); 221 | mainGroup = 34D4AE6E24DEE98700C6C66D; 222 | productRefGroup = 34D4AE7824DEE98700C6C66D /* Products */; 223 | projectDirPath = ""; 224 | projectRoot = ""; 225 | targets = ( 226 | 34D4AE7624DEE98700C6C66D /* Demo */, 227 | 34D4AE8F24DEE98D00C6C66D /* DemoTests */, 228 | 34D4AE9A24DEE98D00C6C66D /* DemoUITests */, 229 | ); 230 | }; 231 | /* End PBXProject section */ 232 | 233 | /* Begin PBXResourcesBuildPhase section */ 234 | 34D4AE7524DEE98700C6C66D /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 34D4AE8A24DEE98D00C6C66D /* LaunchScreen.storyboard in Resources */, 239 | 34D4AE8724DEE98D00C6C66D /* Assets.xcassets in Resources */, 240 | 34D4AE8224DEE98700C6C66D /* Main.storyboard in Resources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | 34D4AE8E24DEE98D00C6C66D /* Resources */ = { 245 | isa = PBXResourcesBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | }; 251 | 34D4AE9924DEE98D00C6C66D /* Resources */ = { 252 | isa = PBXResourcesBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | }; 258 | /* End PBXResourcesBuildPhase section */ 259 | 260 | /* Begin PBXSourcesBuildPhase section */ 261 | 34D4AE7324DEE98700C6C66D /* Sources */ = { 262 | isa = PBXSourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 34D4AE7F24DEE98700C6C66D /* ViewController.swift in Sources */, 266 | 34D4AE7B24DEE98700C6C66D /* AppDelegate.swift in Sources */, 267 | 34D4AE8524DEE98700C6C66D /* Demo.xcdatamodeld in Sources */, 268 | 34D4AE7D24DEE98700C6C66D /* SceneDelegate.swift in Sources */, 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | }; 272 | 34D4AE8C24DEE98D00C6C66D /* Sources */ = { 273 | isa = PBXSourcesBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | 34D4AE9524DEE98D00C6C66D /* DemoTests.swift in Sources */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | 34D4AE9724DEE98D00C6C66D /* Sources */ = { 281 | isa = PBXSourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | 34D4AEA024DEE98D00C6C66D /* DemoUITests.swift in Sources */, 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | /* End PBXSourcesBuildPhase section */ 289 | 290 | /* Begin PBXTargetDependency section */ 291 | 34D4AE9224DEE98D00C6C66D /* PBXTargetDependency */ = { 292 | isa = PBXTargetDependency; 293 | target = 34D4AE7624DEE98700C6C66D /* Demo */; 294 | targetProxy = 34D4AE9124DEE98D00C6C66D /* PBXContainerItemProxy */; 295 | }; 296 | 34D4AE9D24DEE98D00C6C66D /* PBXTargetDependency */ = { 297 | isa = PBXTargetDependency; 298 | target = 34D4AE7624DEE98700C6C66D /* Demo */; 299 | targetProxy = 34D4AE9C24DEE98D00C6C66D /* PBXContainerItemProxy */; 300 | }; 301 | /* End PBXTargetDependency section */ 302 | 303 | /* Begin PBXVariantGroup section */ 304 | 34D4AE8024DEE98700C6C66D /* Main.storyboard */ = { 305 | isa = PBXVariantGroup; 306 | children = ( 307 | 34D4AE8124DEE98700C6C66D /* Base */, 308 | ); 309 | name = Main.storyboard; 310 | sourceTree = ""; 311 | }; 312 | 34D4AE8824DEE98D00C6C66D /* LaunchScreen.storyboard */ = { 313 | isa = PBXVariantGroup; 314 | children = ( 315 | 34D4AE8924DEE98D00C6C66D /* Base */, 316 | ); 317 | name = LaunchScreen.storyboard; 318 | sourceTree = ""; 319 | }; 320 | /* End PBXVariantGroup section */ 321 | 322 | /* Begin XCBuildConfiguration section */ 323 | 34D4AEA224DEE98D00C6C66D /* Debug */ = { 324 | isa = XCBuildConfiguration; 325 | buildSettings = { 326 | ALWAYS_SEARCH_USER_PATHS = NO; 327 | CLANG_ANALYZER_NONNULL = YES; 328 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 329 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 330 | CLANG_CXX_LIBRARY = "libc++"; 331 | CLANG_ENABLE_MODULES = YES; 332 | CLANG_ENABLE_OBJC_ARC = YES; 333 | CLANG_ENABLE_OBJC_WEAK = YES; 334 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 335 | CLANG_WARN_BOOL_CONVERSION = YES; 336 | CLANG_WARN_COMMA = YES; 337 | CLANG_WARN_CONSTANT_CONVERSION = YES; 338 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 339 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 340 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 341 | CLANG_WARN_EMPTY_BODY = YES; 342 | CLANG_WARN_ENUM_CONVERSION = YES; 343 | CLANG_WARN_INFINITE_RECURSION = YES; 344 | CLANG_WARN_INT_CONVERSION = YES; 345 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 346 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 347 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 348 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 349 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 350 | CLANG_WARN_STRICT_PROTOTYPES = YES; 351 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 352 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 353 | CLANG_WARN_UNREACHABLE_CODE = YES; 354 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 355 | COPY_PHASE_STRIP = NO; 356 | DEBUG_INFORMATION_FORMAT = dwarf; 357 | ENABLE_STRICT_OBJC_MSGSEND = YES; 358 | ENABLE_TESTABILITY = YES; 359 | GCC_C_LANGUAGE_STANDARD = gnu11; 360 | GCC_DYNAMIC_NO_PIC = NO; 361 | GCC_NO_COMMON_BLOCKS = YES; 362 | GCC_OPTIMIZATION_LEVEL = 0; 363 | GCC_PREPROCESSOR_DEFINITIONS = ( 364 | "DEBUG=1", 365 | "$(inherited)", 366 | ); 367 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 368 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 369 | GCC_WARN_UNDECLARED_SELECTOR = YES; 370 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 371 | GCC_WARN_UNUSED_FUNCTION = YES; 372 | GCC_WARN_UNUSED_VARIABLE = YES; 373 | IPHONEOS_DEPLOYMENT_TARGET = 13.6; 374 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 375 | MTL_FAST_MATH = YES; 376 | ONLY_ACTIVE_ARCH = YES; 377 | SDKROOT = iphoneos; 378 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 379 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 380 | }; 381 | name = Debug; 382 | }; 383 | 34D4AEA324DEE98D00C6C66D /* Release */ = { 384 | isa = XCBuildConfiguration; 385 | buildSettings = { 386 | ALWAYS_SEARCH_USER_PATHS = NO; 387 | CLANG_ANALYZER_NONNULL = YES; 388 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 389 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 390 | CLANG_CXX_LIBRARY = "libc++"; 391 | CLANG_ENABLE_MODULES = YES; 392 | CLANG_ENABLE_OBJC_ARC = YES; 393 | CLANG_ENABLE_OBJC_WEAK = YES; 394 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 395 | CLANG_WARN_BOOL_CONVERSION = YES; 396 | CLANG_WARN_COMMA = YES; 397 | CLANG_WARN_CONSTANT_CONVERSION = YES; 398 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 399 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 400 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 401 | CLANG_WARN_EMPTY_BODY = YES; 402 | CLANG_WARN_ENUM_CONVERSION = YES; 403 | CLANG_WARN_INFINITE_RECURSION = YES; 404 | CLANG_WARN_INT_CONVERSION = YES; 405 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 406 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 407 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 409 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 410 | CLANG_WARN_STRICT_PROTOTYPES = YES; 411 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 412 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 413 | CLANG_WARN_UNREACHABLE_CODE = YES; 414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 415 | COPY_PHASE_STRIP = NO; 416 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 417 | ENABLE_NS_ASSERTIONS = NO; 418 | ENABLE_STRICT_OBJC_MSGSEND = YES; 419 | GCC_C_LANGUAGE_STANDARD = gnu11; 420 | GCC_NO_COMMON_BLOCKS = YES; 421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 422 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 423 | GCC_WARN_UNDECLARED_SELECTOR = YES; 424 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 425 | GCC_WARN_UNUSED_FUNCTION = YES; 426 | GCC_WARN_UNUSED_VARIABLE = YES; 427 | IPHONEOS_DEPLOYMENT_TARGET = 13.6; 428 | MTL_ENABLE_DEBUG_INFO = NO; 429 | MTL_FAST_MATH = YES; 430 | SDKROOT = iphoneos; 431 | SWIFT_COMPILATION_MODE = wholemodule; 432 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 433 | VALIDATE_PRODUCT = YES; 434 | }; 435 | name = Release; 436 | }; 437 | 34D4AEA524DEE98D00C6C66D /* Debug */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 441 | CODE_SIGN_STYLE = Automatic; 442 | DEVELOPMENT_TEAM = U2Y9896QA2; 443 | INFOPLIST_FILE = Demo/Info.plist; 444 | LD_RUNPATH_SEARCH_PATHS = ( 445 | "$(inherited)", 446 | "@executable_path/Frameworks", 447 | ); 448 | PRODUCT_BUNDLE_IDENTIFIER = com.Demo; 449 | PRODUCT_NAME = "$(TARGET_NAME)"; 450 | SWIFT_VERSION = 5.0; 451 | TARGETED_DEVICE_FAMILY = "1,2"; 452 | }; 453 | name = Debug; 454 | }; 455 | 34D4AEA624DEE98D00C6C66D /* Release */ = { 456 | isa = XCBuildConfiguration; 457 | buildSettings = { 458 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 459 | CODE_SIGN_STYLE = Automatic; 460 | DEVELOPMENT_TEAM = U2Y9896QA2; 461 | INFOPLIST_FILE = Demo/Info.plist; 462 | LD_RUNPATH_SEARCH_PATHS = ( 463 | "$(inherited)", 464 | "@executable_path/Frameworks", 465 | ); 466 | PRODUCT_BUNDLE_IDENTIFIER = com.Demo; 467 | PRODUCT_NAME = "$(TARGET_NAME)"; 468 | SWIFT_VERSION = 5.0; 469 | TARGETED_DEVICE_FAMILY = "1,2"; 470 | }; 471 | name = Release; 472 | }; 473 | 34D4AEA824DEE98D00C6C66D /* Debug */ = { 474 | isa = XCBuildConfiguration; 475 | buildSettings = { 476 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 477 | BUNDLE_LOADER = "$(TEST_HOST)"; 478 | CODE_SIGN_STYLE = Automatic; 479 | DEVELOPMENT_TEAM = U2Y9896QA2; 480 | INFOPLIST_FILE = DemoTests/Info.plist; 481 | IPHONEOS_DEPLOYMENT_TARGET = 13.6; 482 | LD_RUNPATH_SEARCH_PATHS = ( 483 | "$(inherited)", 484 | "@executable_path/Frameworks", 485 | "@loader_path/Frameworks", 486 | ); 487 | PRODUCT_BUNDLE_IDENTIFIER = com.DemoTests; 488 | PRODUCT_NAME = "$(TARGET_NAME)"; 489 | SWIFT_VERSION = 5.0; 490 | TARGETED_DEVICE_FAMILY = "1,2"; 491 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Demo.app/Demo"; 492 | }; 493 | name = Debug; 494 | }; 495 | 34D4AEA924DEE98D00C6C66D /* Release */ = { 496 | isa = XCBuildConfiguration; 497 | buildSettings = { 498 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 499 | BUNDLE_LOADER = "$(TEST_HOST)"; 500 | CODE_SIGN_STYLE = Automatic; 501 | DEVELOPMENT_TEAM = U2Y9896QA2; 502 | INFOPLIST_FILE = DemoTests/Info.plist; 503 | IPHONEOS_DEPLOYMENT_TARGET = 13.6; 504 | LD_RUNPATH_SEARCH_PATHS = ( 505 | "$(inherited)", 506 | "@executable_path/Frameworks", 507 | "@loader_path/Frameworks", 508 | ); 509 | PRODUCT_BUNDLE_IDENTIFIER = com.DemoTests; 510 | PRODUCT_NAME = "$(TARGET_NAME)"; 511 | SWIFT_VERSION = 5.0; 512 | TARGETED_DEVICE_FAMILY = "1,2"; 513 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Demo.app/Demo"; 514 | }; 515 | name = Release; 516 | }; 517 | 34D4AEAB24DEE98D00C6C66D /* Debug */ = { 518 | isa = XCBuildConfiguration; 519 | buildSettings = { 520 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 521 | CODE_SIGN_STYLE = Automatic; 522 | DEVELOPMENT_TEAM = U2Y9896QA2; 523 | INFOPLIST_FILE = DemoUITests/Info.plist; 524 | LD_RUNPATH_SEARCH_PATHS = ( 525 | "$(inherited)", 526 | "@executable_path/Frameworks", 527 | "@loader_path/Frameworks", 528 | ); 529 | PRODUCT_BUNDLE_IDENTIFIER = com.DemoUITests; 530 | PRODUCT_NAME = "$(TARGET_NAME)"; 531 | SWIFT_VERSION = 5.0; 532 | TARGETED_DEVICE_FAMILY = "1,2"; 533 | TEST_TARGET_NAME = Demo; 534 | }; 535 | name = Debug; 536 | }; 537 | 34D4AEAC24DEE98D00C6C66D /* Release */ = { 538 | isa = XCBuildConfiguration; 539 | buildSettings = { 540 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 541 | CODE_SIGN_STYLE = Automatic; 542 | DEVELOPMENT_TEAM = U2Y9896QA2; 543 | INFOPLIST_FILE = DemoUITests/Info.plist; 544 | LD_RUNPATH_SEARCH_PATHS = ( 545 | "$(inherited)", 546 | "@executable_path/Frameworks", 547 | "@loader_path/Frameworks", 548 | ); 549 | PRODUCT_BUNDLE_IDENTIFIER = com.DemoUITests; 550 | PRODUCT_NAME = "$(TARGET_NAME)"; 551 | SWIFT_VERSION = 5.0; 552 | TARGETED_DEVICE_FAMILY = "1,2"; 553 | TEST_TARGET_NAME = Demo; 554 | }; 555 | name = Release; 556 | }; 557 | /* End XCBuildConfiguration section */ 558 | 559 | /* Begin XCConfigurationList section */ 560 | 34D4AE7224DEE98700C6C66D /* Build configuration list for PBXProject "Demo" */ = { 561 | isa = XCConfigurationList; 562 | buildConfigurations = ( 563 | 34D4AEA224DEE98D00C6C66D /* Debug */, 564 | 34D4AEA324DEE98D00C6C66D /* Release */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | defaultConfigurationName = Release; 568 | }; 569 | 34D4AEA424DEE98D00C6C66D /* Build configuration list for PBXNativeTarget "Demo" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | 34D4AEA524DEE98D00C6C66D /* Debug */, 573 | 34D4AEA624DEE98D00C6C66D /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | 34D4AEA724DEE98D00C6C66D /* Build configuration list for PBXNativeTarget "DemoTests" */ = { 579 | isa = XCConfigurationList; 580 | buildConfigurations = ( 581 | 34D4AEA824DEE98D00C6C66D /* Debug */, 582 | 34D4AEA924DEE98D00C6C66D /* Release */, 583 | ); 584 | defaultConfigurationIsVisible = 0; 585 | defaultConfigurationName = Release; 586 | }; 587 | 34D4AEAA24DEE98D00C6C66D /* Build configuration list for PBXNativeTarget "DemoUITests" */ = { 588 | isa = XCConfigurationList; 589 | buildConfigurations = ( 590 | 34D4AEAB24DEE98D00C6C66D /* Debug */, 591 | 34D4AEAC24DEE98D00C6C66D /* Release */, 592 | ); 593 | defaultConfigurationIsVisible = 0; 594 | defaultConfigurationName = Release; 595 | }; 596 | /* End XCConfigurationList section */ 597 | 598 | /* Begin XCVersionGroup section */ 599 | 34D4AE8324DEE98700C6C66D /* Demo.xcdatamodeld */ = { 600 | isa = XCVersionGroup; 601 | children = ( 602 | 34D4AE8424DEE98700C6C66D /* Demo.xcdatamodel */, 603 | ); 604 | currentVersion = 34D4AE8424DEE98700C6C66D /* Demo.xcdatamodel */; 605 | path = Demo.xcdatamodeld; 606 | sourceTree = ""; 607 | versionGroupType = wrapper.xcdatamodel; 608 | }; 609 | /* End XCVersionGroup section */ 610 | }; 611 | rootObject = 34D4AE6F24DEE98700C6C66D /* Project object */; 612 | } 613 | -------------------------------------------------------------------------------- /Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo.xcodeproj/xcuserdata/rashidlatif55.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Demo.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Demo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Demo 4 | // 5 | // Created by Rashid Latif on 08/08/2020. 6 | // Copyright © 2020 Cmall biz llc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CoreData 11 | 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 | // MARK: - Core Data stack 37 | 38 | lazy var persistentContainer: NSPersistentContainer = { 39 | /* 40 | The persistent container for the application. This implementation 41 | creates and returns a container, having loaded the store for the 42 | application to it. This property is optional since there are legitimate 43 | error conditions that could cause the creation of the store to fail. 44 | */ 45 | let container = NSPersistentContainer(name: "Demo") 46 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 47 | if let error = error as NSError? { 48 | // Replace this implementation with code to handle the error appropriately. 49 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 50 | 51 | /* 52 | Typical reasons for an error here include: 53 | * The parent directory does not exist, cannot be created, or disallows writing. 54 | * The persistent store is not accessible, due to permissions or data protection when the device is locked. 55 | * The device is out of space. 56 | * The store could not be migrated to the current model version. 57 | Check the error message to determine what the actual problem was. 58 | */ 59 | fatalError("Unresolved error \(error), \(error.userInfo)") 60 | } 61 | }) 62 | return container 63 | }() 64 | 65 | // MARK: - Core Data Saving support 66 | 67 | func saveContext () { 68 | let context = persistentContainer.viewContext 69 | if context.hasChanges { 70 | do { 71 | try context.save() 72 | } catch { 73 | // Replace this implementation with code to handle the error appropriately. 74 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 75 | let nserror = error as NSError 76 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)") 77 | } 78 | } 79 | } 80 | 81 | } 82 | 83 | -------------------------------------------------------------------------------- /Demo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Demo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Demo/Assets.xcassets/circle_radio_selected.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "filename" : "radio-on-button.png", 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | }, 21 | "properties" : { 22 | "template-rendering-intent" : "template" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Demo/Assets.xcassets/circle_radio_selected.imageset/radio-on-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rashidlatif55/CheckBoxAndRadioButton/945d3b0010ca30adde33e07066c5f74cb96048d2/Demo/Assets.xcassets/circle_radio_selected.imageset/radio-on-button.png -------------------------------------------------------------------------------- /Demo/Assets.xcassets/circle_radio_unselected.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "filename" : "circle.png", 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | }, 21 | "properties" : { 22 | "template-rendering-intent" : "template" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Demo/Assets.xcassets/circle_radio_unselected.imageset/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rashidlatif55/CheckBoxAndRadioButton/945d3b0010ca30adde33e07066c5f74cb96048d2/Demo/Assets.xcassets/circle_radio_unselected.imageset/circle.png -------------------------------------------------------------------------------- /Demo/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 | -------------------------------------------------------------------------------- /Demo/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 | 23 | 24 | 30 | 43 | 44 | 45 | 46 | 47 | 48 | 54 | 55 | 56 | 57 | 67 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /Demo/Demo.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | Demo.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/Demo.xcdatamodeld/Demo.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Demo/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 | 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 | -------------------------------------------------------------------------------- /Demo/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // Demo 4 | // 5 | // Created by Rashid Latif on 08/08/2020. 6 | // Copyright © 2020 Cmall biz llc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | 16 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 17 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 18 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 19 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 20 | guard let _ = (scene as? UIWindowScene) else { return } 21 | } 22 | 23 | func sceneDidDisconnect(_ scene: UIScene) { 24 | // Called as the scene is being released by the system. 25 | // This occurs shortly after the scene enters the background, or when its session is discarded. 26 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 27 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 28 | } 29 | 30 | func sceneDidBecomeActive(_ scene: UIScene) { 31 | // Called when the scene has moved from an inactive state to an active state. 32 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 33 | } 34 | 35 | func sceneWillResignActive(_ scene: UIScene) { 36 | // Called when the scene will move from an active state to an inactive state. 37 | // This may occur due to temporary interruptions (ex. an incoming phone call). 38 | } 39 | 40 | func sceneWillEnterForeground(_ scene: UIScene) { 41 | // Called as the scene transitions from the background to the foreground. 42 | // Use this method to undo the changes made on entering the background. 43 | } 44 | 45 | func sceneDidEnterBackground(_ scene: UIScene) { 46 | // Called as the scene transitions from the foreground to the background. 47 | // Use this method to save data, release shared resources, and store enough scene-specific state information 48 | // to restore the scene back to its current state. 49 | 50 | // Save changes in the application's managed object context when the application transitions to the background. 51 | (UIApplication.shared.delegate as? AppDelegate)?.saveContext() 52 | } 53 | 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Demo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | 4 | // Created by Rashid Latif on 08/08/2020. 5 | 6 | 7 | import UIKit 8 | 9 | class ViewController: UIViewController { 10 | 11 | @IBOutlet private weak var singleCheckBoxOutlet:UIButton!{ 12 | didSet{ 13 | singleCheckBoxOutlet.setImage(UIImage(systemName:"checkmark.seal"), for: .normal) 14 | singleCheckBoxOutlet.setImage(UIImage(systemName:"checkmark.seal.fill"), for: .selected) 15 | //Set corner radius 16 | singleCheckBoxOutlet.layer.cornerRadius = singleCheckBoxOutlet.frame.height / 2 17 | } 18 | } 19 | 20 | @IBOutlet private var multiRadioButton: [UIButton]!{ 21 | didSet{ 22 | multiRadioButton.forEach { (button) in 23 | button.setImage(UIImage(named:"circle_radio_unselected"), for: .normal) 24 | button.setImage(UIImage(named:"circle_radio_selected"), for: .selected) 25 | } 26 | } 27 | } 28 | 29 | override func viewDidLoad() { 30 | super.viewDidLoad() 31 | 32 | } 33 | 34 | @IBAction func singleCheckboxAction(_ sender: UIButton){ 35 | sender.checkboxAnimation { 36 | print("I'm done") 37 | print(sender.isSelected) 38 | 39 | } 40 | } 41 | 42 | ///Create two separate actions 43 | /* 44 | @IBAction private func maleAction(_ sender: UIButton){ 45 | uncheck() 46 | sender.checkboxAnimation { 47 | print(sender.titleLabel?.text ?? "") 48 | print(sender.isSelected) 49 | 50 | } 51 | } 52 | 53 | @IBAction private func femaleAction(_ sender: UIButton){ 54 | uncheck() 55 | sender.checkboxAnimation { 56 | print(sender.titleLabel?.text ?? "") 57 | print(sender.isSelected) 58 | } 59 | } 60 | */ 61 | 62 | //Handle with single Action 63 | @IBAction private func maleFemaleAction(_ sender: UIButton){ 64 | uncheck() 65 | sender.checkboxAnimation { 66 | print(sender.titleLabel?.text ?? "") 67 | print(sender.isSelected) 68 | } 69 | 70 | // NOTE:- here you can recognize with tag weather it is `Male` or `Female`. 71 | print(sender.tag) 72 | } 73 | 74 | func uncheck(){ 75 | multiRadioButton.forEach { (button) in 76 | button.isSelected = false 77 | } 78 | } 79 | 80 | } 81 | 82 | 83 | extension UIButton { 84 | //MARK:- Animate check mark 85 | func checkboxAnimation(closure: @escaping () -> Void){ 86 | guard let image = self.imageView else {return} 87 | self.adjustsImageWhenHighlighted = false 88 | self.isHighlighted = false 89 | 90 | UIView.animate(withDuration: 0.1, delay: 0.1, options: .curveLinear, animations: { 91 | image.transform = CGAffineTransform(scaleX: 0.8, y: 0.8) 92 | 93 | }) { (success) in 94 | UIView.animate(withDuration: 0.1, delay: 0, options: .curveLinear, animations: { 95 | self.isSelected = !self.isSelected 96 | //to-do 97 | closure() 98 | image.transform = .identity 99 | }, completion: nil) 100 | } 101 | 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /DemoTests/DemoTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DemoTests.swift 3 | // DemoTests 4 | // 5 | // Created by Rashid Latif on 08/08/2020. 6 | // Copyright © 2020 Cmall biz llc. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Demo 11 | 12 | class DemoTests: XCTestCase { 13 | 14 | override func setUpWithError() throws { 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDownWithError() throws { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | } 21 | 22 | func testExample() throws { 23 | // This is an example of a functional test case. 24 | // Use XCTAssert and related functions to verify your tests produce the correct results. 25 | } 26 | 27 | func testPerformanceExample() throws { 28 | // This is an example of a performance test case. 29 | self.measure { 30 | // Put the code you want to measure the time of here. 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /DemoTests/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 | -------------------------------------------------------------------------------- /DemoUITests/DemoUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DemoUITests.swift 3 | // DemoUITests 4 | // 5 | // Created by Rashid Latif on 08/08/2020. 6 | // Copyright © 2020 Cmall biz llc. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class DemoUITests: XCTestCase { 12 | 13 | override func setUpWithError() throws { 14 | // Put setup code here. This method is called before the invocation of each test method in the class. 15 | 16 | // In UI tests it is usually best to stop immediately when a failure occurs. 17 | continueAfterFailure = false 18 | 19 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 20 | } 21 | 22 | override func tearDownWithError() throws { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | } 25 | 26 | func testExample() throws { 27 | // UI tests must launch the application that they test. 28 | let app = XCUIApplication() 29 | app.launch() 30 | 31 | // Use recording to get started writing UI tests. 32 | // Use XCTAssert and related functions to verify your tests produce the correct results. 33 | } 34 | 35 | func testLaunchPerformance() throws { 36 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { 37 | // This measures how long it takes to launch your application. 38 | measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { 39 | XCUIApplication().launch() 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /DemoUITests/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 | --------------------------------------------------------------------------------