├── .gitattributes ├── .gitignore ├── .swift-version ├── .travis.yml ├── Demo ├── Demo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── Demo │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── DemoMac │ ├── AppDelegate.swift │ ├── Base.lproj │ └── Main.storyboard │ ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift ├── LICENSE ├── README.md ├── Verbena.podspec ├── Verbena.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── Verbena.xcscheme │ └── VerbenaMac.xcscheme ├── Verbena.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── WorkspaceSettings.xcsettings ├── Verbena ├── Extensions │ └── UIImage.swift ├── Info.plist └── Verbena.h ├── VerbenaMac ├── Extensions │ ├── NSImage.swift │ └── NSView.swift ├── Info.plist └── VerbenaMac.h ├── VerbenaMacTests ├── Info.plist ├── NSImageFromViewSpec.swift └── NSImageRenderSpec.swift ├── VerbenaTests ├── Helpers.swift ├── Info.plist ├── UIImageFromViewSpec.swift └── UIImageRenderSpec.swift ├── bin ├── docs └── test └── logo.png /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj merge=union 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X Finder 2 | .DS_Store 3 | 4 | # Xcode per-user config 5 | *.mode1 6 | *.mode1v3 7 | *.mode2v3 8 | *.perspective 9 | *.perspectivev3 10 | *.pbxuser 11 | xcuserdata 12 | *.xccheckout 13 | 14 | # Build products 15 | build/ 16 | *.o 17 | *.LinkFileList 18 | *.hmap 19 | 20 | # Automatic backup files 21 | *~.nib/ 22 | *.swp 23 | *~ 24 | *.dat 25 | *.dep 26 | 27 | # Cocoapods 28 | Pods 29 | 30 | # Carthage 31 | Carthage/ 32 | Verbena.framework.zip 33 | 34 | # AppCode specific files 35 | .idea/ 36 | *.iml 37 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode7.1 3 | script: ./bin/test 4 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 005F1F421B28002100A905EF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 005F1F411B28002100A905EF /* AppDelegate.swift */; }; 11 | 005F1F441B28002100A905EF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 005F1F431B28002100A905EF /* ViewController.swift */; }; 12 | 005F1F471B28002100A905EF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 005F1F451B28002100A905EF /* Main.storyboard */; }; 13 | 005F1F491B28002100A905EF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 005F1F481B28002100A905EF /* Images.xcassets */; }; 14 | 005F1F4C1B28002100A905EF /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 005F1F4A1B28002100A905EF /* LaunchScreen.xib */; }; 15 | 005F1F6A1B2800C900A905EF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 005F1F691B2800C900A905EF /* AppDelegate.swift */; }; 16 | 005F1F6C1B2800C900A905EF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 005F1F6B1B2800C900A905EF /* ViewController.swift */; }; 17 | 005F1F6E1B2800C900A905EF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 005F1F6D1B2800C900A905EF /* Images.xcassets */; }; 18 | 005F1F711B2800C900A905EF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 005F1F6F1B2800C900A905EF /* Main.storyboard */; }; 19 | 00664A9C1B28024B006744CE /* Verbena.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00664A9B1B28024B006744CE /* Verbena.framework */; }; 20 | 00664A9E1B280267006744CE /* Verbena.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00664A9D1B280267006744CE /* Verbena.framework */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | 005F1F3C1B28002100A905EF /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | 005F1F401B28002100A905EF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 26 | 005F1F411B28002100A905EF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 27 | 005F1F431B28002100A905EF /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 28 | 005F1F461B28002100A905EF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 29 | 005F1F481B28002100A905EF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 30 | 005F1F4B1B28002100A905EF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 31 | 005F1F651B2800C900A905EF /* VerbenaDemoMac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VerbenaDemoMac.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 005F1F681B2800C900A905EF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | 005F1F691B2800C900A905EF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 34 | 005F1F6B1B2800C900A905EF /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 35 | 005F1F6D1B2800C900A905EF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 36 | 005F1F701B2800C900A905EF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 37 | 00664A9B1B28024B006744CE /* Verbena.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Verbena.framework; path = ../../build/Debug/Verbena.framework; sourceTree = ""; }; 38 | 00664A9D1B280267006744CE /* Verbena.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Verbena.framework; path = "../../build/Debug-iphoneos/Verbena.framework"; sourceTree = ""; }; 39 | /* End PBXFileReference section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | 005F1F391B28002100A905EF /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | 00664A9E1B280267006744CE /* Verbena.framework in Frameworks */, 47 | ); 48 | runOnlyForDeploymentPostprocessing = 0; 49 | }; 50 | 005F1F621B2800C900A905EF /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | 00664A9C1B28024B006744CE /* Verbena.framework in Frameworks */, 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXFrameworksBuildPhase section */ 59 | 60 | /* Begin PBXGroup section */ 61 | 005F1F331B28002100A905EF = { 62 | isa = PBXGroup; 63 | children = ( 64 | 005F1F3E1B28002100A905EF /* Demo */, 65 | 005F1F661B2800C900A905EF /* DemoMac */, 66 | 005F1F3D1B28002100A905EF /* Products */, 67 | ); 68 | sourceTree = ""; 69 | }; 70 | 005F1F3D1B28002100A905EF /* Products */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 005F1F3C1B28002100A905EF /* Demo.app */, 74 | 005F1F651B2800C900A905EF /* VerbenaDemoMac.app */, 75 | ); 76 | name = Products; 77 | sourceTree = ""; 78 | }; 79 | 005F1F3E1B28002100A905EF /* Demo */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 005F1F411B28002100A905EF /* AppDelegate.swift */, 83 | 005F1F431B28002100A905EF /* ViewController.swift */, 84 | 005F1F451B28002100A905EF /* Main.storyboard */, 85 | 005F1F3F1B28002100A905EF /* Supporting Files */, 86 | ); 87 | path = Demo; 88 | sourceTree = ""; 89 | }; 90 | 005F1F3F1B28002100A905EF /* Supporting Files */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 005F1F481B28002100A905EF /* Images.xcassets */, 94 | 005F1F4A1B28002100A905EF /* LaunchScreen.xib */, 95 | 00664A9D1B280267006744CE /* Verbena.framework */, 96 | 005F1F401B28002100A905EF /* Info.plist */, 97 | ); 98 | name = "Supporting Files"; 99 | sourceTree = ""; 100 | }; 101 | 005F1F661B2800C900A905EF /* DemoMac */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 005F1F691B2800C900A905EF /* AppDelegate.swift */, 105 | 005F1F6B1B2800C900A905EF /* ViewController.swift */, 106 | 005F1F6F1B2800C900A905EF /* Main.storyboard */, 107 | 005F1F671B2800C900A905EF /* Supporting Files */, 108 | ); 109 | path = DemoMac; 110 | sourceTree = ""; 111 | }; 112 | 005F1F671B2800C900A905EF /* Supporting Files */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 005F1F6D1B2800C900A905EF /* Images.xcassets */, 116 | 00664A9B1B28024B006744CE /* Verbena.framework */, 117 | 005F1F681B2800C900A905EF /* Info.plist */, 118 | ); 119 | name = "Supporting Files"; 120 | sourceTree = ""; 121 | }; 122 | /* End PBXGroup section */ 123 | 124 | /* Begin PBXNativeTarget section */ 125 | 005F1F3B1B28002100A905EF /* VerbenaDemo */ = { 126 | isa = PBXNativeTarget; 127 | buildConfigurationList = 005F1F5B1B28002200A905EF /* Build configuration list for PBXNativeTarget "VerbenaDemo" */; 128 | buildPhases = ( 129 | 005F1F381B28002100A905EF /* Sources */, 130 | 005F1F391B28002100A905EF /* Frameworks */, 131 | 005F1F3A1B28002100A905EF /* Resources */, 132 | ); 133 | buildRules = ( 134 | ); 135 | dependencies = ( 136 | ); 137 | name = VerbenaDemo; 138 | productName = "Verbena Demo"; 139 | productReference = 005F1F3C1B28002100A905EF /* Demo.app */; 140 | productType = "com.apple.product-type.application"; 141 | }; 142 | 005F1F641B2800C900A905EF /* VerbenaDemoMac */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = 005F1F7E1B2800CA00A905EF /* Build configuration list for PBXNativeTarget "VerbenaDemoMac" */; 145 | buildPhases = ( 146 | 005F1F611B2800C900A905EF /* Sources */, 147 | 005F1F621B2800C900A905EF /* Frameworks */, 148 | 005F1F631B2800C900A905EF /* Resources */, 149 | ); 150 | buildRules = ( 151 | ); 152 | dependencies = ( 153 | ); 154 | name = VerbenaDemoMac; 155 | productName = DemoMac; 156 | productReference = 005F1F651B2800C900A905EF /* VerbenaDemoMac.app */; 157 | productType = "com.apple.product-type.application"; 158 | }; 159 | /* End PBXNativeTarget section */ 160 | 161 | /* Begin PBXProject section */ 162 | 005F1F341B28002100A905EF /* Project object */ = { 163 | isa = PBXProject; 164 | attributes = { 165 | LastSwiftUpdateCheck = 0700; 166 | LastUpgradeCheck = 1020; 167 | ORGANIZATIONNAME = "Kaishin & Co"; 168 | TargetAttributes = { 169 | 005F1F3B1B28002100A905EF = { 170 | CreatedOnToolsVersion = 6.3.2; 171 | LastSwiftMigration = 1020; 172 | }; 173 | 005F1F641B2800C900A905EF = { 174 | CreatedOnToolsVersion = 6.3.2; 175 | LastSwiftMigration = 1020; 176 | }; 177 | }; 178 | }; 179 | buildConfigurationList = 005F1F371B28002100A905EF /* Build configuration list for PBXProject "Demo" */; 180 | compatibilityVersion = "Xcode 3.2"; 181 | developmentRegion = en; 182 | hasScannedForEncodings = 0; 183 | knownRegions = ( 184 | en, 185 | Base, 186 | ); 187 | mainGroup = 005F1F331B28002100A905EF; 188 | productRefGroup = 005F1F3D1B28002100A905EF /* Products */; 189 | projectDirPath = ""; 190 | projectRoot = ""; 191 | targets = ( 192 | 005F1F3B1B28002100A905EF /* VerbenaDemo */, 193 | 005F1F641B2800C900A905EF /* VerbenaDemoMac */, 194 | ); 195 | }; 196 | /* End PBXProject section */ 197 | 198 | /* Begin PBXResourcesBuildPhase section */ 199 | 005F1F3A1B28002100A905EF /* Resources */ = { 200 | isa = PBXResourcesBuildPhase; 201 | buildActionMask = 2147483647; 202 | files = ( 203 | 005F1F471B28002100A905EF /* Main.storyboard in Resources */, 204 | 005F1F4C1B28002100A905EF /* LaunchScreen.xib in Resources */, 205 | 005F1F491B28002100A905EF /* Images.xcassets in Resources */, 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | }; 209 | 005F1F631B2800C900A905EF /* Resources */ = { 210 | isa = PBXResourcesBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | 005F1F6E1B2800C900A905EF /* Images.xcassets in Resources */, 214 | 005F1F711B2800C900A905EF /* Main.storyboard in Resources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | /* End PBXResourcesBuildPhase section */ 219 | 220 | /* Begin PBXSourcesBuildPhase section */ 221 | 005F1F381B28002100A905EF /* Sources */ = { 222 | isa = PBXSourcesBuildPhase; 223 | buildActionMask = 2147483647; 224 | files = ( 225 | 005F1F441B28002100A905EF /* ViewController.swift in Sources */, 226 | 005F1F421B28002100A905EF /* AppDelegate.swift in Sources */, 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | }; 230 | 005F1F611B2800C900A905EF /* Sources */ = { 231 | isa = PBXSourcesBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | 005F1F6C1B2800C900A905EF /* ViewController.swift in Sources */, 235 | 005F1F6A1B2800C900A905EF /* AppDelegate.swift in Sources */, 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | /* End PBXSourcesBuildPhase section */ 240 | 241 | /* Begin PBXVariantGroup section */ 242 | 005F1F451B28002100A905EF /* Main.storyboard */ = { 243 | isa = PBXVariantGroup; 244 | children = ( 245 | 005F1F461B28002100A905EF /* Base */, 246 | ); 247 | name = Main.storyboard; 248 | sourceTree = ""; 249 | }; 250 | 005F1F4A1B28002100A905EF /* LaunchScreen.xib */ = { 251 | isa = PBXVariantGroup; 252 | children = ( 253 | 005F1F4B1B28002100A905EF /* Base */, 254 | ); 255 | name = LaunchScreen.xib; 256 | sourceTree = ""; 257 | }; 258 | 005F1F6F1B2800C900A905EF /* Main.storyboard */ = { 259 | isa = PBXVariantGroup; 260 | children = ( 261 | 005F1F701B2800C900A905EF /* Base */, 262 | ); 263 | name = Main.storyboard; 264 | sourceTree = ""; 265 | }; 266 | /* End PBXVariantGroup section */ 267 | 268 | /* Begin XCBuildConfiguration section */ 269 | 005F1F591B28002200A905EF /* Debug */ = { 270 | isa = XCBuildConfiguration; 271 | buildSettings = { 272 | ALWAYS_SEARCH_USER_PATHS = NO; 273 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 274 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 275 | CLANG_CXX_LIBRARY = "libc++"; 276 | CLANG_ENABLE_MODULES = YES; 277 | CLANG_ENABLE_OBJC_ARC = YES; 278 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 279 | CLANG_WARN_BOOL_CONVERSION = YES; 280 | CLANG_WARN_COMMA = YES; 281 | CLANG_WARN_CONSTANT_CONVERSION = YES; 282 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 283 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 284 | CLANG_WARN_EMPTY_BODY = YES; 285 | CLANG_WARN_ENUM_CONVERSION = YES; 286 | CLANG_WARN_INFINITE_RECURSION = YES; 287 | CLANG_WARN_INT_CONVERSION = YES; 288 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 289 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 290 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 291 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 292 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 293 | CLANG_WARN_STRICT_PROTOTYPES = YES; 294 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 295 | CLANG_WARN_UNREACHABLE_CODE = YES; 296 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 297 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 298 | COPY_PHASE_STRIP = NO; 299 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 300 | ENABLE_STRICT_OBJC_MSGSEND = YES; 301 | ENABLE_TESTABILITY = YES; 302 | GCC_C_LANGUAGE_STANDARD = gnu99; 303 | GCC_DYNAMIC_NO_PIC = NO; 304 | GCC_NO_COMMON_BLOCKS = YES; 305 | GCC_OPTIMIZATION_LEVEL = 0; 306 | GCC_PREPROCESSOR_DEFINITIONS = ( 307 | "DEBUG=1", 308 | "$(inherited)", 309 | ); 310 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 311 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 312 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 313 | GCC_WARN_UNDECLARED_SELECTOR = YES; 314 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 315 | GCC_WARN_UNUSED_FUNCTION = YES; 316 | GCC_WARN_UNUSED_VARIABLE = YES; 317 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 318 | MTL_ENABLE_DEBUG_INFO = YES; 319 | ONLY_ACTIVE_ARCH = YES; 320 | SDKROOT = iphoneos; 321 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 322 | TARGETED_DEVICE_FAMILY = "1,2"; 323 | }; 324 | name = Debug; 325 | }; 326 | 005F1F5A1B28002200A905EF /* Release */ = { 327 | isa = XCBuildConfiguration; 328 | buildSettings = { 329 | ALWAYS_SEARCH_USER_PATHS = NO; 330 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 331 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 332 | CLANG_CXX_LIBRARY = "libc++"; 333 | CLANG_ENABLE_MODULES = YES; 334 | CLANG_ENABLE_OBJC_ARC = YES; 335 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 336 | CLANG_WARN_BOOL_CONVERSION = YES; 337 | CLANG_WARN_COMMA = YES; 338 | CLANG_WARN_CONSTANT_CONVERSION = YES; 339 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 340 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_UNREACHABLE_CODE = YES; 353 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 354 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 355 | COPY_PHASE_STRIP = NO; 356 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 357 | ENABLE_NS_ASSERTIONS = NO; 358 | ENABLE_STRICT_OBJC_MSGSEND = YES; 359 | GCC_C_LANGUAGE_STANDARD = gnu99; 360 | GCC_NO_COMMON_BLOCKS = YES; 361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 363 | GCC_WARN_UNDECLARED_SELECTOR = YES; 364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 365 | GCC_WARN_UNUSED_FUNCTION = YES; 366 | GCC_WARN_UNUSED_VARIABLE = YES; 367 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 368 | MTL_ENABLE_DEBUG_INFO = NO; 369 | SDKROOT = iphoneos; 370 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 371 | TARGETED_DEVICE_FAMILY = "1,2"; 372 | VALIDATE_PRODUCT = YES; 373 | }; 374 | name = Release; 375 | }; 376 | 005F1F5C1B28002200A905EF /* Debug */ = { 377 | isa = XCBuildConfiguration; 378 | buildSettings = { 379 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 380 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 381 | INFOPLIST_FILE = "$(SRCROOT)/Demo/Info.plist"; 382 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 383 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 384 | PRODUCT_BUNDLE_IDENTIFIER = co.kaishin.verbena.ios.demo; 385 | PRODUCT_NAME = Demo; 386 | SWIFT_VERSION = 5.0; 387 | }; 388 | name = Debug; 389 | }; 390 | 005F1F5D1B28002200A905EF /* Release */ = { 391 | isa = XCBuildConfiguration; 392 | buildSettings = { 393 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 394 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 395 | INFOPLIST_FILE = "$(SRCROOT)/Demo/Info.plist"; 396 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 397 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 398 | PRODUCT_BUNDLE_IDENTIFIER = co.kaishin.verbena.ios.demo; 399 | PRODUCT_NAME = Demo; 400 | SWIFT_VERSION = 5.0; 401 | }; 402 | name = Release; 403 | }; 404 | 005F1F7F1B2800CA00A905EF /* Debug */ = { 405 | isa = XCBuildConfiguration; 406 | buildSettings = { 407 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 408 | CODE_SIGN_IDENTITY = "-"; 409 | COMBINE_HIDPI_IMAGES = YES; 410 | DEBUG_INFORMATION_FORMAT = dwarf; 411 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 412 | GCC_PREPROCESSOR_DEFINITIONS = ( 413 | "DEBUG=1", 414 | "$(inherited)", 415 | ); 416 | INFOPLIST_FILE = DemoMac/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 418 | MACOSX_DEPLOYMENT_TARGET = 10.10; 419 | PRODUCT_BUNDLE_IDENTIFIER = co.kaishin.verbena.macos.demo; 420 | PRODUCT_NAME = "$(TARGET_NAME)"; 421 | SDKROOT = macosx; 422 | SWIFT_VERSION = 5.0; 423 | }; 424 | name = Debug; 425 | }; 426 | 005F1F801B2800CA00A905EF /* Release */ = { 427 | isa = XCBuildConfiguration; 428 | buildSettings = { 429 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 430 | CODE_SIGN_IDENTITY = "-"; 431 | COMBINE_HIDPI_IMAGES = YES; 432 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 433 | INFOPLIST_FILE = DemoMac/Info.plist; 434 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 435 | MACOSX_DEPLOYMENT_TARGET = 10.10; 436 | PRODUCT_BUNDLE_IDENTIFIER = co.kaishin.verbena.macos.demo; 437 | PRODUCT_NAME = "$(TARGET_NAME)"; 438 | SDKROOT = macosx; 439 | SWIFT_VERSION = 5.0; 440 | }; 441 | name = Release; 442 | }; 443 | /* End XCBuildConfiguration section */ 444 | 445 | /* Begin XCConfigurationList section */ 446 | 005F1F371B28002100A905EF /* Build configuration list for PBXProject "Demo" */ = { 447 | isa = XCConfigurationList; 448 | buildConfigurations = ( 449 | 005F1F591B28002200A905EF /* Debug */, 450 | 005F1F5A1B28002200A905EF /* Release */, 451 | ); 452 | defaultConfigurationIsVisible = 0; 453 | defaultConfigurationName = Release; 454 | }; 455 | 005F1F5B1B28002200A905EF /* Build configuration list for PBXNativeTarget "VerbenaDemo" */ = { 456 | isa = XCConfigurationList; 457 | buildConfigurations = ( 458 | 005F1F5C1B28002200A905EF /* Debug */, 459 | 005F1F5D1B28002200A905EF /* Release */, 460 | ); 461 | defaultConfigurationIsVisible = 0; 462 | defaultConfigurationName = Release; 463 | }; 464 | 005F1F7E1B2800CA00A905EF /* Build configuration list for PBXNativeTarget "VerbenaDemoMac" */ = { 465 | isa = XCConfigurationList; 466 | buildConfigurations = ( 467 | 005F1F7F1B2800CA00A905EF /* Debug */, 468 | 005F1F801B2800CA00A905EF /* Release */, 469 | ); 470 | defaultConfigurationIsVisible = 0; 471 | defaultConfigurationName = Release; 472 | }; 473 | /* End XCConfigurationList section */ 474 | }; 475 | rootObject = 005F1F341B28002100A905EF /* Project object */; 476 | } 477 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/Demo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Verbena Demo 4 | // 5 | // Created by Reda Lemeden on 09/06/2015. 6 | // Copyright (c) 2015 Kaishin & Co. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 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 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Demo/Demo/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Demo/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 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Demo/Demo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Demo/Demo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Verbena Demo 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Demo/Demo/ViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Verbena 3 | 4 | class ViewController: UIViewController { 5 | @IBOutlet weak var imageView: UIImageView! 6 | 7 | override func viewDidLoad() { 8 | super.viewDidLoad() 9 | 10 | imageView.image = UIImage.render(imageView.bounds.size, transparency: true) { size in 11 | let ovalPath = UIBezierPath(ovalIn: CGRect(origin: CGPoint(x: 0, y: 0), size: size)) 12 | UIColor(hue: 0.289, saturation: 0.485, brightness: 0.792, alpha: 1.0).setFill() 13 | ovalPath.fill() 14 | 15 | let letterPath = UIBezierPath() 16 | let startPoint = CGPoint(x: 48, y: 60) 17 | letterPath.move(to: startPoint) 18 | letterPath.addLine(to: CGPoint(x: 76, y: 65)) 19 | letterPath.addLine(to: CGPoint(x: 100, y: 110)) 20 | letterPath.addLine(to: CGPoint(x: 122, y: 65)) 21 | letterPath.addLine(to: CGPoint(x: 150, y: 60)) 22 | letterPath.addLine(to: CGPoint(x: 100, y: 158)) 23 | letterPath.addLine(to: startPoint) 24 | letterPath.close() 25 | UIColor.white.setFill() 26 | letterPath.fill() 27 | } 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Demo/DemoMac/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // DemoMac 4 | // 5 | // Created by Reda Lemeden on 09/06/2015. 6 | // Copyright (c) 2015 Kaishin & Co. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /Demo/DemoMac/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 | 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 | 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 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | Default 510 | 511 | 512 | 513 | 514 | 515 | 516 | Left to Right 517 | 518 | 519 | 520 | 521 | 522 | 523 | Right to Left 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | Default 535 | 536 | 537 | 538 | 539 | 540 | 541 | Left to Right 542 | 543 | 544 | 545 | 546 | 547 | 548 | Right to Left 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | -------------------------------------------------------------------------------- /Demo/DemoMac/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Demo/DemoMac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2015 Kaishin & Co. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /Demo/DemoMac/ViewController.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import Verbena 3 | 4 | class ViewController: NSViewController { 5 | @IBOutlet weak var imageView: NSImageView! 6 | 7 | override func viewDidLoad() { 8 | super.viewDidLoad() 9 | imageView.image = NSImage.render(CGSize(width: 200, height: 200), transparency: true) { size in 10 | let ovalPath = NSBezierPath(ovalIn: CGRect(origin: CGPoint(x: 0, y: 0), size: size)) 11 | NSColor(hue: 0.289, saturation: 0.485, brightness: 0.792, alpha: 1.0).setFill() 12 | ovalPath.fill() 13 | 14 | let letterPath = NSBezierPath() 15 | let startPoint = CGPoint(x: 48, y: 140) 16 | letterPath.move(to: startPoint) 17 | letterPath.line(to: CGPoint(x: 76, y: 135)) 18 | letterPath.line(to: CGPoint(x: 100, y: 90)) 19 | letterPath.line(to: CGPoint(x: 122, y: 135)) 20 | letterPath.line(to: CGPoint(x: 150, y: 140)) 21 | letterPath.line(to: CGPoint(x: 100, y: 42)) 22 | letterPath.line(to: startPoint) 23 | letterPath.close() 24 | NSColor.white.setFill() 25 | letterPath.fill() 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Reda Lemeden 2 | All rights reserved. 3 | 4 | BSD License 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 13 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 14 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 15 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 16 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 17 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 18 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 19 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 21 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 | 23 | The views and conclusions contained in the software and documentation are those 24 | of the authors and should not be interpreted as representing official policies, 25 | either expressed or implied, of the FreeBSD Project. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | logo 2 | 3 | # Verbena 4 | 5 | [![GitHub release](https://img.shields.io/github/release/kaishin/Verbena.svg)](https://github.com/kaishin/Verbena/releases/latest) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPods](https://img.shields.io/cocoapods/v/Verbena.svg)](https://cocoapods.org/pods/Verbena) ![Swift 4.0](https://img.shields.io/badge/Swift-4.0-orange.svg) ![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20macOS-lightgrey.svg) 6 | 7 | A micro-framework that simplifies the task of turning drawing code or views into `UIImage`/`NSImage` instances. 8 | 9 | ### Installation 10 | 11 | #### [Carthage](https://github.com/Carthage/Carthage) 12 | 13 | - Add the following to your Cartfile: `github "kaishin/Verbena"` 14 | - Then run `carthage update` 15 | - Follow the current instructions in [Carthage's README][carthage-installation] 16 | for up to date installation instructions. 17 | 18 | [carthage-installation]: https://github.com/Carthage/Carthage#adding-frameworks-to-an-application 19 | 20 | #### [CocoaPods](http://cocoapods.org) 21 | 22 | - Add the following to your [Podfile](http://guides.cocoapods.org/using/the-podfile.html): `pod 'Verbena'` 23 | - You will also need to make sure you're opting into using frameworks: `use_frameworks!` 24 | - Then run `pod install`. 25 | 26 | ### Usage 27 | 28 | ~~~swift 29 | import Verbena 30 | 31 | // Get a UIImage from drawing block 32 | let image = UIImage.render(CGSize(width: 100, height: 100)) { size in 33 | // Drawing code goes here. Example: 34 | // var ovalPath = UIBezierPath(ovalInRect: CGRect(origin: CGPoint(x: 0, y: 0), size: size)) 35 | // UIColor.blackColor().setFill() 36 | // ovalPath.fill() 37 | } 38 | 39 | // Get a UIImage from a UIView 40 | let image = UIImage.image(from: view) 41 | ~~~ 42 | 43 | The same methods can also be used on OS X with `NSImage` instead. 44 | 45 | ### Requirements 46 | 47 | - Swift 4.0+ 48 | - Xcode 9 49 | - iOS 10+ 50 | - macOS 10.10+ 51 | 52 | ### License 53 | 54 | Copyright 2013-2018 Reda Lemeden. BSD Licence. See LICENSE file for more info. 55 | -------------------------------------------------------------------------------- /Verbena.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "Verbena" 3 | s.version = "3.0.0" 4 | s.summary = "Get UIImage/NSimage instances from Core Graphics drawing code, views, etc." 5 | s.homepage = "https://github.com/kaishin/Verbena" 6 | s.social_media_url = "http://twitter.com/kaishin" 7 | s.license = { :type => "BSD", :file => "LICENSE" } 8 | s.author = { "Reda Lemeden" => "git@kaishin.haz.email" } 9 | s.source = { :git => "https://github.com/kaishin/Verbena.git", :tag => "v#{s.version}" } 10 | s.platform = :ios, "8.0" 11 | s.ios.source_files = "Verbena/**/*.{h,swift}" 12 | s.osx.source_files = "VerbenaMac/**/*.{h,swift}" 13 | s.requires_arc = true 14 | s.ios.deployment_target = "10.0" 15 | s.osx.deployment_target = "10.10" 16 | end 17 | -------------------------------------------------------------------------------- /Verbena.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00175BCE1B23BE1900EB3106 /* Verbena.h in Headers */ = {isa = PBXBuildFile; fileRef = 00175BCD1B23BE1900EB3106 /* Verbena.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 00175BD41B23BE1A00EB3106 /* Verbena.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00175BC81B23BE1900EB3106 /* Verbena.framework */; }; 12 | 00175BEE1B23BF0D00EB3106 /* VerbenaMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 00175BED1B23BF0D00EB3106 /* VerbenaMac.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 00175BF41B23BF0D00EB3106 /* Verbena.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00175BE91B23BF0D00EB3106 /* Verbena.framework */; }; 14 | 00175BFB1B23BF0D00EB3106 /* NSImageRenderSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00175BFA1B23BF0D00EB3106 /* NSImageRenderSpec.swift */; }; 15 | 00175C0A1B23C1A400EB3106 /* UIImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00175C091B23C1A400EB3106 /* UIImage.swift */; }; 16 | 00175C131B23C1F200EB3106 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00175C121B23C1F200EB3106 /* QuartzCore.framework */; }; 17 | 00175C151B23C1F900EB3106 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00175C141B23C1F900EB3106 /* QuartzCore.framework */; }; 18 | 00175C181B23C25800EB3106 /* UIImageRenderSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00175C171B23C25800EB3106 /* UIImageRenderSpec.swift */; }; 19 | 004547F4200BBA2A004E6CC2 /* NSView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 004547F3200BBA2A004E6CC2 /* NSView.swift */; }; 20 | 00C55AFD1B23DCF600540255 /* NSImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00C55AFC1B23DCF600540255 /* NSImage.swift */; }; 21 | 00C55B051B248FC000540255 /* Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00C55B031B248F5C00540255 /* Helpers.swift */; }; 22 | 00C7BCE61BFA9B6900753006 /* UIImageFromViewSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00C7BCE51BFA9B6900753006 /* UIImageFromViewSpec.swift */; }; 23 | 00C7BCE81BFAA0A900753006 /* NSImageFromViewSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00C7BCE71BFAA0A900753006 /* NSImageFromViewSpec.swift */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 00175BD51B23BE1A00EB3106 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 00175BBF1B23BE1900EB3106 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 00175BC71B23BE1900EB3106; 32 | remoteInfo = Verbena; 33 | }; 34 | 00175BF51B23BF0D00EB3106 /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = 00175BBF1B23BE1900EB3106 /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 00175BE81B23BF0D00EB3106; 39 | remoteInfo = VerbenaMac; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXCopyFilesBuildPhase section */ 44 | 00175C1B1B23C3E200EB3106 /* CopyFiles */ = { 45 | isa = PBXCopyFilesBuildPhase; 46 | buildActionMask = 2147483647; 47 | dstPath = ""; 48 | dstSubfolderSpec = 10; 49 | files = ( 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | 00175C1E1B23C43300EB3106 /* CopyFiles */ = { 54 | isa = PBXCopyFilesBuildPhase; 55 | buildActionMask = 2147483647; 56 | dstPath = ""; 57 | dstSubfolderSpec = 10; 58 | files = ( 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | /* End PBXCopyFilesBuildPhase section */ 63 | 64 | /* Begin PBXFileReference section */ 65 | 00175BC81B23BE1900EB3106 /* Verbena.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Verbena.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 66 | 00175BCC1B23BE1900EB3106 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67 | 00175BCD1B23BE1900EB3106 /* Verbena.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Verbena.h; sourceTree = ""; }; 68 | 00175BD31B23BE1A00EB3106 /* VerbenaTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VerbenaTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 69 | 00175BD91B23BE1A00EB3106 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 70 | 00175BE91B23BF0D00EB3106 /* Verbena.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Verbena.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 71 | 00175BEC1B23BF0D00EB3106 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 72 | 00175BED1B23BF0D00EB3106 /* VerbenaMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VerbenaMac.h; sourceTree = ""; }; 73 | 00175BF31B23BF0D00EB3106 /* VerbenaMacTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VerbenaMacTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 74 | 00175BF91B23BF0D00EB3106 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 75 | 00175BFA1B23BF0D00EB3106 /* NSImageRenderSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSImageRenderSpec.swift; sourceTree = ""; }; 76 | 00175C091B23C1A400EB3106 /* UIImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImage.swift; sourceTree = ""; }; 77 | 00175C121B23C1F200EB3106 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 78 | 00175C141B23C1F900EB3106 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; 79 | 00175C171B23C25800EB3106 /* UIImageRenderSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageRenderSpec.swift; sourceTree = ""; }; 80 | 004547F3200BBA2A004E6CC2 /* NSView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSView.swift; sourceTree = ""; }; 81 | 00C55AFC1B23DCF600540255 /* NSImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSImage.swift; sourceTree = ""; }; 82 | 00C55B031B248F5C00540255 /* Helpers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Helpers.swift; sourceTree = ""; }; 83 | 00C7BCE51BFA9B6900753006 /* UIImageFromViewSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageFromViewSpec.swift; sourceTree = ""; }; 84 | 00C7BCE71BFAA0A900753006 /* NSImageFromViewSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSImageFromViewSpec.swift; sourceTree = ""; }; 85 | /* End PBXFileReference section */ 86 | 87 | /* Begin PBXFrameworksBuildPhase section */ 88 | 00175BC41B23BE1900EB3106 /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | 00175C131B23C1F200EB3106 /* QuartzCore.framework in Frameworks */, 93 | ); 94 | runOnlyForDeploymentPostprocessing = 0; 95 | }; 96 | 00175BD01B23BE1A00EB3106 /* Frameworks */ = { 97 | isa = PBXFrameworksBuildPhase; 98 | buildActionMask = 2147483647; 99 | files = ( 100 | 00175BD41B23BE1A00EB3106 /* Verbena.framework in Frameworks */, 101 | ); 102 | runOnlyForDeploymentPostprocessing = 0; 103 | }; 104 | 00175BE51B23BF0D00EB3106 /* Frameworks */ = { 105 | isa = PBXFrameworksBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | 00175C151B23C1F900EB3106 /* QuartzCore.framework in Frameworks */, 109 | ); 110 | runOnlyForDeploymentPostprocessing = 0; 111 | }; 112 | 00175BF01B23BF0D00EB3106 /* Frameworks */ = { 113 | isa = PBXFrameworksBuildPhase; 114 | buildActionMask = 2147483647; 115 | files = ( 116 | 00175BF41B23BF0D00EB3106 /* Verbena.framework in Frameworks */, 117 | ); 118 | runOnlyForDeploymentPostprocessing = 0; 119 | }; 120 | /* End PBXFrameworksBuildPhase section */ 121 | 122 | /* Begin PBXGroup section */ 123 | 00175BBE1B23BE1900EB3106 = { 124 | isa = PBXGroup; 125 | children = ( 126 | 00175BCA1B23BE1900EB3106 /* Verbena */, 127 | 00175BD71B23BE1A00EB3106 /* VerbenaTests */, 128 | 00175BEA1B23BF0D00EB3106 /* VerbenaMac */, 129 | 00175BF71B23BF0D00EB3106 /* VerbenaMacTests */, 130 | 00175BC91B23BE1900EB3106 /* Products */, 131 | 00175C161B23C20600EB3106 /* Frameworks */, 132 | ); 133 | sourceTree = ""; 134 | }; 135 | 00175BC91B23BE1900EB3106 /* Products */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 00175BC81B23BE1900EB3106 /* Verbena.framework */, 139 | 00175BD31B23BE1A00EB3106 /* VerbenaTests.xctest */, 140 | 00175BE91B23BF0D00EB3106 /* Verbena.framework */, 141 | 00175BF31B23BF0D00EB3106 /* VerbenaMacTests.xctest */, 142 | ); 143 | name = Products; 144 | sourceTree = ""; 145 | }; 146 | 00175BCA1B23BE1900EB3106 /* Verbena */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 00175C081B23C14B00EB3106 /* Extensions */, 150 | 00175BCB1B23BE1900EB3106 /* Supporting Files */, 151 | ); 152 | path = Verbena; 153 | sourceTree = ""; 154 | }; 155 | 00175BCB1B23BE1900EB3106 /* Supporting Files */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 00175BCD1B23BE1900EB3106 /* Verbena.h */, 159 | 00175BCC1B23BE1900EB3106 /* Info.plist */, 160 | ); 161 | name = "Supporting Files"; 162 | sourceTree = ""; 163 | }; 164 | 00175BD71B23BE1A00EB3106 /* VerbenaTests */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | 00175C171B23C25800EB3106 /* UIImageRenderSpec.swift */, 168 | 00C7BCE51BFA9B6900753006 /* UIImageFromViewSpec.swift */, 169 | 00C55B031B248F5C00540255 /* Helpers.swift */, 170 | 00175BD81B23BE1A00EB3106 /* Supporting Files */, 171 | ); 172 | path = VerbenaTests; 173 | sourceTree = ""; 174 | }; 175 | 00175BD81B23BE1A00EB3106 /* Supporting Files */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | 00175BD91B23BE1A00EB3106 /* Info.plist */, 179 | ); 180 | name = "Supporting Files"; 181 | sourceTree = ""; 182 | }; 183 | 00175BEA1B23BF0D00EB3106 /* VerbenaMac */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | 00C55AFA1B23D92C00540255 /* Extensions */, 187 | 00175BEB1B23BF0D00EB3106 /* Supporting Files */, 188 | ); 189 | path = VerbenaMac; 190 | sourceTree = ""; 191 | }; 192 | 00175BEB1B23BF0D00EB3106 /* Supporting Files */ = { 193 | isa = PBXGroup; 194 | children = ( 195 | 00175BED1B23BF0D00EB3106 /* VerbenaMac.h */, 196 | 00175BEC1B23BF0D00EB3106 /* Info.plist */, 197 | ); 198 | name = "Supporting Files"; 199 | sourceTree = ""; 200 | }; 201 | 00175BF71B23BF0D00EB3106 /* VerbenaMacTests */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | 00175BFA1B23BF0D00EB3106 /* NSImageRenderSpec.swift */, 205 | 00C7BCE71BFAA0A900753006 /* NSImageFromViewSpec.swift */, 206 | 00175BF81B23BF0D00EB3106 /* Supporting Files */, 207 | ); 208 | path = VerbenaMacTests; 209 | sourceTree = ""; 210 | }; 211 | 00175BF81B23BF0D00EB3106 /* Supporting Files */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | 00175BF91B23BF0D00EB3106 /* Info.plist */, 215 | ); 216 | name = "Supporting Files"; 217 | sourceTree = ""; 218 | }; 219 | 00175C081B23C14B00EB3106 /* Extensions */ = { 220 | isa = PBXGroup; 221 | children = ( 222 | 00175C091B23C1A400EB3106 /* UIImage.swift */, 223 | ); 224 | path = Extensions; 225 | sourceTree = ""; 226 | }; 227 | 00175C161B23C20600EB3106 /* Frameworks */ = { 228 | isa = PBXGroup; 229 | children = ( 230 | 00175C141B23C1F900EB3106 /* QuartzCore.framework */, 231 | 00175C121B23C1F200EB3106 /* QuartzCore.framework */, 232 | ); 233 | name = Frameworks; 234 | sourceTree = ""; 235 | }; 236 | 00C55AFA1B23D92C00540255 /* Extensions */ = { 237 | isa = PBXGroup; 238 | children = ( 239 | 00C55AFC1B23DCF600540255 /* NSImage.swift */, 240 | 004547F3200BBA2A004E6CC2 /* NSView.swift */, 241 | ); 242 | path = Extensions; 243 | sourceTree = ""; 244 | }; 245 | /* End PBXGroup section */ 246 | 247 | /* Begin PBXHeadersBuildPhase section */ 248 | 00175BC51B23BE1900EB3106 /* Headers */ = { 249 | isa = PBXHeadersBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | 00175BCE1B23BE1900EB3106 /* Verbena.h in Headers */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | 00175BE61B23BF0D00EB3106 /* Headers */ = { 257 | isa = PBXHeadersBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | 00175BEE1B23BF0D00EB3106 /* VerbenaMac.h in Headers */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | /* End PBXHeadersBuildPhase section */ 265 | 266 | /* Begin PBXNativeTarget section */ 267 | 00175BC71B23BE1900EB3106 /* Verbena */ = { 268 | isa = PBXNativeTarget; 269 | buildConfigurationList = 00175BDE1B23BE1A00EB3106 /* Build configuration list for PBXNativeTarget "Verbena" */; 270 | buildPhases = ( 271 | 00175BC31B23BE1900EB3106 /* Sources */, 272 | 00175BC41B23BE1900EB3106 /* Frameworks */, 273 | 00175BC51B23BE1900EB3106 /* Headers */, 274 | 00175BC61B23BE1900EB3106 /* Resources */, 275 | 00024DED1BFAA51600976ACA /* Set Version Number */, 276 | ); 277 | buildRules = ( 278 | ); 279 | dependencies = ( 280 | ); 281 | name = Verbena; 282 | productName = Verbena; 283 | productReference = 00175BC81B23BE1900EB3106 /* Verbena.framework */; 284 | productType = "com.apple.product-type.framework"; 285 | }; 286 | 00175BD21B23BE1A00EB3106 /* VerbenaTests */ = { 287 | isa = PBXNativeTarget; 288 | buildConfigurationList = 00175BE11B23BE1A00EB3106 /* Build configuration list for PBXNativeTarget "VerbenaTests" */; 289 | buildPhases = ( 290 | 00175BCF1B23BE1A00EB3106 /* Sources */, 291 | 00175BD01B23BE1A00EB3106 /* Frameworks */, 292 | 00175BD11B23BE1A00EB3106 /* Resources */, 293 | 00175C1B1B23C3E200EB3106 /* CopyFiles */, 294 | ); 295 | buildRules = ( 296 | ); 297 | dependencies = ( 298 | 00175BD61B23BE1A00EB3106 /* PBXTargetDependency */, 299 | ); 300 | name = VerbenaTests; 301 | productName = VerbenaTests; 302 | productReference = 00175BD31B23BE1A00EB3106 /* VerbenaTests.xctest */; 303 | productType = "com.apple.product-type.bundle.unit-test"; 304 | }; 305 | 00175BE81B23BF0D00EB3106 /* VerbenaMac */ = { 306 | isa = PBXNativeTarget; 307 | buildConfigurationList = 00175BFC1B23BF0D00EB3106 /* Build configuration list for PBXNativeTarget "VerbenaMac" */; 308 | buildPhases = ( 309 | 00175BE41B23BF0D00EB3106 /* Sources */, 310 | 00175BE51B23BF0D00EB3106 /* Frameworks */, 311 | 00175BE61B23BF0D00EB3106 /* Headers */, 312 | 00175BE71B23BF0D00EB3106 /* Resources */, 313 | 00024DEE1BFAA52D00976ACA /* Set Version Number */, 314 | ); 315 | buildRules = ( 316 | ); 317 | dependencies = ( 318 | ); 319 | name = VerbenaMac; 320 | productName = VerbenaMac; 321 | productReference = 00175BE91B23BF0D00EB3106 /* Verbena.framework */; 322 | productType = "com.apple.product-type.framework"; 323 | }; 324 | 00175BF21B23BF0D00EB3106 /* VerbenaMacTests */ = { 325 | isa = PBXNativeTarget; 326 | buildConfigurationList = 00175BFF1B23BF0D00EB3106 /* Build configuration list for PBXNativeTarget "VerbenaMacTests" */; 327 | buildPhases = ( 328 | 00175BEF1B23BF0D00EB3106 /* Sources */, 329 | 00175BF01B23BF0D00EB3106 /* Frameworks */, 330 | 00175BF11B23BF0D00EB3106 /* Resources */, 331 | 00175C1E1B23C43300EB3106 /* CopyFiles */, 332 | ); 333 | buildRules = ( 334 | ); 335 | dependencies = ( 336 | 00175BF61B23BF0D00EB3106 /* PBXTargetDependency */, 337 | ); 338 | name = VerbenaMacTests; 339 | productName = VerbenaMacTests; 340 | productReference = 00175BF31B23BF0D00EB3106 /* VerbenaMacTests.xctest */; 341 | productType = "com.apple.product-type.bundle.unit-test"; 342 | }; 343 | /* End PBXNativeTarget section */ 344 | 345 | /* Begin PBXProject section */ 346 | 00175BBF1B23BE1900EB3106 /* Project object */ = { 347 | isa = PBXProject; 348 | attributes = { 349 | LastSwiftUpdateCheck = 0700; 350 | LastUpgradeCheck = 1020; 351 | ORGANIZATIONNAME = "Kaishin & Co"; 352 | TargetAttributes = { 353 | 00175BC71B23BE1900EB3106 = { 354 | CreatedOnToolsVersion = 6.3.2; 355 | LastSwiftMigration = 1020; 356 | }; 357 | 00175BD21B23BE1A00EB3106 = { 358 | CreatedOnToolsVersion = 6.3.2; 359 | DevelopmentTeam = 5G38N4D8G2; 360 | LastSwiftMigration = 1020; 361 | ProvisioningStyle = Automatic; 362 | }; 363 | 00175BE81B23BF0D00EB3106 = { 364 | CreatedOnToolsVersion = 6.3.2; 365 | LastSwiftMigration = 1020; 366 | }; 367 | 00175BF21B23BF0D00EB3106 = { 368 | CreatedOnToolsVersion = 6.3.2; 369 | LastSwiftMigration = 0920; 370 | }; 371 | }; 372 | }; 373 | buildConfigurationList = 00175BC21B23BE1900EB3106 /* Build configuration list for PBXProject "Verbena" */; 374 | compatibilityVersion = "Xcode 3.2"; 375 | developmentRegion = en; 376 | hasScannedForEncodings = 0; 377 | knownRegions = ( 378 | en, 379 | Base, 380 | ); 381 | mainGroup = 00175BBE1B23BE1900EB3106; 382 | productRefGroup = 00175BC91B23BE1900EB3106 /* Products */; 383 | projectDirPath = ""; 384 | projectRoot = ""; 385 | targets = ( 386 | 00175BC71B23BE1900EB3106 /* Verbena */, 387 | 00175BD21B23BE1A00EB3106 /* VerbenaTests */, 388 | 00175BE81B23BF0D00EB3106 /* VerbenaMac */, 389 | 00175BF21B23BF0D00EB3106 /* VerbenaMacTests */, 390 | ); 391 | }; 392 | /* End PBXProject section */ 393 | 394 | /* Begin PBXResourcesBuildPhase section */ 395 | 00175BC61B23BE1900EB3106 /* Resources */ = { 396 | isa = PBXResourcesBuildPhase; 397 | buildActionMask = 2147483647; 398 | files = ( 399 | ); 400 | runOnlyForDeploymentPostprocessing = 0; 401 | }; 402 | 00175BD11B23BE1A00EB3106 /* Resources */ = { 403 | isa = PBXResourcesBuildPhase; 404 | buildActionMask = 2147483647; 405 | files = ( 406 | ); 407 | runOnlyForDeploymentPostprocessing = 0; 408 | }; 409 | 00175BE71B23BF0D00EB3106 /* Resources */ = { 410 | isa = PBXResourcesBuildPhase; 411 | buildActionMask = 2147483647; 412 | files = ( 413 | ); 414 | runOnlyForDeploymentPostprocessing = 0; 415 | }; 416 | 00175BF11B23BF0D00EB3106 /* Resources */ = { 417 | isa = PBXResourcesBuildPhase; 418 | buildActionMask = 2147483647; 419 | files = ( 420 | ); 421 | runOnlyForDeploymentPostprocessing = 0; 422 | }; 423 | /* End PBXResourcesBuildPhase section */ 424 | 425 | /* Begin PBXShellScriptBuildPhase section */ 426 | 00024DED1BFAA51600976ACA /* Set Version Number */ = { 427 | isa = PBXShellScriptBuildPhase; 428 | buildActionMask = 2147483647; 429 | files = ( 430 | ); 431 | inputPaths = ( 432 | ); 433 | name = "Set Version Number"; 434 | outputPaths = ( 435 | ); 436 | runOnlyForDeploymentPostprocessing = 0; 437 | shellPath = /bin/sh; 438 | shellScript = "GIT_RELEASE_VERSION=$(git describe --tags --always --abbrev=0)\nCOMMITS=$(git rev-list HEAD | wc -l)\nCOMMITS=$(($COMMITS))\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion ${COMMITS}\" \"${INFOPLIST_FILE}\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString ${GIT_RELEASE_VERSION#*v}\" \"${INFOPLIST_FILE}\""; 439 | }; 440 | 00024DEE1BFAA52D00976ACA /* Set Version Number */ = { 441 | isa = PBXShellScriptBuildPhase; 442 | buildActionMask = 2147483647; 443 | files = ( 444 | ); 445 | inputPaths = ( 446 | ); 447 | name = "Set Version Number"; 448 | outputPaths = ( 449 | ); 450 | runOnlyForDeploymentPostprocessing = 0; 451 | shellPath = /bin/sh; 452 | shellScript = "GIT_RELEASE_VERSION=$(git describe --tags --always --abbrev=0)\nCOMMITS=$(git rev-list HEAD | wc -l)\nCOMMITS=$(($COMMITS))\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion ${COMMITS}\" \"${INFOPLIST_FILE}\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString ${GIT_RELEASE_VERSION#*v}\" \"${INFOPLIST_FILE}\""; 453 | }; 454 | /* End PBXShellScriptBuildPhase section */ 455 | 456 | /* Begin PBXSourcesBuildPhase section */ 457 | 00175BC31B23BE1900EB3106 /* Sources */ = { 458 | isa = PBXSourcesBuildPhase; 459 | buildActionMask = 2147483647; 460 | files = ( 461 | 00175C0A1B23C1A400EB3106 /* UIImage.swift in Sources */, 462 | ); 463 | runOnlyForDeploymentPostprocessing = 0; 464 | }; 465 | 00175BCF1B23BE1A00EB3106 /* Sources */ = { 466 | isa = PBXSourcesBuildPhase; 467 | buildActionMask = 2147483647; 468 | files = ( 469 | 00C7BCE61BFA9B6900753006 /* UIImageFromViewSpec.swift in Sources */, 470 | 00C55B051B248FC000540255 /* Helpers.swift in Sources */, 471 | 00175C181B23C25800EB3106 /* UIImageRenderSpec.swift in Sources */, 472 | ); 473 | runOnlyForDeploymentPostprocessing = 0; 474 | }; 475 | 00175BE41B23BF0D00EB3106 /* Sources */ = { 476 | isa = PBXSourcesBuildPhase; 477 | buildActionMask = 2147483647; 478 | files = ( 479 | 00C55AFD1B23DCF600540255 /* NSImage.swift in Sources */, 480 | 004547F4200BBA2A004E6CC2 /* NSView.swift in Sources */, 481 | ); 482 | runOnlyForDeploymentPostprocessing = 0; 483 | }; 484 | 00175BEF1B23BF0D00EB3106 /* Sources */ = { 485 | isa = PBXSourcesBuildPhase; 486 | buildActionMask = 2147483647; 487 | files = ( 488 | 00C7BCE81BFAA0A900753006 /* NSImageFromViewSpec.swift in Sources */, 489 | 00175BFB1B23BF0D00EB3106 /* NSImageRenderSpec.swift in Sources */, 490 | ); 491 | runOnlyForDeploymentPostprocessing = 0; 492 | }; 493 | /* End PBXSourcesBuildPhase section */ 494 | 495 | /* Begin PBXTargetDependency section */ 496 | 00175BD61B23BE1A00EB3106 /* PBXTargetDependency */ = { 497 | isa = PBXTargetDependency; 498 | target = 00175BC71B23BE1900EB3106 /* Verbena */; 499 | targetProxy = 00175BD51B23BE1A00EB3106 /* PBXContainerItemProxy */; 500 | }; 501 | 00175BF61B23BF0D00EB3106 /* PBXTargetDependency */ = { 502 | isa = PBXTargetDependency; 503 | target = 00175BE81B23BF0D00EB3106 /* VerbenaMac */; 504 | targetProxy = 00175BF51B23BF0D00EB3106 /* PBXContainerItemProxy */; 505 | }; 506 | /* End PBXTargetDependency section */ 507 | 508 | /* Begin XCBuildConfiguration section */ 509 | 00175BDC1B23BE1A00EB3106 /* Debug */ = { 510 | isa = XCBuildConfiguration; 511 | buildSettings = { 512 | ALWAYS_SEARCH_USER_PATHS = NO; 513 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 514 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 515 | CLANG_CXX_LIBRARY = "libc++"; 516 | CLANG_ENABLE_MODULES = YES; 517 | CLANG_ENABLE_OBJC_ARC = YES; 518 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 519 | CLANG_WARN_BOOL_CONVERSION = YES; 520 | CLANG_WARN_COMMA = YES; 521 | CLANG_WARN_CONSTANT_CONVERSION = YES; 522 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 523 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 524 | CLANG_WARN_EMPTY_BODY = YES; 525 | CLANG_WARN_ENUM_CONVERSION = YES; 526 | CLANG_WARN_INFINITE_RECURSION = YES; 527 | CLANG_WARN_INT_CONVERSION = YES; 528 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 529 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 530 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 531 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 532 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 533 | CLANG_WARN_STRICT_PROTOTYPES = YES; 534 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 535 | CLANG_WARN_UNREACHABLE_CODE = YES; 536 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 537 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 538 | COPY_PHASE_STRIP = NO; 539 | CURRENT_PROJECT_VERSION = 1; 540 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 541 | ENABLE_STRICT_OBJC_MSGSEND = YES; 542 | ENABLE_TESTABILITY = YES; 543 | GCC_C_LANGUAGE_STANDARD = gnu99; 544 | GCC_DYNAMIC_NO_PIC = NO; 545 | GCC_NO_COMMON_BLOCKS = YES; 546 | GCC_OPTIMIZATION_LEVEL = 0; 547 | GCC_PREPROCESSOR_DEFINITIONS = ( 548 | "DEBUG=1", 549 | "$(inherited)", 550 | ); 551 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 552 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 553 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 554 | GCC_WARN_UNDECLARED_SELECTOR = YES; 555 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 556 | GCC_WARN_UNUSED_FUNCTION = YES; 557 | GCC_WARN_UNUSED_VARIABLE = YES; 558 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 559 | MTL_ENABLE_DEBUG_INFO = YES; 560 | ONLY_ACTIVE_ARCH = YES; 561 | SDKROOT = iphoneos; 562 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 563 | TARGETED_DEVICE_FAMILY = "1,2"; 564 | VERSIONING_SYSTEM = "apple-generic"; 565 | VERSION_INFO_PREFIX = ""; 566 | }; 567 | name = Debug; 568 | }; 569 | 00175BDD1B23BE1A00EB3106 /* Release */ = { 570 | isa = XCBuildConfiguration; 571 | buildSettings = { 572 | ALWAYS_SEARCH_USER_PATHS = NO; 573 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 574 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 575 | CLANG_CXX_LIBRARY = "libc++"; 576 | CLANG_ENABLE_MODULES = YES; 577 | CLANG_ENABLE_OBJC_ARC = YES; 578 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 579 | CLANG_WARN_BOOL_CONVERSION = YES; 580 | CLANG_WARN_COMMA = YES; 581 | CLANG_WARN_CONSTANT_CONVERSION = YES; 582 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 583 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 584 | CLANG_WARN_EMPTY_BODY = YES; 585 | CLANG_WARN_ENUM_CONVERSION = YES; 586 | CLANG_WARN_INFINITE_RECURSION = YES; 587 | CLANG_WARN_INT_CONVERSION = YES; 588 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 589 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 590 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 591 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 592 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 593 | CLANG_WARN_STRICT_PROTOTYPES = YES; 594 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 595 | CLANG_WARN_UNREACHABLE_CODE = YES; 596 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 597 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 598 | COPY_PHASE_STRIP = NO; 599 | CURRENT_PROJECT_VERSION = 1; 600 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 601 | ENABLE_NS_ASSERTIONS = NO; 602 | ENABLE_STRICT_OBJC_MSGSEND = YES; 603 | GCC_C_LANGUAGE_STANDARD = gnu99; 604 | GCC_NO_COMMON_BLOCKS = YES; 605 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 606 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 607 | GCC_WARN_UNDECLARED_SELECTOR = YES; 608 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 609 | GCC_WARN_UNUSED_FUNCTION = YES; 610 | GCC_WARN_UNUSED_VARIABLE = YES; 611 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 612 | MTL_ENABLE_DEBUG_INFO = NO; 613 | SDKROOT = iphoneos; 614 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 615 | TARGETED_DEVICE_FAMILY = "1,2"; 616 | VALIDATE_PRODUCT = YES; 617 | VERSIONING_SYSTEM = "apple-generic"; 618 | VERSION_INFO_PREFIX = ""; 619 | }; 620 | name = Release; 621 | }; 622 | 00175BDF1B23BE1A00EB3106 /* Debug */ = { 623 | isa = XCBuildConfiguration; 624 | buildSettings = { 625 | APPLICATION_EXTENSION_API_ONLY = NO; 626 | CLANG_ENABLE_MODULES = YES; 627 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 628 | DEFINES_MODULE = YES; 629 | DYLIB_COMPATIBILITY_VERSION = 1; 630 | DYLIB_CURRENT_VERSION = 1; 631 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 632 | INFOPLIST_FILE = Verbena/Info.plist; 633 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 634 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 635 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 636 | PRODUCT_BUNDLE_IDENTIFIER = "co.kaishin.$(PRODUCT_NAME:rfc1034identifier)"; 637 | PRODUCT_NAME = "$(TARGET_NAME)"; 638 | SKIP_INSTALL = YES; 639 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 640 | SWIFT_VERSION = 5.0; 641 | }; 642 | name = Debug; 643 | }; 644 | 00175BE01B23BE1A00EB3106 /* Release */ = { 645 | isa = XCBuildConfiguration; 646 | buildSettings = { 647 | APPLICATION_EXTENSION_API_ONLY = NO; 648 | CLANG_ENABLE_MODULES = YES; 649 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 650 | DEFINES_MODULE = YES; 651 | DYLIB_COMPATIBILITY_VERSION = 1; 652 | DYLIB_CURRENT_VERSION = 1; 653 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 654 | INFOPLIST_FILE = Verbena/Info.plist; 655 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 656 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 657 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 658 | PRODUCT_BUNDLE_IDENTIFIER = "co.kaishin.$(PRODUCT_NAME:rfc1034identifier)"; 659 | PRODUCT_NAME = "$(TARGET_NAME)"; 660 | SKIP_INSTALL = YES; 661 | SWIFT_VERSION = 5.0; 662 | }; 663 | name = Release; 664 | }; 665 | 00175BE21B23BE1A00EB3106 /* Debug */ = { 666 | isa = XCBuildConfiguration; 667 | buildSettings = { 668 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 669 | DEVELOPMENT_TEAM = 5G38N4D8G2; 670 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 671 | GCC_PREPROCESSOR_DEFINITIONS = ( 672 | "DEBUG=1", 673 | "$(inherited)", 674 | ); 675 | INFOPLIST_FILE = VerbenaTests/Info.plist; 676 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 677 | PRODUCT_BUNDLE_IDENTIFIER = "co.kaishin.$(PRODUCT_NAME:rfc1034identifier)"; 678 | PRODUCT_NAME = "$(TARGET_NAME)"; 679 | PROVISIONING_PROFILE_SPECIFIER = ""; 680 | SWIFT_VERSION = 5.0; 681 | }; 682 | name = Debug; 683 | }; 684 | 00175BE31B23BE1A00EB3106 /* Release */ = { 685 | isa = XCBuildConfiguration; 686 | buildSettings = { 687 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 688 | DEVELOPMENT_TEAM = 5G38N4D8G2; 689 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 690 | INFOPLIST_FILE = VerbenaTests/Info.plist; 691 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 692 | PRODUCT_BUNDLE_IDENTIFIER = "co.kaishin.$(PRODUCT_NAME:rfc1034identifier)"; 693 | PRODUCT_NAME = "$(TARGET_NAME)"; 694 | PROVISIONING_PROFILE_SPECIFIER = ""; 695 | SWIFT_VERSION = 5.0; 696 | }; 697 | name = Release; 698 | }; 699 | 00175BFD1B23BF0D00EB3106 /* Debug */ = { 700 | isa = XCBuildConfiguration; 701 | buildSettings = { 702 | APPLICATION_EXTENSION_API_ONLY = YES; 703 | CLANG_ENABLE_MODULES = YES; 704 | COMBINE_HIDPI_IMAGES = YES; 705 | DEBUG_INFORMATION_FORMAT = dwarf; 706 | DEFINES_MODULE = YES; 707 | DYLIB_COMPATIBILITY_VERSION = 1; 708 | DYLIB_CURRENT_VERSION = 1; 709 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 710 | FRAMEWORK_VERSION = A; 711 | GCC_PREPROCESSOR_DEFINITIONS = ( 712 | "DEBUG=1", 713 | "$(inherited)", 714 | ); 715 | INFOPLIST_FILE = VerbenaMac/Info.plist; 716 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 717 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 718 | MACOSX_DEPLOYMENT_TARGET = 10.10; 719 | PRODUCT_BUNDLE_IDENTIFIER = "co.kaishin.$(PRODUCT_NAME:rfc1034identifier)"; 720 | PRODUCT_NAME = Verbena; 721 | SDKROOT = macosx; 722 | SKIP_INSTALL = YES; 723 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 724 | SWIFT_VERSION = 5.0; 725 | }; 726 | name = Debug; 727 | }; 728 | 00175BFE1B23BF0D00EB3106 /* Release */ = { 729 | isa = XCBuildConfiguration; 730 | buildSettings = { 731 | APPLICATION_EXTENSION_API_ONLY = YES; 732 | CLANG_ENABLE_MODULES = YES; 733 | COMBINE_HIDPI_IMAGES = YES; 734 | DEFINES_MODULE = YES; 735 | DYLIB_COMPATIBILITY_VERSION = 1; 736 | DYLIB_CURRENT_VERSION = 1; 737 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 738 | FRAMEWORK_VERSION = A; 739 | INFOPLIST_FILE = VerbenaMac/Info.plist; 740 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 741 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 742 | MACOSX_DEPLOYMENT_TARGET = 10.10; 743 | PRODUCT_BUNDLE_IDENTIFIER = "co.kaishin.$(PRODUCT_NAME:rfc1034identifier)"; 744 | PRODUCT_NAME = Verbena; 745 | SDKROOT = macosx; 746 | SKIP_INSTALL = YES; 747 | SWIFT_VERSION = 5.0; 748 | }; 749 | name = Release; 750 | }; 751 | 00175C001B23BF0D00EB3106 /* Debug */ = { 752 | isa = XCBuildConfiguration; 753 | buildSettings = { 754 | COMBINE_HIDPI_IMAGES = YES; 755 | DEBUG_INFORMATION_FORMAT = dwarf; 756 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 757 | GCC_PREPROCESSOR_DEFINITIONS = ( 758 | "DEBUG=1", 759 | "$(inherited)", 760 | ); 761 | INFOPLIST_FILE = VerbenaMacTests/Info.plist; 762 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 763 | MACOSX_DEPLOYMENT_TARGET = 10.10; 764 | PRODUCT_BUNDLE_IDENTIFIER = "co.kaishin.$(PRODUCT_NAME:rfc1034identifier)"; 765 | PRODUCT_NAME = "$(TARGET_NAME)"; 766 | SDKROOT = macosx; 767 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 768 | SWIFT_VERSION = 4.0; 769 | }; 770 | name = Debug; 771 | }; 772 | 00175C011B23BF0D00EB3106 /* Release */ = { 773 | isa = XCBuildConfiguration; 774 | buildSettings = { 775 | COMBINE_HIDPI_IMAGES = YES; 776 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 777 | INFOPLIST_FILE = VerbenaMacTests/Info.plist; 778 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 779 | MACOSX_DEPLOYMENT_TARGET = 10.10; 780 | PRODUCT_BUNDLE_IDENTIFIER = "co.kaishin.$(PRODUCT_NAME:rfc1034identifier)"; 781 | PRODUCT_NAME = "$(TARGET_NAME)"; 782 | SDKROOT = macosx; 783 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 784 | SWIFT_VERSION = 4.0; 785 | }; 786 | name = Release; 787 | }; 788 | /* End XCBuildConfiguration section */ 789 | 790 | /* Begin XCConfigurationList section */ 791 | 00175BC21B23BE1900EB3106 /* Build configuration list for PBXProject "Verbena" */ = { 792 | isa = XCConfigurationList; 793 | buildConfigurations = ( 794 | 00175BDC1B23BE1A00EB3106 /* Debug */, 795 | 00175BDD1B23BE1A00EB3106 /* Release */, 796 | ); 797 | defaultConfigurationIsVisible = 0; 798 | defaultConfigurationName = Release; 799 | }; 800 | 00175BDE1B23BE1A00EB3106 /* Build configuration list for PBXNativeTarget "Verbena" */ = { 801 | isa = XCConfigurationList; 802 | buildConfigurations = ( 803 | 00175BDF1B23BE1A00EB3106 /* Debug */, 804 | 00175BE01B23BE1A00EB3106 /* Release */, 805 | ); 806 | defaultConfigurationIsVisible = 0; 807 | defaultConfigurationName = Release; 808 | }; 809 | 00175BE11B23BE1A00EB3106 /* Build configuration list for PBXNativeTarget "VerbenaTests" */ = { 810 | isa = XCConfigurationList; 811 | buildConfigurations = ( 812 | 00175BE21B23BE1A00EB3106 /* Debug */, 813 | 00175BE31B23BE1A00EB3106 /* Release */, 814 | ); 815 | defaultConfigurationIsVisible = 0; 816 | defaultConfigurationName = Release; 817 | }; 818 | 00175BFC1B23BF0D00EB3106 /* Build configuration list for PBXNativeTarget "VerbenaMac" */ = { 819 | isa = XCConfigurationList; 820 | buildConfigurations = ( 821 | 00175BFD1B23BF0D00EB3106 /* Debug */, 822 | 00175BFE1B23BF0D00EB3106 /* Release */, 823 | ); 824 | defaultConfigurationIsVisible = 0; 825 | defaultConfigurationName = Release; 826 | }; 827 | 00175BFF1B23BF0D00EB3106 /* Build configuration list for PBXNativeTarget "VerbenaMacTests" */ = { 828 | isa = XCConfigurationList; 829 | buildConfigurations = ( 830 | 00175C001B23BF0D00EB3106 /* Debug */, 831 | 00175C011B23BF0D00EB3106 /* Release */, 832 | ); 833 | defaultConfigurationIsVisible = 0; 834 | defaultConfigurationName = Release; 835 | }; 836 | /* End XCConfigurationList section */ 837 | }; 838 | rootObject = 00175BBF1B23BE1900EB3106 /* Project object */; 839 | } 840 | -------------------------------------------------------------------------------- /Verbena.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Verbena.xcodeproj/xcshareddata/xcschemes/Verbena.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 79 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 98 | 104 | 105 | 106 | 107 | 109 | 110 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /Verbena.xcodeproj/xcshareddata/xcschemes/VerbenaMac.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 79 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 98 | 104 | 105 | 106 | 107 | 109 | 110 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /Verbena.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Verbena.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Verbena.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /Verbena/Extensions/UIImage.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension UIImage { 4 | /// Renders a `UIImage` instance from a drawing block. 5 | /// 6 | /// :param: size The target image size measured in points. 7 | /// :param: transparency A Boolean flag indicating whether the rendered image is transparent. 8 | /// :param: drawingBlockWithSize A drawing block that takes a `CGSize` and returns `Void`. 9 | /// 10 | /// :returns: A newly rendered image. 11 | public class func render(_ size: CGSize, transparency: Bool? = nil, prefersExtendedRange: Bool? = nil, drawingBlockWithSize: (CGSize) -> Void) -> UIImage { 12 | let rendererFormat = UIGraphicsImageRendererFormat.default() 13 | rendererFormat.opaque = !(transparency ?? !rendererFormat.opaque) 14 | rendererFormat.prefersExtendedRange = prefersExtendedRange ?? rendererFormat.prefersExtendedRange 15 | let renderer = UIGraphicsImageRenderer(size: size, format: rendererFormat) 16 | 17 | return renderer.image { context in 18 | drawingBlockWithSize(size) 19 | } 20 | } 21 | 22 | /// Renders a `UIImage` instance from a `UIView`. 23 | /// 24 | /// :param: view The view that will be snapshot. 25 | /// 26 | /// :returns: A newly rendered snapshot of the view. 27 | public class func image(from view: UIView, transparency: Bool? = nil, prefersExtendedRange: Bool? = nil) -> UIImage { 28 | return self.render(view.bounds.size, transparency: transparency, prefersExtendedRange: prefersExtendedRange) { size in 29 | view.drawHierarchy(in: view.bounds, afterScreenUpdates: true) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Verbena/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 54 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Verbena/Verbena.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | FOUNDATION_EXPORT double VerbenaVersionNumber; 4 | FOUNDATION_EXPORT const unsigned char VerbenaVersionString[]; 5 | -------------------------------------------------------------------------------- /VerbenaMac/Extensions/NSImage.swift: -------------------------------------------------------------------------------- 1 | import AppKit.NSImage 2 | 3 | extension NSImage { 4 | /// Renders a `NSImage` instance from a drawing block. 5 | /// 6 | /// :param: size The target image size measured in points. 7 | /// :param: transparency A Boolean flag indicating Whether the rendered image is transparent. 8 | /// :param: drawingBlockWithSize A drawing block that takes a `CGSize` and returns `Void`. 9 | /// 10 | /// :returns: A newly rendered image. 11 | public class func render(_ size: CGSize, transparency: Bool = false, drawingBlockWithSize: (CGSize) -> Void) -> NSImage { 12 | let image = NSImage(size: size) 13 | image.lockFocus() 14 | 15 | if !transparency { 16 | NSColor.white.setFill() 17 | NSRect(x: 0, y: 0, width: image.size.width, height: image.size.height).fill() 18 | } 19 | 20 | drawingBlockWithSize(size) 21 | image.unlockFocus() 22 | return image 23 | } 24 | 25 | /// Renders an `NSImage` instance from a `NSView`. 26 | /// 27 | /// :param: view The view that will be snapshot. 28 | /// 29 | /// :returns: A newly rendered snapshot of the view. 30 | public class func image(from view: NSView) -> NSImage { 31 | return view.snapshot() 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /VerbenaMac/Extensions/NSView.swift: -------------------------------------------------------------------------------- 1 | import AppKit 2 | 3 | public extension NSView { 4 | /// Get an `NSImage` representation of a view instance. 5 | /// 6 | /// - Returns: `NSImage` instance of the view 7 | func snapshot() -> NSImage { 8 | guard let bitmap = bitmapImageRepForCachingDisplay(in: bounds) else { 9 | return NSImage(size: bounds.size) 10 | } 11 | 12 | cacheDisplay(in: bounds, to: bitmap) 13 | return NSImage(cgImage: bitmap.cgImage!, size: bounds.size) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /VerbenaMac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 54 23 | NSHumanReadableCopyright 24 | Copyright © 2015 Kaishin & Co. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /VerbenaMac/VerbenaMac.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | FOUNDATION_EXPORT double VerbenaMacVersionNumber; 4 | FOUNDATION_EXPORT const unsigned char VerbenaMacVersionString[]; 5 | -------------------------------------------------------------------------------- /VerbenaMacTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /VerbenaMacTests/NSImageFromViewSpec.swift: -------------------------------------------------------------------------------- 1 | import AppKit.NSImage 2 | import Verbena 3 | import XCTest 4 | 5 | class NSImageFromViewTests: XCTestCase { 6 | var image: NSImage! 7 | 8 | override func setUp() { 9 | super.setUp() 10 | 11 | let view = NSView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) 12 | view.wantsLayer = true 13 | view.layer?.backgroundColor = NSColor.red.cgColor 14 | image = NSImage.image(from: view) 15 | } 16 | 17 | func testImageIsDrawnInContext() { 18 | XCTAssertEqual(image.size.width, 100) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /VerbenaMacTests/NSImageRenderSpec.swift: -------------------------------------------------------------------------------- 1 | import AppKit.NSImage 2 | import Verbena 3 | import XCTest 4 | 5 | class NSImageRenderTests: XCTestCase { 6 | var image: NSImage! 7 | 8 | override func setUp() { 9 | super.setUp() 10 | 11 | image = NSImage.render(CGSize(width: 100, height: 100)) { size in 12 | let ovalPath = NSBezierPath(ovalIn: CGRect(origin: CGPoint(x: 0, y: 0), size: size)) 13 | NSColor.black.setFill() 14 | ovalPath.fill() 15 | } 16 | } 17 | 18 | func testImageIsDrawnInContext() { 19 | XCTAssertEqual(image.size.width, 100) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /VerbenaTests/Helpers.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | func imageHasAlpha(_ image: UIImage) -> Bool { 4 | let alpha = image.cgImage?.alphaInfo 5 | return (alpha == .first || alpha == .last || alpha == .premultipliedFirst || alpha == .premultipliedLast) 6 | } 7 | -------------------------------------------------------------------------------- /VerbenaTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /VerbenaTests/UIImageFromViewSpec.swift: -------------------------------------------------------------------------------- 1 | import UIKit.UIImage 2 | import Verbena 3 | import XCTest 4 | 5 | class UIImageFromViewTests: XCTestCase { 6 | var image: UIImage! 7 | 8 | override func setUp() { 9 | super.setUp() 10 | 11 | let view = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) 12 | view.backgroundColor = UIColor.red 13 | image = UIImage.image(from: view) 14 | } 15 | 16 | func testImageIsDrawnInContext() { 17 | XCTAssertEqual(image.size.width, 100) 18 | } 19 | 20 | func testImageDefaultsToAlpha() { 21 | XCTAssertTrue(imageHasAlpha(image)) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /VerbenaTests/UIImageRenderSpec.swift: -------------------------------------------------------------------------------- 1 | import UIKit.UIImage 2 | import Verbena 3 | import XCTest 4 | 5 | class UIImageRenderTests: XCTestCase { 6 | var image: UIImage! 7 | 8 | override func setUp() { 9 | super.setUp() 10 | 11 | image = UIImage.render(CGSize(width: 100, height: 100), transparency: false) { size in 12 | let ovalPath = UIBezierPath(ovalIn: CGRect(origin: CGPoint(x: 0, y: 0), size: size)) 13 | UIColor.black.setFill() 14 | ovalPath.fill() 15 | } 16 | } 17 | 18 | func testImageIsDrawnInContext() { 19 | XCTAssertEqual(image.size.width, 100) 20 | } 21 | 22 | func testImageHasNoAlpha() { 23 | XCTAssertFalse(imageHasAlpha(image)) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /bin/docs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | jazzy -o ./docs -c -a "Reda Lemeden" -u "https://redalemeden.com" -g "https://github.com/kaishin/Verbena" 4 | 5 | -------------------------------------------------------------------------------- /bin/test: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o pipefail 4 | 5 | xcodebuild test -project Verbena.xcodeproj -scheme Verbena -sdk iphonesimulator BUILD_ACTIVE_ARCH=NO | xcpretty -t -c 6 | xcodebuild test -project Verbena.xcodeproj -scheme VerbenaMac -sdk macosx BUILD_ACTIVE_ARCH=NO | xcpretty -t -c 7 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaishin/Verbena/2d7e7572727dab9e755a1fdc845249cc31afcc98/logo.png --------------------------------------------------------------------------------