├── .gitignore ├── Example ├── Podfile ├── Podfile.lock ├── SoftUIExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── SoftUIExample.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── SoftUIExample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── first.imageset │ │ ├── Contents.json │ │ └── first.pdf │ ├── image_doc.imageset │ │ ├── Contents.json │ │ └── image_doc.pdf │ └── second.imageset │ │ ├── Contents.json │ │ └── second.pdf │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── FirstViewController.swift │ ├── Info.plist │ ├── SceneDelegate.swift │ ├── SecondViewController.swift │ └── SoftUIExample.entitlements ├── Framework ├── SoftUI.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── SoftUI │ ├── Controls │ │ ├── Buttons │ │ │ └── SoftButton.swift │ │ └── Cards │ │ │ ├── SoftCard.swift │ │ │ ├── SoftCard.xib │ │ │ └── Templates │ │ │ ├── SoftCardItem.swift │ │ │ └── SoftCardItem.xib │ ├── Core │ │ └── Shared │ │ │ ├── CALayer+SoftUI.swift │ │ │ ├── Enums.swift │ │ │ └── UIView+SoftUI.swift │ ├── Info.plist │ └── SoftUI.h └── SoftUITests │ ├── Info.plist │ └── SoftUITests.swift ├── LICENSE ├── Preview └── banner.jpg ├── README.md └── SoftUI.podspec /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | # .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | Pods 92 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | inhibit_all_warnings! 3 | 4 | target 'SoftUIExample' do 5 | platform :ios, '11.0' 6 | pod 'SoftUI', :path => '../' 7 | end 8 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SoftUI (0.0.4): 3 | - SoftUI/All (= 0.0.4) 4 | - SoftUI/All (0.0.4): 5 | - SoftUI/Buttons 6 | - SoftUI/Cards 7 | - SoftUI/Core 8 | - SoftUI/Buttons (0.0.4): 9 | - SoftUI/Core 10 | - SoftUI/Cards (0.0.4): 11 | - SoftUI/Core 12 | - SoftUI/Core (0.0.4) 13 | 14 | DEPENDENCIES: 15 | - SoftUI (from `../`) 16 | 17 | EXTERNAL SOURCES: 18 | SoftUI: 19 | :path: "../" 20 | 21 | SPEC CHECKSUMS: 22 | SoftUI: c47c1e008734e8a89f4326ce4d0a43ed5e0e2f68 23 | 24 | PODFILE CHECKSUM: 209aeb38f7c70eee9d5767baa436cc8caa13acab 25 | 26 | COCOAPODS: 1.9.3 27 | -------------------------------------------------------------------------------- /Example/SoftUIExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 80FA3FF85A997C0F9ABA52D8 /* Pods_SoftUIExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F3ABA0CD07C754CAB240E2D /* Pods_SoftUIExample.framework */; }; 11 | CA2491892400210F00C7465C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA2491882400210F00C7465C /* AppDelegate.swift */; }; 12 | CA24918B2400210F00C7465C /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA24918A2400210F00C7465C /* SceneDelegate.swift */; }; 13 | CA24918D2400210F00C7465C /* FirstViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA24918C2400210F00C7465C /* FirstViewController.swift */; }; 14 | CA24918F2400210F00C7465C /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA24918E2400210F00C7465C /* SecondViewController.swift */; }; 15 | CA2491922400210F00C7465C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CA2491902400210F00C7465C /* Main.storyboard */; }; 16 | CA2491942400211400C7465C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CA2491932400211400C7465C /* Assets.xcassets */; }; 17 | CA2491972400211400C7465C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CA2491952400211400C7465C /* LaunchScreen.storyboard */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 22E4E5C15D3D57036F524A06 /* Pods-SoftUIExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SoftUIExample.debug.xcconfig"; path = "Target Support Files/Pods-SoftUIExample/Pods-SoftUIExample.debug.xcconfig"; sourceTree = ""; }; 22 | 76D9FE638325C4C17404A7E4 /* Pods-SoftUIExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SoftUIExample.release.xcconfig"; path = "Target Support Files/Pods-SoftUIExample/Pods-SoftUIExample.release.xcconfig"; sourceTree = ""; }; 23 | 8F3ABA0CD07C754CAB240E2D /* Pods_SoftUIExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SoftUIExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | CA2491852400210F00C7465C /* SoftUIExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SoftUIExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | CA2491882400210F00C7465C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 26 | CA24918A2400210F00C7465C /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 27 | CA24918C2400210F00C7465C /* FirstViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstViewController.swift; sourceTree = ""; }; 28 | CA24918E2400210F00C7465C /* SecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = ""; }; 29 | CA2491912400210F00C7465C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 30 | CA2491932400211400C7465C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 31 | CA2491962400211400C7465C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 32 | CA2491982400211400C7465C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | CA24919E2400214A00C7465C /* SoftUIExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SoftUIExample.entitlements; sourceTree = ""; }; 34 | /* End PBXFileReference section */ 35 | 36 | /* Begin PBXFrameworksBuildPhase section */ 37 | CA2491822400210F00C7465C /* Frameworks */ = { 38 | isa = PBXFrameworksBuildPhase; 39 | buildActionMask = 2147483647; 40 | files = ( 41 | 80FA3FF85A997C0F9ABA52D8 /* Pods_SoftUIExample.framework in Frameworks */, 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXFrameworksBuildPhase section */ 46 | 47 | /* Begin PBXGroup section */ 48 | CA24917C2400210F00C7465C = { 49 | isa = PBXGroup; 50 | children = ( 51 | CA2491872400210F00C7465C /* SoftUIExample */, 52 | CA2491862400210F00C7465C /* Products */, 53 | CA2491A5240022D600C7465C /* Frameworks */, 54 | F766F6E81ED19E12ECFFFDA0 /* Pods */, 55 | ); 56 | sourceTree = ""; 57 | }; 58 | CA2491862400210F00C7465C /* Products */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | CA2491852400210F00C7465C /* SoftUIExample.app */, 62 | ); 63 | name = Products; 64 | sourceTree = ""; 65 | }; 66 | CA2491872400210F00C7465C /* SoftUIExample */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | CA24919E2400214A00C7465C /* SoftUIExample.entitlements */, 70 | CA2491882400210F00C7465C /* AppDelegate.swift */, 71 | CA24918A2400210F00C7465C /* SceneDelegate.swift */, 72 | CA24918C2400210F00C7465C /* FirstViewController.swift */, 73 | CA24918E2400210F00C7465C /* SecondViewController.swift */, 74 | CA2491902400210F00C7465C /* Main.storyboard */, 75 | CA2491932400211400C7465C /* Assets.xcassets */, 76 | CA2491952400211400C7465C /* LaunchScreen.storyboard */, 77 | CA2491982400211400C7465C /* Info.plist */, 78 | ); 79 | path = SoftUIExample; 80 | sourceTree = ""; 81 | }; 82 | CA2491A5240022D600C7465C /* Frameworks */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 8F3ABA0CD07C754CAB240E2D /* Pods_SoftUIExample.framework */, 86 | ); 87 | name = Frameworks; 88 | sourceTree = ""; 89 | }; 90 | F766F6E81ED19E12ECFFFDA0 /* Pods */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 22E4E5C15D3D57036F524A06 /* Pods-SoftUIExample.debug.xcconfig */, 94 | 76D9FE638325C4C17404A7E4 /* Pods-SoftUIExample.release.xcconfig */, 95 | ); 96 | path = Pods; 97 | sourceTree = ""; 98 | }; 99 | /* End PBXGroup section */ 100 | 101 | /* Begin PBXNativeTarget section */ 102 | CA2491842400210F00C7465C /* SoftUIExample */ = { 103 | isa = PBXNativeTarget; 104 | buildConfigurationList = CA24919B2400211400C7465C /* Build configuration list for PBXNativeTarget "SoftUIExample" */; 105 | buildPhases = ( 106 | 96925542262BCAF2116F6ADF /* [CP] Check Pods Manifest.lock */, 107 | CA2491812400210F00C7465C /* Sources */, 108 | CA2491822400210F00C7465C /* Frameworks */, 109 | CA2491832400210F00C7465C /* Resources */, 110 | CA2491B52400366500C7465C /* ShellScript */, 111 | E465F8BC97468592AA15EA7D /* [CP] Embed Pods Frameworks */, 112 | ); 113 | buildRules = ( 114 | ); 115 | dependencies = ( 116 | ); 117 | name = SoftUIExample; 118 | productName = SoftUIExample; 119 | productReference = CA2491852400210F00C7465C /* SoftUIExample.app */; 120 | productType = "com.apple.product-type.application"; 121 | }; 122 | /* End PBXNativeTarget section */ 123 | 124 | /* Begin PBXProject section */ 125 | CA24917D2400210F00C7465C /* Project object */ = { 126 | isa = PBXProject; 127 | attributes = { 128 | LastSwiftUpdateCheck = 1130; 129 | LastUpgradeCheck = 1130; 130 | ORGANIZATIONNAME = hellc; 131 | TargetAttributes = { 132 | CA2491842400210F00C7465C = { 133 | CreatedOnToolsVersion = 11.3.1; 134 | }; 135 | }; 136 | }; 137 | buildConfigurationList = CA2491802400210F00C7465C /* Build configuration list for PBXProject "SoftUIExample" */; 138 | compatibilityVersion = "Xcode 9.3"; 139 | developmentRegion = en; 140 | hasScannedForEncodings = 0; 141 | knownRegions = ( 142 | en, 143 | Base, 144 | ); 145 | mainGroup = CA24917C2400210F00C7465C; 146 | productRefGroup = CA2491862400210F00C7465C /* Products */; 147 | projectDirPath = ""; 148 | projectRoot = ""; 149 | targets = ( 150 | CA2491842400210F00C7465C /* SoftUIExample */, 151 | ); 152 | }; 153 | /* End PBXProject section */ 154 | 155 | /* Begin PBXResourcesBuildPhase section */ 156 | CA2491832400210F00C7465C /* Resources */ = { 157 | isa = PBXResourcesBuildPhase; 158 | buildActionMask = 2147483647; 159 | files = ( 160 | CA2491972400211400C7465C /* LaunchScreen.storyboard in Resources */, 161 | CA2491942400211400C7465C /* Assets.xcassets in Resources */, 162 | CA2491922400210F00C7465C /* Main.storyboard in Resources */, 163 | ); 164 | runOnlyForDeploymentPostprocessing = 0; 165 | }; 166 | /* End PBXResourcesBuildPhase section */ 167 | 168 | /* Begin PBXShellScriptBuildPhase section */ 169 | 96925542262BCAF2116F6ADF /* [CP] Check Pods Manifest.lock */ = { 170 | isa = PBXShellScriptBuildPhase; 171 | buildActionMask = 2147483647; 172 | files = ( 173 | ); 174 | inputFileListPaths = ( 175 | ); 176 | inputPaths = ( 177 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 178 | "${PODS_ROOT}/Manifest.lock", 179 | ); 180 | name = "[CP] Check Pods Manifest.lock"; 181 | outputFileListPaths = ( 182 | ); 183 | outputPaths = ( 184 | "$(DERIVED_FILE_DIR)/Pods-SoftUIExample-checkManifestLockResult.txt", 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | shellPath = /bin/sh; 188 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 189 | showEnvVarsInLog = 0; 190 | }; 191 | CA2491B52400366500C7465C /* ShellScript */ = { 192 | isa = PBXShellScriptBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | ); 196 | inputFileListPaths = ( 197 | ); 198 | inputPaths = ( 199 | ); 200 | outputFileListPaths = ( 201 | ); 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "if which swiftlint >/dev/null; then\nswiftlint autocorrect --path \"$SRCROOT\"/SoftUIExample\nswiftlint --path \"$SRCROOT\"/SoftUIExample\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; 207 | }; 208 | E465F8BC97468592AA15EA7D /* [CP] Embed Pods Frameworks */ = { 209 | isa = PBXShellScriptBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | ); 213 | inputFileListPaths = ( 214 | "${PODS_ROOT}/Target Support Files/Pods-SoftUIExample/Pods-SoftUIExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", 215 | ); 216 | name = "[CP] Embed Pods Frameworks"; 217 | outputFileListPaths = ( 218 | "${PODS_ROOT}/Target Support Files/Pods-SoftUIExample/Pods-SoftUIExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", 219 | ); 220 | runOnlyForDeploymentPostprocessing = 0; 221 | shellPath = /bin/sh; 222 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SoftUIExample/Pods-SoftUIExample-frameworks.sh\"\n"; 223 | showEnvVarsInLog = 0; 224 | }; 225 | /* End PBXShellScriptBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | CA2491812400210F00C7465C /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | CA24918F2400210F00C7465C /* SecondViewController.swift in Sources */, 233 | CA24918D2400210F00C7465C /* FirstViewController.swift in Sources */, 234 | CA2491892400210F00C7465C /* AppDelegate.swift in Sources */, 235 | CA24918B2400210F00C7465C /* SceneDelegate.swift in Sources */, 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | /* End PBXSourcesBuildPhase section */ 240 | 241 | /* Begin PBXVariantGroup section */ 242 | CA2491902400210F00C7465C /* Main.storyboard */ = { 243 | isa = PBXVariantGroup; 244 | children = ( 245 | CA2491912400210F00C7465C /* Base */, 246 | ); 247 | name = Main.storyboard; 248 | sourceTree = ""; 249 | }; 250 | CA2491952400211400C7465C /* LaunchScreen.storyboard */ = { 251 | isa = PBXVariantGroup; 252 | children = ( 253 | CA2491962400211400C7465C /* Base */, 254 | ); 255 | name = LaunchScreen.storyboard; 256 | sourceTree = ""; 257 | }; 258 | /* End PBXVariantGroup section */ 259 | 260 | /* Begin XCBuildConfiguration section */ 261 | CA2491992400211400C7465C /* Debug */ = { 262 | isa = XCBuildConfiguration; 263 | buildSettings = { 264 | ALWAYS_SEARCH_USER_PATHS = NO; 265 | CLANG_ANALYZER_NONNULL = YES; 266 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 267 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 268 | CLANG_CXX_LIBRARY = "libc++"; 269 | CLANG_ENABLE_MODULES = YES; 270 | CLANG_ENABLE_OBJC_ARC = YES; 271 | CLANG_ENABLE_OBJC_WEAK = YES; 272 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 273 | CLANG_WARN_BOOL_CONVERSION = YES; 274 | CLANG_WARN_COMMA = YES; 275 | CLANG_WARN_CONSTANT_CONVERSION = YES; 276 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 277 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 278 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 279 | CLANG_WARN_EMPTY_BODY = YES; 280 | CLANG_WARN_ENUM_CONVERSION = YES; 281 | CLANG_WARN_INFINITE_RECURSION = YES; 282 | CLANG_WARN_INT_CONVERSION = YES; 283 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 284 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 285 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 286 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 287 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 288 | CLANG_WARN_STRICT_PROTOTYPES = YES; 289 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 290 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 291 | CLANG_WARN_UNREACHABLE_CODE = YES; 292 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 293 | COPY_PHASE_STRIP = NO; 294 | DEBUG_INFORMATION_FORMAT = dwarf; 295 | ENABLE_STRICT_OBJC_MSGSEND = YES; 296 | ENABLE_TESTABILITY = YES; 297 | GCC_C_LANGUAGE_STANDARD = gnu11; 298 | GCC_DYNAMIC_NO_PIC = NO; 299 | GCC_NO_COMMON_BLOCKS = YES; 300 | GCC_OPTIMIZATION_LEVEL = 0; 301 | GCC_PREPROCESSOR_DEFINITIONS = ( 302 | "DEBUG=1", 303 | "$(inherited)", 304 | ); 305 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 306 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 307 | GCC_WARN_UNDECLARED_SELECTOR = YES; 308 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 309 | GCC_WARN_UNUSED_FUNCTION = YES; 310 | GCC_WARN_UNUSED_VARIABLE = YES; 311 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 312 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 313 | MTL_FAST_MATH = YES; 314 | ONLY_ACTIVE_ARCH = YES; 315 | SDKROOT = iphoneos; 316 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 317 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 318 | }; 319 | name = Debug; 320 | }; 321 | CA24919A2400211400C7465C /* Release */ = { 322 | isa = XCBuildConfiguration; 323 | buildSettings = { 324 | ALWAYS_SEARCH_USER_PATHS = NO; 325 | CLANG_ANALYZER_NONNULL = YES; 326 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 327 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 328 | CLANG_CXX_LIBRARY = "libc++"; 329 | CLANG_ENABLE_MODULES = YES; 330 | CLANG_ENABLE_OBJC_ARC = YES; 331 | CLANG_ENABLE_OBJC_WEAK = YES; 332 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 333 | CLANG_WARN_BOOL_CONVERSION = YES; 334 | CLANG_WARN_COMMA = YES; 335 | CLANG_WARN_CONSTANT_CONVERSION = YES; 336 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 337 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 338 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 339 | CLANG_WARN_EMPTY_BODY = YES; 340 | CLANG_WARN_ENUM_CONVERSION = YES; 341 | CLANG_WARN_INFINITE_RECURSION = YES; 342 | CLANG_WARN_INT_CONVERSION = YES; 343 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 344 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 345 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 346 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 347 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 348 | CLANG_WARN_STRICT_PROTOTYPES = YES; 349 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 350 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 351 | CLANG_WARN_UNREACHABLE_CODE = YES; 352 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 353 | COPY_PHASE_STRIP = NO; 354 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 355 | ENABLE_NS_ASSERTIONS = NO; 356 | ENABLE_STRICT_OBJC_MSGSEND = YES; 357 | GCC_C_LANGUAGE_STANDARD = gnu11; 358 | GCC_NO_COMMON_BLOCKS = YES; 359 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 360 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 361 | GCC_WARN_UNDECLARED_SELECTOR = YES; 362 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 363 | GCC_WARN_UNUSED_FUNCTION = YES; 364 | GCC_WARN_UNUSED_VARIABLE = YES; 365 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 366 | MTL_ENABLE_DEBUG_INFO = NO; 367 | MTL_FAST_MATH = YES; 368 | SDKROOT = iphoneos; 369 | SWIFT_COMPILATION_MODE = wholemodule; 370 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 371 | VALIDATE_PRODUCT = YES; 372 | }; 373 | name = Release; 374 | }; 375 | CA24919C2400211400C7465C /* Debug */ = { 376 | isa = XCBuildConfiguration; 377 | baseConfigurationReference = 22E4E5C15D3D57036F524A06 /* Pods-SoftUIExample.debug.xcconfig */; 378 | buildSettings = { 379 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 380 | CODE_SIGN_ENTITLEMENTS = SoftUIExample/SoftUIExample.entitlements; 381 | CODE_SIGN_STYLE = Automatic; 382 | DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; 383 | DEVELOPMENT_TEAM = FV47G7RKX5; 384 | INFOPLIST_FILE = SoftUIExample/Info.plist; 385 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 386 | LD_RUNPATH_SEARCH_PATHS = ( 387 | "$(inherited)", 388 | "@executable_path/Frameworks", 389 | ); 390 | MARKETING_VERSION = 0.0.2; 391 | PRODUCT_BUNDLE_IDENTIFIER = com.hellc.SoftUIExample; 392 | PRODUCT_NAME = "$(TARGET_NAME)"; 393 | SUPPORTS_MACCATALYST = YES; 394 | SWIFT_VERSION = 5.0; 395 | TARGETED_DEVICE_FAMILY = "1,2"; 396 | }; 397 | name = Debug; 398 | }; 399 | CA24919D2400211400C7465C /* Release */ = { 400 | isa = XCBuildConfiguration; 401 | baseConfigurationReference = 76D9FE638325C4C17404A7E4 /* Pods-SoftUIExample.release.xcconfig */; 402 | buildSettings = { 403 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 404 | CODE_SIGN_ENTITLEMENTS = SoftUIExample/SoftUIExample.entitlements; 405 | CODE_SIGN_STYLE = Automatic; 406 | DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; 407 | DEVELOPMENT_TEAM = FV47G7RKX5; 408 | INFOPLIST_FILE = SoftUIExample/Info.plist; 409 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 410 | LD_RUNPATH_SEARCH_PATHS = ( 411 | "$(inherited)", 412 | "@executable_path/Frameworks", 413 | ); 414 | MARKETING_VERSION = 0.0.2; 415 | PRODUCT_BUNDLE_IDENTIFIER = com.hellc.SoftUIExample; 416 | PRODUCT_NAME = "$(TARGET_NAME)"; 417 | SUPPORTS_MACCATALYST = YES; 418 | SWIFT_VERSION = 5.0; 419 | TARGETED_DEVICE_FAMILY = "1,2"; 420 | }; 421 | name = Release; 422 | }; 423 | /* End XCBuildConfiguration section */ 424 | 425 | /* Begin XCConfigurationList section */ 426 | CA2491802400210F00C7465C /* Build configuration list for PBXProject "SoftUIExample" */ = { 427 | isa = XCConfigurationList; 428 | buildConfigurations = ( 429 | CA2491992400211400C7465C /* Debug */, 430 | CA24919A2400211400C7465C /* Release */, 431 | ); 432 | defaultConfigurationIsVisible = 0; 433 | defaultConfigurationName = Release; 434 | }; 435 | CA24919B2400211400C7465C /* Build configuration list for PBXNativeTarget "SoftUIExample" */ = { 436 | isa = XCConfigurationList; 437 | buildConfigurations = ( 438 | CA24919C2400211400C7465C /* Debug */, 439 | CA24919D2400211400C7465C /* Release */, 440 | ); 441 | defaultConfigurationIsVisible = 0; 442 | defaultConfigurationName = Release; 443 | }; 444 | /* End XCConfigurationList section */ 445 | }; 446 | rootObject = CA24917D2400210F00C7465C /* Project object */; 447 | } 448 | -------------------------------------------------------------------------------- /Example/SoftUIExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/SoftUIExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/SoftUIExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/SoftUIExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/SoftUIExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SoftUIExample 4 | // 5 | // Created by Ivan Manov on 21.02.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | func application(_ application: UIApplication, 15 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 16 | // Override point for customization after application launch. 17 | return true 18 | } 19 | 20 | // MARK: UISceneSession Lifecycle 21 | 22 | func application(_ application: UIApplication, 23 | configurationForConnecting connectingSceneSession: UISceneSession, 24 | options: UIScene.ConnectionOptions) -> UISceneConfiguration { 25 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Example/SoftUIExample/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 | } -------------------------------------------------------------------------------- /Example/SoftUIExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/SoftUIExample/Assets.xcassets/first.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "first.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /Example/SoftUIExample/Assets.xcassets/first.imageset/first.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellc/SoftUI/46134bbf5b2423970a53323c6c0b745ecdb8a35d/Example/SoftUIExample/Assets.xcassets/first.imageset/first.pdf -------------------------------------------------------------------------------- /Example/SoftUIExample/Assets.xcassets/image_doc.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "image_doc.pdf", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "original" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Example/SoftUIExample/Assets.xcassets/image_doc.imageset/image_doc.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellc/SoftUI/46134bbf5b2423970a53323c6c0b745ecdb8a35d/Example/SoftUIExample/Assets.xcassets/image_doc.imageset/image_doc.pdf -------------------------------------------------------------------------------- /Example/SoftUIExample/Assets.xcassets/second.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "second.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /Example/SoftUIExample/Assets.xcassets/second.imageset/second.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellc/SoftUI/46134bbf5b2423970a53323c6c0b745ecdb8a35d/Example/SoftUIExample/Assets.xcassets/second.imageset/second.pdf -------------------------------------------------------------------------------- /Example/SoftUIExample/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 | -------------------------------------------------------------------------------- /Example/SoftUIExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 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 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /Example/SoftUIExample/FirstViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FirstViewController.swift 3 | // SoftUIExample 4 | // 5 | // Created by Ivan Manov on 21.02.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SoftUI 11 | 12 | class FirstViewController: UIViewController { 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view. 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/SoftUIExample/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 | LSApplicationCategoryType 22 | public.app-category.productivity 23 | LSRequiresIPhoneOS 24 | 25 | UIApplicationSceneManifest 26 | 27 | UIApplicationSupportsMultipleScenes 28 | 29 | UISceneConfigurations 30 | 31 | UIWindowSceneSessionRoleApplication 32 | 33 | 34 | UISceneConfigurationName 35 | Default Configuration 36 | UISceneDelegateClassName 37 | $(PRODUCT_MODULE_NAME).SceneDelegate 38 | UISceneStoryboardFile 39 | Main 40 | 41 | 42 | 43 | 44 | UILaunchStoryboardName 45 | LaunchScreen 46 | UIMainStoryboardFile 47 | Main 48 | UIRequiredDeviceCapabilities 49 | 50 | armv7 51 | 52 | UIStatusBarTintParameters 53 | 54 | UINavigationBar 55 | 56 | Style 57 | UIBarStyleDefault 58 | Translucent 59 | 60 | 61 | 62 | UISupportedInterfaceOrientations 63 | 64 | UIInterfaceOrientationPortrait 65 | UIInterfaceOrientationLandscapeLeft 66 | UIInterfaceOrientationLandscapeRight 67 | 68 | UISupportedInterfaceOrientations~ipad 69 | 70 | UIInterfaceOrientationPortrait 71 | UIInterfaceOrientationPortraitUpsideDown 72 | UIInterfaceOrientationLandscapeLeft 73 | UIInterfaceOrientationLandscapeRight 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Example/SoftUIExample/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // SoftUIExample 4 | // 5 | // Created by Ivan Manov on 21.02.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 12 | var window: UIWindow? 13 | } 14 | -------------------------------------------------------------------------------- /Example/SoftUIExample/SecondViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.swift 3 | // SoftUIExample 4 | // 5 | // Created by Ivan Manov on 21.02.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SoftUI 11 | 12 | class SecondViewController: UIViewController { 13 | @IBOutlet weak var softCard: SoftCard! 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | var model = SoftCardItemModel() 19 | model.image = UIImage(named: "image_doc") 20 | model.title = "Title" 21 | model.description = "Description" 22 | // model.actionTitle = "Action" 23 | // model.actionHandler = { sender in 24 | // // TODO: Handle action 25 | // } 26 | 27 | let softCardItem = SoftCardItem(frame: self.softCard.bounds) 28 | softCardItem.configure(with: model) 29 | 30 | let softCardItem2 = SoftCardItem(frame: self.softCard.bounds) 31 | softCardItem2.configure(with: model) 32 | 33 | softCard.items = [softCardItem, softCardItem2] 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Example/SoftUIExample/SoftUIExample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Framework/SoftUI.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | CA17645824014EF500770162 /* SoftButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA17645724014EF500770162 /* SoftButton.swift */; }; 11 | CA17645B2401597600770162 /* SoftUI.podspec in Resources */ = {isa = PBXBuildFile; fileRef = CA17645A2401597600770162 /* SoftUI.podspec */; }; 12 | CA249165240016AC00C7465C /* SoftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA24915B240016AC00C7465C /* SoftUI.framework */; }; 13 | CA24916A240016AC00C7465C /* SoftUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA249169240016AC00C7465C /* SoftUITests.swift */; }; 14 | CA24916C240016AC00C7465C /* SoftUI.h in Headers */ = {isa = PBXBuildFile; fileRef = CA24915E240016AC00C7465C /* SoftUI.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | CA24917B24001FEB00C7465C /* UIView+SoftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA24917A24001FEB00C7465C /* UIView+SoftUI.swift */; }; 16 | CA2491AE24002A6F00C7465C /* Enums.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA2491AD24002A6F00C7465C /* Enums.swift */; }; 17 | CA2491B024002B9700C7465C /* CALayer+SoftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA2491AF24002B9700C7465C /* CALayer+SoftUI.swift */; }; 18 | CA57D0DC248A42D200D6D1B5 /* SoftCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA57D0DB248A42D200D6D1B5 /* SoftCard.swift */; }; 19 | CA57D0DE248A431F00D6D1B5 /* SoftCard.xib in Resources */ = {isa = PBXBuildFile; fileRef = CA57D0DD248A431F00D6D1B5 /* SoftCard.xib */; }; 20 | CA57D0E7248A738500D6D1B5 /* SoftCardItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA57D0E5248A738500D6D1B5 /* SoftCardItem.swift */; }; 21 | CA57D0E8248A738500D6D1B5 /* SoftCardItem.xib in Resources */ = {isa = PBXBuildFile; fileRef = CA57D0E6248A738500D6D1B5 /* SoftCardItem.xib */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | CA249166240016AC00C7465C /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = CA249152240016AC00C7465C /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = CA24915A240016AC00C7465C; 30 | remoteInfo = SoftUI; 31 | }; 32 | /* End PBXContainerItemProxy section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | CA17645724014EF500770162 /* SoftButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoftButton.swift; sourceTree = ""; }; 36 | CA17645A2401597600770162 /* SoftUI.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SoftUI.podspec; path = ../SoftUI.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 37 | CA24915B240016AC00C7465C /* SoftUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SoftUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | CA24915E240016AC00C7465C /* SoftUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SoftUI.h; sourceTree = ""; }; 39 | CA24915F240016AC00C7465C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 40 | CA249164240016AC00C7465C /* SoftUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SoftUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | CA249169240016AC00C7465C /* SoftUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoftUITests.swift; sourceTree = ""; }; 42 | CA24916B240016AC00C7465C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | CA24917A24001FEB00C7465C /* UIView+SoftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+SoftUI.swift"; sourceTree = ""; }; 44 | CA2491AD24002A6F00C7465C /* Enums.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Enums.swift; sourceTree = ""; }; 45 | CA2491AF24002B9700C7465C /* CALayer+SoftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CALayer+SoftUI.swift"; sourceTree = ""; }; 46 | CA57D0DB248A42D200D6D1B5 /* SoftCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoftCard.swift; sourceTree = ""; }; 47 | CA57D0DD248A431F00D6D1B5 /* SoftCard.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SoftCard.xib; sourceTree = ""; }; 48 | CA57D0E5248A738500D6D1B5 /* SoftCardItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoftCardItem.swift; sourceTree = ""; }; 49 | CA57D0E6248A738500D6D1B5 /* SoftCardItem.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SoftCardItem.xib; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | CA249158240016AC00C7465C /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | CA249161240016AC00C7465C /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | CA249165240016AC00C7465C /* SoftUI.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | CA17645C2401645C00770162 /* Frameworks */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | ); 75 | name = Frameworks; 76 | sourceTree = ""; 77 | }; 78 | CA249151240016AC00C7465C = { 79 | isa = PBXGroup; 80 | children = ( 81 | CA17645A2401597600770162 /* SoftUI.podspec */, 82 | CA24915D240016AC00C7465C /* SoftUI */, 83 | CA249168240016AC00C7465C /* SoftUITests */, 84 | CA24915C240016AC00C7465C /* Products */, 85 | CA17645C2401645C00770162 /* Frameworks */, 86 | ); 87 | sourceTree = ""; 88 | }; 89 | CA24915C240016AC00C7465C /* Products */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | CA24915B240016AC00C7465C /* SoftUI.framework */, 93 | CA249164240016AC00C7465C /* SoftUITests.xctest */, 94 | ); 95 | name = Products; 96 | sourceTree = ""; 97 | }; 98 | CA24915D240016AC00C7465C /* SoftUI */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | CA249175240016CC00C7465C /* Core */, 102 | CA24917824001FA800C7465C /* Controls */, 103 | CA24915E240016AC00C7465C /* SoftUI.h */, 104 | CA24915F240016AC00C7465C /* Info.plist */, 105 | ); 106 | path = SoftUI; 107 | sourceTree = ""; 108 | }; 109 | CA249168240016AC00C7465C /* SoftUITests */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | CA249169240016AC00C7465C /* SoftUITests.swift */, 113 | CA24916B240016AC00C7465C /* Info.plist */, 114 | ); 115 | path = SoftUITests; 116 | sourceTree = ""; 117 | }; 118 | CA249175240016CC00C7465C /* Core */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | CA24917924001FC400C7465C /* Shared */, 122 | ); 123 | path = Core; 124 | sourceTree = ""; 125 | }; 126 | CA24917824001FA800C7465C /* Controls */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | CA57D0DA248A422A00D6D1B5 /* Cards */, 130 | CA2491AC240029EF00C7465C /* Buttons */, 131 | ); 132 | path = Controls; 133 | sourceTree = ""; 134 | }; 135 | CA24917924001FC400C7465C /* Shared */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | CA2491AD24002A6F00C7465C /* Enums.swift */, 139 | CA2491AF24002B9700C7465C /* CALayer+SoftUI.swift */, 140 | CA24917A24001FEB00C7465C /* UIView+SoftUI.swift */, 141 | ); 142 | path = Shared; 143 | sourceTree = ""; 144 | }; 145 | CA2491AC240029EF00C7465C /* Buttons */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | CA17645724014EF500770162 /* SoftButton.swift */, 149 | ); 150 | path = Buttons; 151 | sourceTree = ""; 152 | }; 153 | CA57D0DA248A422A00D6D1B5 /* Cards */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | CA57D0E4248A736600D6D1B5 /* Items */, 157 | CA57D0DB248A42D200D6D1B5 /* SoftCard.swift */, 158 | CA57D0DD248A431F00D6D1B5 /* SoftCard.xib */, 159 | ); 160 | path = Cards; 161 | sourceTree = ""; 162 | }; 163 | CA57D0E4248A736600D6D1B5 /* Items */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | CA57D0E5248A738500D6D1B5 /* SoftCardItem.swift */, 167 | CA57D0E6248A738500D6D1B5 /* SoftCardItem.xib */, 168 | ); 169 | name = Items; 170 | path = Templates; 171 | sourceTree = ""; 172 | }; 173 | /* End PBXGroup section */ 174 | 175 | /* Begin PBXHeadersBuildPhase section */ 176 | CA249156240016AC00C7465C /* Headers */ = { 177 | isa = PBXHeadersBuildPhase; 178 | buildActionMask = 2147483647; 179 | files = ( 180 | CA24916C240016AC00C7465C /* SoftUI.h in Headers */, 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | }; 184 | /* End PBXHeadersBuildPhase section */ 185 | 186 | /* Begin PBXNativeTarget section */ 187 | CA24915A240016AC00C7465C /* SoftUI */ = { 188 | isa = PBXNativeTarget; 189 | buildConfigurationList = CA24916F240016AC00C7465C /* Build configuration list for PBXNativeTarget "SoftUI" */; 190 | buildPhases = ( 191 | CA249156240016AC00C7465C /* Headers */, 192 | CA249157240016AC00C7465C /* Sources */, 193 | CA249158240016AC00C7465C /* Frameworks */, 194 | CA249159240016AC00C7465C /* Resources */, 195 | CA2491B12400316700C7465C /* ShellScript */, 196 | ); 197 | buildRules = ( 198 | ); 199 | dependencies = ( 200 | ); 201 | name = SoftUI; 202 | productName = SoftUI; 203 | productReference = CA24915B240016AC00C7465C /* SoftUI.framework */; 204 | productType = "com.apple.product-type.framework"; 205 | }; 206 | CA249163240016AC00C7465C /* SoftUITests */ = { 207 | isa = PBXNativeTarget; 208 | buildConfigurationList = CA249172240016AC00C7465C /* Build configuration list for PBXNativeTarget "SoftUITests" */; 209 | buildPhases = ( 210 | CA249160240016AC00C7465C /* Sources */, 211 | CA249161240016AC00C7465C /* Frameworks */, 212 | CA249162240016AC00C7465C /* Resources */, 213 | ); 214 | buildRules = ( 215 | ); 216 | dependencies = ( 217 | CA249167240016AC00C7465C /* PBXTargetDependency */, 218 | ); 219 | name = SoftUITests; 220 | productName = SoftUITests; 221 | productReference = CA249164240016AC00C7465C /* SoftUITests.xctest */; 222 | productType = "com.apple.product-type.bundle.unit-test"; 223 | }; 224 | /* End PBXNativeTarget section */ 225 | 226 | /* Begin PBXProject section */ 227 | CA249152240016AC00C7465C /* Project object */ = { 228 | isa = PBXProject; 229 | attributes = { 230 | LastSwiftUpdateCheck = 1130; 231 | LastUpgradeCheck = 1130; 232 | ORGANIZATIONNAME = hellc; 233 | TargetAttributes = { 234 | CA24915A240016AC00C7465C = { 235 | CreatedOnToolsVersion = 11.3.1; 236 | LastSwiftMigration = 1130; 237 | }; 238 | CA249163240016AC00C7465C = { 239 | CreatedOnToolsVersion = 11.3.1; 240 | }; 241 | }; 242 | }; 243 | buildConfigurationList = CA249155240016AC00C7465C /* Build configuration list for PBXProject "SoftUI" */; 244 | compatibilityVersion = "Xcode 9.3"; 245 | developmentRegion = en; 246 | hasScannedForEncodings = 0; 247 | knownRegions = ( 248 | en, 249 | Base, 250 | ); 251 | mainGroup = CA249151240016AC00C7465C; 252 | productRefGroup = CA24915C240016AC00C7465C /* Products */; 253 | projectDirPath = ""; 254 | projectRoot = ""; 255 | targets = ( 256 | CA24915A240016AC00C7465C /* SoftUI */, 257 | CA249163240016AC00C7465C /* SoftUITests */, 258 | ); 259 | }; 260 | /* End PBXProject section */ 261 | 262 | /* Begin PBXResourcesBuildPhase section */ 263 | CA249159240016AC00C7465C /* Resources */ = { 264 | isa = PBXResourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | CA57D0E8248A738500D6D1B5 /* SoftCardItem.xib in Resources */, 268 | CA17645B2401597600770162 /* SoftUI.podspec in Resources */, 269 | CA57D0DE248A431F00D6D1B5 /* SoftCard.xib in Resources */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | CA249162240016AC00C7465C /* Resources */ = { 274 | isa = PBXResourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | /* End PBXResourcesBuildPhase section */ 281 | 282 | /* Begin PBXShellScriptBuildPhase section */ 283 | CA2491B12400316700C7465C /* ShellScript */ = { 284 | isa = PBXShellScriptBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | ); 288 | inputFileListPaths = ( 289 | ); 290 | inputPaths = ( 291 | ); 292 | outputFileListPaths = ( 293 | ); 294 | outputPaths = ( 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | shellPath = /bin/sh; 298 | shellScript = "if which swiftlint >/dev/null; then\nswiftlint autocorrect --path \"$SRCROOT\"/SoftUI\nswiftlint --path \"$SRCROOT\"/SoftUI\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; 299 | }; 300 | /* End PBXShellScriptBuildPhase section */ 301 | 302 | /* Begin PBXSourcesBuildPhase section */ 303 | CA249157240016AC00C7465C /* Sources */ = { 304 | isa = PBXSourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | CA24917B24001FEB00C7465C /* UIView+SoftUI.swift in Sources */, 308 | CA2491B024002B9700C7465C /* CALayer+SoftUI.swift in Sources */, 309 | CA2491AE24002A6F00C7465C /* Enums.swift in Sources */, 310 | CA57D0DC248A42D200D6D1B5 /* SoftCard.swift in Sources */, 311 | CA57D0E7248A738500D6D1B5 /* SoftCardItem.swift in Sources */, 312 | CA17645824014EF500770162 /* SoftButton.swift in Sources */, 313 | ); 314 | runOnlyForDeploymentPostprocessing = 0; 315 | }; 316 | CA249160240016AC00C7465C /* Sources */ = { 317 | isa = PBXSourcesBuildPhase; 318 | buildActionMask = 2147483647; 319 | files = ( 320 | CA24916A240016AC00C7465C /* SoftUITests.swift in Sources */, 321 | ); 322 | runOnlyForDeploymentPostprocessing = 0; 323 | }; 324 | /* End PBXSourcesBuildPhase section */ 325 | 326 | /* Begin PBXTargetDependency section */ 327 | CA249167240016AC00C7465C /* PBXTargetDependency */ = { 328 | isa = PBXTargetDependency; 329 | target = CA24915A240016AC00C7465C /* SoftUI */; 330 | targetProxy = CA249166240016AC00C7465C /* PBXContainerItemProxy */; 331 | }; 332 | /* End PBXTargetDependency section */ 333 | 334 | /* Begin XCBuildConfiguration section */ 335 | CA24916D240016AC00C7465C /* Debug */ = { 336 | isa = XCBuildConfiguration; 337 | buildSettings = { 338 | ALWAYS_SEARCH_USER_PATHS = NO; 339 | CLANG_ANALYZER_NONNULL = YES; 340 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 341 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 342 | CLANG_CXX_LIBRARY = "libc++"; 343 | CLANG_ENABLE_MODULES = YES; 344 | CLANG_ENABLE_OBJC_ARC = YES; 345 | CLANG_ENABLE_OBJC_WEAK = YES; 346 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 347 | CLANG_WARN_BOOL_CONVERSION = YES; 348 | CLANG_WARN_COMMA = YES; 349 | CLANG_WARN_CONSTANT_CONVERSION = YES; 350 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 351 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 352 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 353 | CLANG_WARN_EMPTY_BODY = YES; 354 | CLANG_WARN_ENUM_CONVERSION = YES; 355 | CLANG_WARN_INFINITE_RECURSION = YES; 356 | CLANG_WARN_INT_CONVERSION = YES; 357 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 358 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 359 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 360 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 361 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 362 | CLANG_WARN_STRICT_PROTOTYPES = YES; 363 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 364 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 365 | CLANG_WARN_UNREACHABLE_CODE = YES; 366 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 367 | COPY_PHASE_STRIP = NO; 368 | CURRENT_PROJECT_VERSION = 1; 369 | DEBUG_INFORMATION_FORMAT = dwarf; 370 | ENABLE_STRICT_OBJC_MSGSEND = YES; 371 | ENABLE_TESTABILITY = YES; 372 | GCC_C_LANGUAGE_STANDARD = gnu11; 373 | GCC_DYNAMIC_NO_PIC = NO; 374 | GCC_NO_COMMON_BLOCKS = YES; 375 | GCC_OPTIMIZATION_LEVEL = 0; 376 | GCC_PREPROCESSOR_DEFINITIONS = ( 377 | "DEBUG=1", 378 | "$(inherited)", 379 | ); 380 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 381 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 382 | GCC_WARN_UNDECLARED_SELECTOR = YES; 383 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 384 | GCC_WARN_UNUSED_FUNCTION = YES; 385 | GCC_WARN_UNUSED_VARIABLE = YES; 386 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 387 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 388 | MTL_FAST_MATH = YES; 389 | ONLY_ACTIVE_ARCH = YES; 390 | SDKROOT = iphoneos; 391 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 392 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 393 | VERSIONING_SYSTEM = "apple-generic"; 394 | VERSION_INFO_PREFIX = ""; 395 | }; 396 | name = Debug; 397 | }; 398 | CA24916E240016AC00C7465C /* Release */ = { 399 | isa = XCBuildConfiguration; 400 | buildSettings = { 401 | ALWAYS_SEARCH_USER_PATHS = NO; 402 | CLANG_ANALYZER_NONNULL = YES; 403 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 404 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 405 | CLANG_CXX_LIBRARY = "libc++"; 406 | CLANG_ENABLE_MODULES = YES; 407 | CLANG_ENABLE_OBJC_ARC = YES; 408 | CLANG_ENABLE_OBJC_WEAK = YES; 409 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 410 | CLANG_WARN_BOOL_CONVERSION = YES; 411 | CLANG_WARN_COMMA = YES; 412 | CLANG_WARN_CONSTANT_CONVERSION = YES; 413 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 414 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 415 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 416 | CLANG_WARN_EMPTY_BODY = YES; 417 | CLANG_WARN_ENUM_CONVERSION = YES; 418 | CLANG_WARN_INFINITE_RECURSION = YES; 419 | CLANG_WARN_INT_CONVERSION = YES; 420 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 421 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 422 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 423 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 424 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 425 | CLANG_WARN_STRICT_PROTOTYPES = YES; 426 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 427 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 428 | CLANG_WARN_UNREACHABLE_CODE = YES; 429 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 430 | COPY_PHASE_STRIP = NO; 431 | CURRENT_PROJECT_VERSION = 1; 432 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 433 | ENABLE_NS_ASSERTIONS = NO; 434 | ENABLE_STRICT_OBJC_MSGSEND = YES; 435 | GCC_C_LANGUAGE_STANDARD = gnu11; 436 | GCC_NO_COMMON_BLOCKS = YES; 437 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 438 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 439 | GCC_WARN_UNDECLARED_SELECTOR = YES; 440 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 441 | GCC_WARN_UNUSED_FUNCTION = YES; 442 | GCC_WARN_UNUSED_VARIABLE = YES; 443 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 444 | MTL_ENABLE_DEBUG_INFO = NO; 445 | MTL_FAST_MATH = YES; 446 | SDKROOT = iphoneos; 447 | SWIFT_COMPILATION_MODE = wholemodule; 448 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 449 | VALIDATE_PRODUCT = YES; 450 | VERSIONING_SYSTEM = "apple-generic"; 451 | VERSION_INFO_PREFIX = ""; 452 | }; 453 | name = Release; 454 | }; 455 | CA249170240016AC00C7465C /* Debug */ = { 456 | isa = XCBuildConfiguration; 457 | buildSettings = { 458 | CLANG_ENABLE_MODULES = YES; 459 | CODE_SIGN_STYLE = Automatic; 460 | DEFINES_MODULE = YES; 461 | DEVELOPMENT_TEAM = FV47G7RKX5; 462 | DYLIB_COMPATIBILITY_VERSION = 1; 463 | DYLIB_CURRENT_VERSION = 1; 464 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 465 | INFOPLIST_FILE = SoftUI/Info.plist; 466 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 467 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 468 | LD_RUNPATH_SEARCH_PATHS = ( 469 | "$(inherited)", 470 | "@executable_path/Frameworks", 471 | "@loader_path/Frameworks", 472 | ); 473 | MARKETING_VERSION = 0.0.3; 474 | PRODUCT_BUNDLE_IDENTIFIER = com.hellc.SoftUI; 475 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 476 | SKIP_INSTALL = YES; 477 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 478 | SWIFT_VERSION = 5.0; 479 | TARGETED_DEVICE_FAMILY = "1,2"; 480 | }; 481 | name = Debug; 482 | }; 483 | CA249171240016AC00C7465C /* Release */ = { 484 | isa = XCBuildConfiguration; 485 | buildSettings = { 486 | CLANG_ENABLE_MODULES = YES; 487 | CODE_SIGN_STYLE = Automatic; 488 | DEFINES_MODULE = YES; 489 | DEVELOPMENT_TEAM = FV47G7RKX5; 490 | DYLIB_COMPATIBILITY_VERSION = 1; 491 | DYLIB_CURRENT_VERSION = 1; 492 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 493 | INFOPLIST_FILE = SoftUI/Info.plist; 494 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 495 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 496 | LD_RUNPATH_SEARCH_PATHS = ( 497 | "$(inherited)", 498 | "@executable_path/Frameworks", 499 | "@loader_path/Frameworks", 500 | ); 501 | MARKETING_VERSION = 0.0.3; 502 | PRODUCT_BUNDLE_IDENTIFIER = com.hellc.SoftUI; 503 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 504 | SKIP_INSTALL = YES; 505 | SWIFT_VERSION = 5.0; 506 | TARGETED_DEVICE_FAMILY = "1,2"; 507 | }; 508 | name = Release; 509 | }; 510 | CA249173240016AC00C7465C /* Debug */ = { 511 | isa = XCBuildConfiguration; 512 | buildSettings = { 513 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 514 | CODE_SIGN_STYLE = Automatic; 515 | DEVELOPMENT_TEAM = FV47G7RKX5; 516 | INFOPLIST_FILE = SoftUITests/Info.plist; 517 | LD_RUNPATH_SEARCH_PATHS = ( 518 | "$(inherited)", 519 | "@executable_path/Frameworks", 520 | "@loader_path/Frameworks", 521 | ); 522 | PRODUCT_BUNDLE_IDENTIFIER = com.hellc.SoftUITests; 523 | PRODUCT_NAME = "$(TARGET_NAME)"; 524 | SWIFT_VERSION = 5.0; 525 | TARGETED_DEVICE_FAMILY = "1,2"; 526 | }; 527 | name = Debug; 528 | }; 529 | CA249174240016AC00C7465C /* Release */ = { 530 | isa = XCBuildConfiguration; 531 | buildSettings = { 532 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 533 | CODE_SIGN_STYLE = Automatic; 534 | DEVELOPMENT_TEAM = FV47G7RKX5; 535 | INFOPLIST_FILE = SoftUITests/Info.plist; 536 | LD_RUNPATH_SEARCH_PATHS = ( 537 | "$(inherited)", 538 | "@executable_path/Frameworks", 539 | "@loader_path/Frameworks", 540 | ); 541 | PRODUCT_BUNDLE_IDENTIFIER = com.hellc.SoftUITests; 542 | PRODUCT_NAME = "$(TARGET_NAME)"; 543 | SWIFT_VERSION = 5.0; 544 | TARGETED_DEVICE_FAMILY = "1,2"; 545 | }; 546 | name = Release; 547 | }; 548 | /* End XCBuildConfiguration section */ 549 | 550 | /* Begin XCConfigurationList section */ 551 | CA249155240016AC00C7465C /* Build configuration list for PBXProject "SoftUI" */ = { 552 | isa = XCConfigurationList; 553 | buildConfigurations = ( 554 | CA24916D240016AC00C7465C /* Debug */, 555 | CA24916E240016AC00C7465C /* Release */, 556 | ); 557 | defaultConfigurationIsVisible = 0; 558 | defaultConfigurationName = Release; 559 | }; 560 | CA24916F240016AC00C7465C /* Build configuration list for PBXNativeTarget "SoftUI" */ = { 561 | isa = XCConfigurationList; 562 | buildConfigurations = ( 563 | CA249170240016AC00C7465C /* Debug */, 564 | CA249171240016AC00C7465C /* Release */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | defaultConfigurationName = Release; 568 | }; 569 | CA249172240016AC00C7465C /* Build configuration list for PBXNativeTarget "SoftUITests" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | CA249173240016AC00C7465C /* Debug */, 573 | CA249174240016AC00C7465C /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | /* End XCConfigurationList section */ 579 | }; 580 | rootObject = CA249152240016AC00C7465C /* Project object */; 581 | } 582 | -------------------------------------------------------------------------------- /Framework/SoftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Framework/SoftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Framework/SoftUI/Controls/Buttons/SoftButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SoftButton.swift 3 | // SoftUI 4 | // 5 | // Created by Ivan Manov on 22.02.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class SoftButton: UIButton { 12 | public override var state: UIControl.State { 13 | let state = super.state 14 | self.updateShape(for: state) 15 | 16 | return state 17 | 18 | } 19 | 20 | private func updateShape(for state: UIControl.State) { 21 | switch state { 22 | case .normal: 23 | self.layer.soft_shapeType = .flat 24 | case .highlighted: 25 | self.layer.soft_shapeType = .pressed 26 | case .focused: 27 | self.layer.soft_shapeType = .concave 28 | case .selected: 29 | self.layer.soft_shapeType = .pressed 30 | default: 31 | self.layer.soft_shapeType = .flat 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Framework/SoftUI/Controls/Cards/SoftCard.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SoftCard.swift 3 | // SoftUI 4 | // 5 | // Created by Ivan Manov on 05.06.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @IBDesignable 12 | public class SoftCard: UIView { 13 | var view: UIView! 14 | public var items = [UIView]() { 15 | didSet { 16 | self.updateUI() 17 | } 18 | } 19 | 20 | @IBOutlet weak var scrollView: UIScrollView! 21 | @IBOutlet weak var pageControl: UIPageControl! 22 | 23 | // MARK: Init methods 24 | 25 | override init(frame: CGRect) { 26 | super.init(frame: frame) 27 | self.loadViewFromNib() 28 | } 29 | 30 | required public init?(coder: NSCoder) { 31 | super.init(coder: coder) 32 | self.loadViewFromNib() 33 | } 34 | 35 | private func loadViewFromNib() { 36 | let bundle = Bundle(for: self.classForCoder) 37 | let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle) 38 | if let view = nib.instantiate(withOwner: self, options: nil).first as? UIView { 39 | view.frame = bounds 40 | view.autoresizingMask = [.flexibleWidth, .flexibleHeight] 41 | self.addSubview(view) 42 | self.view = view 43 | } 44 | } 45 | 46 | public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { 47 | super.traitCollectionDidChange(previousTraitCollection) 48 | self.updateUI() 49 | } 50 | 51 | // MARK: Public methods 52 | 53 | public func update(with items: [UIView]) { 54 | self.items.removeAll() 55 | self.items.append(contentsOf: items) 56 | 57 | self.updateUI() 58 | } 59 | 60 | // MARK: Private methods 61 | 62 | private func updateUI() { 63 | self.scrollView.subviews.forEach { subview in 64 | subview.removeFromSuperview() 65 | } 66 | 67 | self.pageControl.isHidden = self.items.count <= 1 68 | self.pageControl.numberOfPages = self.items.count 69 | 70 | self.scrollView.frame = CGRect(x: 0, y: 0, width: self.bounds.width, height: self.bounds.height) 71 | self.scrollView.contentSize = CGSize(width: self.bounds.width * CGFloat(self.items.count), 72 | height: self.bounds.height) 73 | self.scrollView.isPagingEnabled = true 74 | 75 | for itemIndex in 0 ..< self.items.count { 76 | self.items[itemIndex].frame = CGRect(x: self.bounds.width * CGFloat(itemIndex), 77 | y: 0, 78 | width: self.bounds.width, 79 | height: self.bounds.height) 80 | self.scrollView.addSubview(self.items[itemIndex]) 81 | } 82 | 83 | self.layoutIfNeeded() 84 | } 85 | } 86 | 87 | // MARK: UIScrollViewDelegate 88 | 89 | extension SoftCard: UIScrollViewDelegate { 90 | public func scrollViewDidScroll(_ scrollView: UIScrollView) { 91 | let pageIndex = round(scrollView.contentOffset.x / self.bounds.width) 92 | self.pageControl.currentPage = Int(pageIndex) 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /Framework/SoftUI/Controls/Cards/SoftCard.xib: -------------------------------------------------------------------------------- 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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /Framework/SoftUI/Controls/Cards/Templates/SoftCardItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SoftCardItem.swift 3 | // SoftUI 4 | // 5 | // Created by Ivan Manov on 05.06.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public struct SoftCardItemModel { 12 | public init() {} 13 | 14 | public var image: UIImage? 15 | public var title: String? 16 | public var description: String? 17 | public var actionTitle: String? 18 | public var actionHandler: ((_ sender: Any) -> Void)? 19 | } 20 | 21 | @IBDesignable 22 | public class SoftCardItem: UIView { 23 | var view: UIView! 24 | var model: SoftCardItemModel! 25 | 26 | @IBOutlet weak var imageView: UIImageView? 27 | @IBOutlet weak var titleLabel: UILabel? 28 | @IBOutlet weak var descLabel: UILabel? 29 | @IBOutlet weak var actionButton: UIButton? 30 | 31 | // MARK: Init methods 32 | 33 | override public init(frame: CGRect) { 34 | super.init(frame: frame) 35 | self.loadViewFromNib() 36 | } 37 | 38 | required public init?(coder: NSCoder) { 39 | super.init(coder: coder) 40 | self.loadViewFromNib() 41 | } 42 | 43 | private func loadViewFromNib() { 44 | let bundle = Bundle(for: self.classForCoder) 45 | let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle) 46 | if let view = nib.instantiate(withOwner: self, options: nil).first as? UIView { 47 | view.frame = bounds 48 | view.autoresizingMask = [.flexibleWidth, .flexibleHeight] 49 | self.addSubview(view) 50 | self.view = view 51 | } 52 | } 53 | 54 | // MARK: Configure 55 | 56 | public func configure(with model: SoftCardItemModel) { 57 | self.model = model 58 | self.updateUI() 59 | } 60 | 61 | // MARK: Private methods 62 | 63 | private func updateUI() { 64 | guard let model = self.model else { return } 65 | 66 | self.imageView?.image = model.image 67 | self.imageView?.isHidden = model.image == nil 68 | self.titleLabel?.text = model.title 69 | self.titleLabel?.isHidden = model.title == nil 70 | self.descLabel?.text = model.description 71 | self.descLabel?.isHidden = model.description == nil 72 | self.actionButton?.setTitle(model.actionTitle, for: .normal) 73 | self.actionButton?.isHidden = model.actionTitle == nil 74 | } 75 | 76 | // MARK: UIActions 77 | 78 | @IBAction func onActionButtonTap(_ sender: Any) { 79 | self.model?.actionHandler?(sender) 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Framework/SoftUI/Controls/Cards/Templates/SoftCardItem.xib: -------------------------------------------------------------------------------- 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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 40 | 47 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /Framework/SoftUI/Core/Shared/CALayer+SoftUI.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer+SoftUI.swift 3 | // SoftUI 4 | // 5 | // Created by Ivan Manov on 21.02.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | typealias Holder = [Int: T] 12 | 13 | // swiftlint:disable identifier_name 14 | internal extension CALayer { 15 | private static var _soft_useSoftUI = Holder() 16 | var soft_useSoftUI: Bool { 17 | set (value) { 18 | CALayer._soft_useSoftUI[self.hash] = value 19 | self.soft_update() 20 | } 21 | get { 22 | return CALayer._soft_useSoftUI[self.hash] ?? false 23 | } 24 | } 25 | 26 | private static var _soft_tag = Holder() 27 | var soft_tag: Int { 28 | set (value) { 29 | CALayer._soft_tag[self.hash] = value 30 | } 31 | get { 32 | return CALayer._soft_tag[self.hash] ?? -1 33 | } 34 | } 35 | 36 | private static var _soft_lightColor = Holder() 37 | var soft_lightColor: CGColor? { 38 | set (value) { 39 | CALayer._soft_lightColor[self.hash] = value 40 | self.soft_update() 41 | } 42 | get { 43 | return CALayer._soft_lightColor[self.hash] 44 | } 45 | } 46 | 47 | private static var _soft_darkColor = Holder() 48 | var soft_darkColor: CGColor? { 49 | set (value) { 50 | CALayer._soft_darkColor[self.hash] = value 51 | self.soft_update() 52 | } 53 | get { 54 | return CALayer._soft_darkColor[self.hash] 55 | } 56 | } 57 | 58 | private static var _soft_mainColor = Holder() 59 | var soft_mainColor: CGColor? { 60 | set (value) { 61 | CALayer._soft_mainColor[self.hash] = value 62 | self.soft_update() 63 | } 64 | get { 65 | if let mainColor = CALayer._soft_mainColor[self.hash] { 66 | return mainColor 67 | } 68 | 69 | CALayer._soft_mainColor[self.hash] = self.backgroundColor 70 | self.backgroundColor = nil 71 | 72 | return CALayer._soft_mainColor[self.hash] 73 | } 74 | } 75 | 76 | private static var _soft_intensity = Holder() 77 | var soft_intensity: CGFloat { 78 | set (value) { 79 | CALayer._soft_intensity[self.hash] = value 80 | self.soft_update() 81 | } 82 | get { 83 | return CALayer._soft_intensity[self.hash] ?? 0.5 84 | } 85 | } 86 | 87 | private static var _soft_borderWidth = Holder() 88 | var soft_borderWidth: CGFloat { 89 | set (value) { 90 | CALayer._soft_borderWidth[self.hash] = value 91 | self.soft_update() 92 | } 93 | get { 94 | return CALayer._soft_borderWidth[self.hash] ?? 0.0 95 | } 96 | } 97 | 98 | private static var _soft_cornerRadius = Holder() 99 | var soft_cornerRadius: CGFloat { 100 | set (value) { 101 | CALayer._soft_cornerRadius[self.hash] = value 102 | self.soft_update() 103 | } 104 | get { 105 | return CALayer._soft_cornerRadius[self.hash] ?? 0.0 106 | } 107 | } 108 | 109 | private static var _soft_shadowDistance = Holder() 110 | var soft_shadowDistance: CGFloat? { 111 | set (value) { 112 | CALayer._soft_shadowDistance[self.hash] = value 113 | self.soft_update() 114 | } 115 | get { 116 | return CALayer._soft_shadowDistance[self.hash] 117 | } 118 | } 119 | 120 | private static var _soft_shapeType = Holder() 121 | var soft_shapeType: ShapeType { 122 | set (type) { 123 | CALayer._soft_shapeType[self.hash] = type 124 | self.soft_update() 125 | } 126 | get { 127 | return CALayer._soft_shapeType[self.hash] ?? .flat 128 | } 129 | } 130 | 131 | private static var _soft_lightSource = Holder() 132 | var soft_lightSource: LightSource { 133 | set (type) { 134 | CALayer._soft_lightSource[self.hash] = type 135 | self.soft_update() 136 | } 137 | get { 138 | return CALayer._soft_lightSource[self.hash] ?? .topLeft 139 | } 140 | } 141 | 142 | private static var _soft_cornerType = Holder() 143 | var soft_cornerType: CornerType { 144 | set (type) { 145 | CALayer._soft_cornerType[self.hash] = type 146 | self.soft_update() 147 | } 148 | get { 149 | return CALayer._soft_cornerType[self.hash] ?? .all 150 | } 151 | } 152 | 153 | private func soft_colorLayer() -> CALayer { 154 | let layer = CAShapeLayer() 155 | 156 | layer.soft_tag = 1 157 | layer.frame = self.bounds 158 | 159 | return layer 160 | } 161 | 162 | private func soft_shadowLayer() -> CALayer { 163 | let layer = CALayer(layer: self) 164 | 165 | layer.soft_tag = 2 166 | layer.masksToBounds = false 167 | layer.backgroundColor = UIColor.black.cgColor 168 | layer.frame = self.bounds 169 | 170 | layer.soft_updateCorners(with: self.soft_cornerType, 171 | and: self.soft_cornerRadius + 4) 172 | 173 | return layer 174 | } 175 | 176 | // swiftlint:disable function_body_length 177 | private func soft_update() { 178 | if !self.soft_useSoftUI { return } 179 | 180 | self.sublayers?.removeAll(where: { $0.soft_tag > 0 }) 181 | 182 | // Main layer 183 | let mainColorLayer = self.soft_colorLayer() 184 | mainColorLayer.soft_updateCorners(with: self.soft_cornerType, 185 | and: self.soft_cornerRadius) 186 | mainColorLayer.backgroundColor = self.soft_mainColor 187 | self.backgroundColor = UIColor.clear.cgColor 188 | self.insertSublayer(mainColorLayer, at: 0) 189 | 190 | // Shadow 191 | let lightColor = self.soft_lightColor 192 | let darkColor = self.soft_darkColor 193 | if let shadowDistance = self.soft_shadowDistance, shadowDistance > 0, self.soft_shapeType != .pressed { 194 | if lightColor != nil { 195 | let shadowLayer = self.soft_shadowLayer() 196 | 197 | shadowLayer.soft_updateShadow(of: .light, 198 | distance: shadowDistance, 199 | intensity: self.soft_intensity, 200 | lightSource: self.soft_lightSource, 201 | color: lightColor) 202 | 203 | self.insertSublayer(shadowLayer, below: mainColorLayer) 204 | } 205 | 206 | if darkColor != nil { 207 | let shadowLayer = self.soft_shadowLayer() 208 | 209 | shadowLayer.soft_updateShadow(of: .dark, 210 | distance: shadowDistance, 211 | intensity: self.soft_intensity, 212 | lightSource: self.soft_lightSource, 213 | color: darkColor) 214 | 215 | self.insertSublayer(shadowLayer, below: mainColorLayer) 216 | } 217 | } 218 | 219 | if lightColor != nil, darkColor != nil { 220 | // Border 221 | if self.soft_borderWidth > 0 { 222 | let border = self.soft_gradient(for: self.soft_lightSource, 223 | colors: [lightColor!, lightColor!, lightColor!, darkColor!]) 224 | 225 | let shape = CAShapeLayer() 226 | shape.lineWidth = self.soft_borderWidth 227 | shape.path = self.soft_path(for: self.soft_cornerType, radius: self.soft_cornerRadius) 228 | shape.strokeColor = UIColor.black.cgColor 229 | shape.fillColor = UIColor.clear.cgColor 230 | border.mask = shape 231 | 232 | mainColorLayer.insertSublayer(border, at: 0) 233 | mainColorLayer.masksToBounds = true 234 | } 235 | 236 | // Shape 237 | switch self.soft_shapeType { 238 | case .concave, .convex, .pressed: 239 | mainColorLayer.updateShape(for: self.soft_lightSource, 240 | with: self.soft_shapeType, 241 | lightColor: lightColor!, 242 | darkColor: darkColor!) 243 | default: break 244 | } 245 | } 246 | } 247 | 248 | private func updateShape(for lightSource: LightSource, 249 | with type: ShapeType, 250 | lightColor: CGColor, 251 | darkColor: CGColor) { 252 | let lightColor = lightColor.copy(alpha: 0.1)! 253 | let darkColor = darkColor.copy(alpha: 0.1)! 254 | 255 | var colors: [CGColor] = [] 256 | var locations: [NSNumber] = [] 257 | var gradientType: CAGradientLayerType = .axial 258 | 259 | let gradient = CAGradientLayer() 260 | gradient.startPoint = lightSource.startEndPoints.0 261 | gradient.endPoint = lightSource.startEndPoints.1 262 | 263 | switch type { 264 | case .concave: 265 | colors = [darkColor, lightColor] 266 | locations = [0, 1] 267 | gradientType = .axial 268 | case .convex: 269 | colors = [lightColor, darkColor] 270 | locations = [0, 1] 271 | gradientType = .axial 272 | case .pressed: 273 | colors = [darkColor, lightColor] 274 | locations = [0, 1] 275 | gradientType = .radial 276 | default: break 277 | } 278 | 279 | gradient.type = gradientType 280 | gradient.frame = self.bounds 281 | gradient.colors = colors 282 | 283 | gradient.locations = locations 284 | 285 | self.insertSublayer(gradient, at: 0) 286 | self.masksToBounds = true 287 | } 288 | } 289 | 290 | extension CALayer { 291 | fileprivate func soft_gradient(for type: LightSource, 292 | colors: [CGColor], 293 | gradientType: CAGradientLayerType = .axial, 294 | locations: [NSNumber] = [0, 0.5, 0.5, 1]) -> CALayer { 295 | let gradient = CAGradientLayer() 296 | 297 | gradient.type = gradientType 298 | gradient.frame = self.bounds 299 | gradient.colors = colors 300 | 301 | gradient.locations = locations 302 | gradient.startPoint = type.startEndPoints.0 303 | gradient.endPoint = type.startEndPoints.1 304 | 305 | return gradient 306 | } 307 | 308 | fileprivate func soft_path(for type: CornerType, radius: CGFloat) -> CGPath { 309 | var roundingCorners: UIRectCorner = [.allCorners] 310 | 311 | switch type { 312 | case .all: 313 | roundingCorners = [.allCorners] 314 | case .bottom: 315 | roundingCorners = [.bottomLeft, .bottomRight] 316 | case .top: 317 | roundingCorners = [.topLeft, .topRight] 318 | default: break 319 | } 320 | 321 | let path = UIBezierPath(roundedRect: self.bounds, 322 | byRoundingCorners: roundingCorners, 323 | cornerRadii: CGSize(width: radius, height: radius)) 324 | 325 | return path.cgPath 326 | } 327 | } 328 | 329 | extension CALayer { 330 | fileprivate func soft_updateShadow(of type: ShadowType, 331 | distance: CGFloat = 5, 332 | intensity: CGFloat = 1, 333 | blur: CGFloat = 1, 334 | lightSource: LightSource = .topLeft, 335 | color: CGColor?) { 336 | self.shadowColor = color 337 | self.shadowOpacity = Float(intensity) 338 | self.shadowRadius = distance * blur 339 | 340 | var offset = CGSize(width: distance, height: distance) 341 | 342 | switch lightSource { 343 | case .topLeft: 344 | offset = CGSize(width: type == .light ? -distance : distance, 345 | height: type == .light ? -distance : distance) 346 | case .topRight: 347 | offset = CGSize(width: type == .light ? distance : -distance, 348 | height: type == .light ? -distance : distance) 349 | case .bottomLeft: 350 | offset = CGSize(width: type == .dark ? distance : -distance, 351 | height: type == .dark ? -distance : distance) 352 | case .bottomRight: 353 | offset = CGSize(width: type == .dark ? -distance : distance, 354 | height: type == .dark ? -distance : distance) 355 | default: break 356 | } 357 | 358 | self.shadowOffset = offset 359 | } 360 | } 361 | 362 | extension CALayer { 363 | fileprivate func soft_updateCorners(with type: CornerType, and radius: CGFloat) { 364 | if type == .none { return } 365 | 366 | self.cornerRadius = radius 367 | 368 | switch type { 369 | case .all: 370 | self.maskedCorners = [.layerMaxXMaxYCorner, 371 | .layerMaxXMinYCorner, 372 | .layerMinXMaxYCorner, 373 | .layerMinXMinYCorner] 374 | case .bottom: 375 | self.maskedCorners = [.layerMaxXMaxYCorner, 376 | .layerMinXMaxYCorner] 377 | case .top: 378 | self.maskedCorners = [.layerMaxXMinYCorner, 379 | .layerMinXMinYCorner] 380 | default: break 381 | } 382 | } 383 | } 384 | -------------------------------------------------------------------------------- /Framework/SoftUI/Core/Shared/Enums.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Enums.swift 3 | // SoftUI 4 | // 5 | // Created by Ivan Manov on 21.02.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public enum ShadowType { 12 | case none 13 | case light 14 | case dark 15 | } 16 | 17 | public enum LightSource: String { 18 | case none 19 | case topLeft 20 | case topRight 21 | case bottomLeft 22 | case bottomRight 23 | 24 | var startEndPoints: (CGPoint, CGPoint) { 25 | switch self { 26 | case .topLeft, .none: 27 | return (CGPoint(x: 0, y: 0), CGPoint(x: 1, y: 1)) 28 | case .topRight: 29 | return (CGPoint(x: 1, y: 0), CGPoint(x: 0, y: 1)) 30 | case .bottomLeft: 31 | return (CGPoint(x: 1, y: 1), CGPoint(x: 1, y: 0)) 32 | case .bottomRight: 33 | return (CGPoint(x: 1, y: 1), CGPoint(x: 0, y: 0)) 34 | } 35 | } 36 | } 37 | 38 | public enum ShapeType: String { 39 | case flat 40 | case concave 41 | case convex 42 | case pressed 43 | } 44 | 45 | public enum CornerType: String { 46 | case none 47 | case all 48 | case top 49 | case middle 50 | case bottom 51 | } 52 | -------------------------------------------------------------------------------- /Framework/SoftUI/Core/Shared/UIView+SoftUI.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+SoftUI.swift 3 | // SoftUI 4 | // 5 | // Created by Ivan Manov on 21.02.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @IBDesignable 12 | public extension UIView { 13 | @IBInspectable 14 | var useSoftUI: Bool { 15 | set (value) { 16 | self.layer.soft_useSoftUI = value 17 | } 18 | get { 19 | return self.layer.soft_useSoftUI 20 | } 21 | } 22 | 23 | @IBInspectable 24 | var intensity: CGFloat { 25 | set (intensity) { 26 | self.layer.soft_intensity = intensity 27 | } 28 | get { 29 | return self.layer.soft_intensity 30 | } 31 | } 32 | 33 | @IBInspectable 34 | var cornerRadius: CGFloat { 35 | set (radius) { 36 | self.layer.soft_cornerRadius = radius 37 | } 38 | get { 39 | return self.layer.soft_cornerRadius 40 | } 41 | } 42 | 43 | @IBInspectable 44 | var borderWidth: CGFloat { 45 | set (width) { 46 | self.layer.soft_borderWidth = width 47 | } 48 | get { 49 | return self.layer.soft_borderWidth 50 | } 51 | } 52 | 53 | @IBInspectable 54 | var distance: CGFloat { 55 | set (distance) { 56 | self.layer.soft_shadowDistance = distance 57 | } 58 | get { 59 | return self.layer.soft_shadowDistance ?? 0 60 | } 61 | } 62 | 63 | @IBInspectable 64 | var cornerType: String { 65 | set (type) { 66 | self.layer.soft_cornerType = CornerType(rawValue: type) ?? .none 67 | } 68 | get { 69 | return self.layer.soft_cornerType.rawValue 70 | } 71 | } 72 | 73 | @IBInspectable 74 | var shapeType: String { 75 | set (type) { 76 | self.layer.soft_shapeType = ShapeType(rawValue: type) ?? .flat 77 | } 78 | get { 79 | return self.layer.soft_shapeType.rawValue 80 | } 81 | } 82 | 83 | @IBInspectable 84 | var lightSource: String { 85 | set (type) { 86 | self.layer.soft_lightSource = LightSource(rawValue: type) ?? .none 87 | } 88 | get { 89 | return self.layer.soft_lightSource.rawValue 90 | } 91 | } 92 | 93 | @IBInspectable 94 | var lightColor: UIColor { 95 | set (color) { 96 | self.layer.soft_lightColor = color.cgColor 97 | } 98 | get { 99 | if let cgColor = self.layer.soft_lightColor { 100 | return UIColor(cgColor: cgColor) 101 | } else { 102 | return .clear 103 | } 104 | } 105 | } 106 | 107 | @IBInspectable 108 | var darkColor: UIColor { 109 | set (color) { 110 | self.layer.soft_darkColor = color.cgColor 111 | } 112 | get { 113 | if let cgColor = self.layer.soft_darkColor { 114 | return UIColor(cgColor: cgColor) 115 | } else { 116 | return .clear 117 | } 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /Framework/SoftUI/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 | -------------------------------------------------------------------------------- /Framework/SoftUI/SoftUI.h: -------------------------------------------------------------------------------- 1 | // 2 | // SoftUI.h 3 | // SoftUI 4 | // 5 | // Created by Ivan Manov on 21.02.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for SoftUI. 12 | FOUNDATION_EXPORT double SoftUIVersionNumber; 13 | 14 | //! Project version string for SoftUI. 15 | FOUNDATION_EXPORT const unsigned char SoftUIVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Framework/SoftUITests/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 | -------------------------------------------------------------------------------- /Framework/SoftUITests/SoftUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SoftUITests.swift 3 | // SoftUITests 4 | // 5 | // Created by Ivan Manov on 21.02.2020. 6 | // Copyright © 2020 hellc. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import SoftUI 11 | 12 | class SoftUITests: XCTestCase { 13 | 14 | override func setUp() { 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | } 21 | 22 | func testExample() { 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() { 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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Ivan Manov 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 | -------------------------------------------------------------------------------- /Preview/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellc/SoftUI/46134bbf5b2423970a53323c6c0b745ecdb8a35d/Preview/banner.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Image description](https://github.com/hellc/SoftUI/blob/master/Preview/banner.jpg) 2 | -------------------------------------------------------------------------------- /SoftUI.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.swift_versions = '5.0' 4 | s.name = 'SoftUI' 5 | s.version = '0.0.5' 6 | s.summary = 'Neumorphism design pattern implementation for macOS/iOS/watchOS/tvOS' 7 | s.homepage = 'https://github.com/hellc/SoftUI' 8 | s.license = 'MIT' 9 | s.author = { 'Ivan Manov' => 'ivanmanov@live.com' } 10 | s.social_media_url = 'https://twitter.com/ihellc' 11 | 12 | s.requires_arc = false 13 | s.ios.deployment_target = '11.0' 14 | 15 | s.resources = "Framework/SoftUI/**/*.xib" 16 | s.resource_bundles = { 17 | 'SoftUI' => [ 18 | 'Framework/SoftUI/**/*.xib' 19 | ] 20 | } 21 | 22 | s.source = { :git => 'https://github.com/hellc/SoftUI.git', :tag => s.version } 23 | 24 | s.default_subspec = 'All' 25 | 26 | s.subspec 'All' do |all| 27 | all.dependency 'SoftUI/Core' 28 | all.dependency 'SoftUI/Buttons' 29 | all.dependency 'SoftUI/Cards' 30 | end 31 | 32 | s.subspec 'Core' do |core| 33 | core.source_files = 'Framework/SoftUI/Core/**/*.swift' 34 | end 35 | 36 | s.subspec 'Buttons' do |buttons| 37 | buttons.dependency 'SoftUI/Core' 38 | buttons.source_files = 'Framework/SoftUI/Controls/Buttons/*.swift' 39 | end 40 | 41 | s.subspec 'Cards' do |cards| 42 | cards.dependency 'SoftUI/Core' 43 | cards.source_files = 'Framework/SoftUI/Controls/Cards/**/*.{swift}' 44 | end 45 | 46 | end 47 | --------------------------------------------------------------------------------