├── LICENSE ├── README.md ├── V1 ├── Silo.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── josequintero.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── josequintero.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── Silo.xcscheme │ │ ├── SiloView.xcscheme │ │ └── xcschememanagement.plist ├── Silo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── SiloView.framework.zip ├── SiloView.framework │ ├── Headers │ │ ├── SiloView-Swift.h │ │ └── SiloView.h │ ├── Info.plist │ ├── Modules │ │ ├── SiloView.swiftmodule │ │ │ ├── arm.swiftdoc │ │ │ ├── arm.swiftmodule │ │ │ ├── arm64.swiftdoc │ │ │ └── arm64.swiftmodule │ │ └── module.modulemap │ ├── SiloView │ └── _CodeSignature │ │ └── CodeResources └── SiloView │ ├── Info.plist │ ├── Silo.swift │ └── SiloView.h └── V2 ├── SiloiOS.zip └── SiloiOS └── Silo.swift /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 josejuanqm 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 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Silo 2 | 3 | Silo is a extremely easy to use and very basic image loader for iOS built in Swift. 4 | 5 | if you use Silo in your project please let me know! 6 | 7 | ![alt tag](https://i.imgur.com/g7BimCx.gif) 8 | 9 | ### Version 10 | 2.0 11 | 12 | ### Installation 13 | 14 | Download from [here] [dld] 15 | - import the Swift Files 16 | 17 | Just drag and drop both Silo and SiloExt files. 18 | 19 | ### Usage 20 | 21 | ##### If you are using AutoLayout please call after the view appears or in ViewDidAppear method 22 | 23 | #### UIImageView from storyboard 24 | ```swift 25 | imageView.toSiloView(String) 26 | imageView.toSiloView(String, loaderColor: UIColor) 27 | 28 | //Set loader color after initialization 29 | imageView.setLoaderColorForSiloView(UIColor.redColor()) 30 | ``` 31 | 32 | #### Initialize a new UIImageView 33 | ```swift 34 | UIImageView(withUrl: String, frame: CGRect) 35 | UIImageView(withUrl: String, loaderColor: UIColor, frame: CGRect) 36 | ``` 37 | 38 | [//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax) 39 | 40 | 41 | [dld]: 42 | 43 | 44 | -------------------------------------------------------------------------------- /V1/Silo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 117BE6FF1C376A9B0016DFF2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 117BE6FE1C376A9B0016DFF2 /* AppDelegate.swift */; }; 11 | 117BE7011C376A9B0016DFF2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 117BE7001C376A9B0016DFF2 /* ViewController.swift */; }; 12 | 117BE7041C376A9B0016DFF2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 117BE7021C376A9B0016DFF2 /* Main.storyboard */; }; 13 | 117BE7061C376A9B0016DFF2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 117BE7051C376A9B0016DFF2 /* Assets.xcassets */; }; 14 | 117BE7091C376A9B0016DFF2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 117BE7071C376A9B0016DFF2 /* LaunchScreen.storyboard */; }; 15 | 117BE7181C377D100016DFF2 /* SiloView.h in Headers */ = {isa = PBXBuildFile; fileRef = 117BE7171C377D100016DFF2 /* SiloView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | 117BE71C1C377D100016DFF2 /* SiloView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 117BE7151C377D100016DFF2 /* SiloView.framework */; }; 17 | 117BE71D1C377D100016DFF2 /* SiloView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 117BE7151C377D100016DFF2 /* SiloView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 117BE7231C377D370016DFF2 /* Silo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 117BE7221C377D370016DFF2 /* Silo.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 117BE71A1C377D100016DFF2 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 117BE6F31C376A9B0016DFF2 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 117BE7141C377D100016DFF2; 27 | remoteInfo = SiloView; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXCopyFilesBuildPhase section */ 32 | 117BE7211C377D100016DFF2 /* Embed Frameworks */ = { 33 | isa = PBXCopyFilesBuildPhase; 34 | buildActionMask = 2147483647; 35 | dstPath = ""; 36 | dstSubfolderSpec = 10; 37 | files = ( 38 | 117BE71D1C377D100016DFF2 /* SiloView.framework in Embed Frameworks */, 39 | ); 40 | name = "Embed Frameworks"; 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | /* End PBXCopyFilesBuildPhase section */ 44 | 45 | /* Begin PBXFileReference section */ 46 | 117BE6FB1C376A9B0016DFF2 /* Silo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Silo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 117BE6FE1C376A9B0016DFF2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 48 | 117BE7001C376A9B0016DFF2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 49 | 117BE7031C376A9B0016DFF2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 50 | 117BE7051C376A9B0016DFF2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 51 | 117BE7081C376A9B0016DFF2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 52 | 117BE70A1C376A9B0016DFF2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | 117BE7151C377D100016DFF2 /* SiloView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SiloView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 117BE7171C377D100016DFF2 /* SiloView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SiloView.h; sourceTree = ""; }; 55 | 117BE7191C377D100016DFF2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | 117BE7221C377D370016DFF2 /* Silo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Silo.swift; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 117BE6F81C376A9B0016DFF2 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | 117BE71C1C377D100016DFF2 /* SiloView.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | 117BE7111C377D100016DFF2 /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | 117BE6F21C376A9B0016DFF2 = { 79 | isa = PBXGroup; 80 | children = ( 81 | 117BE6FD1C376A9B0016DFF2 /* Silo */, 82 | 117BE7161C377D100016DFF2 /* SiloView */, 83 | 117BE6FC1C376A9B0016DFF2 /* Products */, 84 | ); 85 | sourceTree = ""; 86 | }; 87 | 117BE6FC1C376A9B0016DFF2 /* Products */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 117BE6FB1C376A9B0016DFF2 /* Silo.app */, 91 | 117BE7151C377D100016DFF2 /* SiloView.framework */, 92 | ); 93 | name = Products; 94 | sourceTree = ""; 95 | }; 96 | 117BE6FD1C376A9B0016DFF2 /* Silo */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 117BE6FE1C376A9B0016DFF2 /* AppDelegate.swift */, 100 | 117BE7001C376A9B0016DFF2 /* ViewController.swift */, 101 | 117BE7021C376A9B0016DFF2 /* Main.storyboard */, 102 | 117BE7051C376A9B0016DFF2 /* Assets.xcassets */, 103 | 117BE7071C376A9B0016DFF2 /* LaunchScreen.storyboard */, 104 | 117BE70A1C376A9B0016DFF2 /* Info.plist */, 105 | ); 106 | path = Silo; 107 | sourceTree = ""; 108 | }; 109 | 117BE7161C377D100016DFF2 /* SiloView */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 117BE7171C377D100016DFF2 /* SiloView.h */, 113 | 117BE7191C377D100016DFF2 /* Info.plist */, 114 | 117BE7221C377D370016DFF2 /* Silo.swift */, 115 | ); 116 | path = SiloView; 117 | sourceTree = ""; 118 | }; 119 | /* End PBXGroup section */ 120 | 121 | /* Begin PBXHeadersBuildPhase section */ 122 | 117BE7121C377D100016DFF2 /* Headers */ = { 123 | isa = PBXHeadersBuildPhase; 124 | buildActionMask = 2147483647; 125 | files = ( 126 | 117BE7181C377D100016DFF2 /* SiloView.h in Headers */, 127 | ); 128 | runOnlyForDeploymentPostprocessing = 0; 129 | }; 130 | /* End PBXHeadersBuildPhase section */ 131 | 132 | /* Begin PBXNativeTarget section */ 133 | 117BE6FA1C376A9B0016DFF2 /* Silo */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = 117BE70D1C376A9B0016DFF2 /* Build configuration list for PBXNativeTarget "Silo" */; 136 | buildPhases = ( 137 | 117BE6F71C376A9B0016DFF2 /* Sources */, 138 | 117BE6F81C376A9B0016DFF2 /* Frameworks */, 139 | 117BE6F91C376A9B0016DFF2 /* Resources */, 140 | 117BE7211C377D100016DFF2 /* Embed Frameworks */, 141 | ); 142 | buildRules = ( 143 | ); 144 | dependencies = ( 145 | 117BE71B1C377D100016DFF2 /* PBXTargetDependency */, 146 | ); 147 | name = Silo; 148 | productName = Silo; 149 | productReference = 117BE6FB1C376A9B0016DFF2 /* Silo.app */; 150 | productType = "com.apple.product-type.application"; 151 | }; 152 | 117BE7141C377D100016DFF2 /* SiloView */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = 117BE71E1C377D100016DFF2 /* Build configuration list for PBXNativeTarget "SiloView" */; 155 | buildPhases = ( 156 | 117BE7101C377D100016DFF2 /* Sources */, 157 | 117BE7111C377D100016DFF2 /* Frameworks */, 158 | 117BE7121C377D100016DFF2 /* Headers */, 159 | 117BE7131C377D100016DFF2 /* Resources */, 160 | ); 161 | buildRules = ( 162 | ); 163 | dependencies = ( 164 | ); 165 | name = SiloView; 166 | productName = SiloView; 167 | productReference = 117BE7151C377D100016DFF2 /* SiloView.framework */; 168 | productType = "com.apple.product-type.framework"; 169 | }; 170 | /* End PBXNativeTarget section */ 171 | 172 | /* Begin PBXProject section */ 173 | 117BE6F31C376A9B0016DFF2 /* Project object */ = { 174 | isa = PBXProject; 175 | attributes = { 176 | LastSwiftUpdateCheck = 0720; 177 | LastUpgradeCheck = 0720; 178 | ORGANIZATIONNAME = Quintero; 179 | TargetAttributes = { 180 | 117BE6FA1C376A9B0016DFF2 = { 181 | CreatedOnToolsVersion = 7.2; 182 | }; 183 | 117BE7141C377D100016DFF2 = { 184 | CreatedOnToolsVersion = 7.2; 185 | }; 186 | }; 187 | }; 188 | buildConfigurationList = 117BE6F61C376A9B0016DFF2 /* Build configuration list for PBXProject "Silo" */; 189 | compatibilityVersion = "Xcode 3.2"; 190 | developmentRegion = English; 191 | hasScannedForEncodings = 0; 192 | knownRegions = ( 193 | en, 194 | Base, 195 | ); 196 | mainGroup = 117BE6F21C376A9B0016DFF2; 197 | productRefGroup = 117BE6FC1C376A9B0016DFF2 /* Products */; 198 | projectDirPath = ""; 199 | projectRoot = ""; 200 | targets = ( 201 | 117BE6FA1C376A9B0016DFF2 /* Silo */, 202 | 117BE7141C377D100016DFF2 /* SiloView */, 203 | ); 204 | }; 205 | /* End PBXProject section */ 206 | 207 | /* Begin PBXResourcesBuildPhase section */ 208 | 117BE6F91C376A9B0016DFF2 /* Resources */ = { 209 | isa = PBXResourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | 117BE7091C376A9B0016DFF2 /* LaunchScreen.storyboard in Resources */, 213 | 117BE7061C376A9B0016DFF2 /* Assets.xcassets in Resources */, 214 | 117BE7041C376A9B0016DFF2 /* Main.storyboard in Resources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | 117BE7131C377D100016DFF2 /* Resources */ = { 219 | isa = PBXResourcesBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | /* End PBXResourcesBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | 117BE6F71C376A9B0016DFF2 /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | 117BE7011C376A9B0016DFF2 /* ViewController.swift in Sources */, 233 | 117BE6FF1C376A9B0016DFF2 /* AppDelegate.swift in Sources */, 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | }; 237 | 117BE7101C377D100016DFF2 /* Sources */ = { 238 | isa = PBXSourcesBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | 117BE7231C377D370016DFF2 /* Silo.swift in Sources */, 242 | ); 243 | runOnlyForDeploymentPostprocessing = 0; 244 | }; 245 | /* End PBXSourcesBuildPhase section */ 246 | 247 | /* Begin PBXTargetDependency section */ 248 | 117BE71B1C377D100016DFF2 /* PBXTargetDependency */ = { 249 | isa = PBXTargetDependency; 250 | target = 117BE7141C377D100016DFF2 /* SiloView */; 251 | targetProxy = 117BE71A1C377D100016DFF2 /* PBXContainerItemProxy */; 252 | }; 253 | /* End PBXTargetDependency section */ 254 | 255 | /* Begin PBXVariantGroup section */ 256 | 117BE7021C376A9B0016DFF2 /* Main.storyboard */ = { 257 | isa = PBXVariantGroup; 258 | children = ( 259 | 117BE7031C376A9B0016DFF2 /* Base */, 260 | ); 261 | name = Main.storyboard; 262 | sourceTree = ""; 263 | }; 264 | 117BE7071C376A9B0016DFF2 /* LaunchScreen.storyboard */ = { 265 | isa = PBXVariantGroup; 266 | children = ( 267 | 117BE7081C376A9B0016DFF2 /* Base */, 268 | ); 269 | name = LaunchScreen.storyboard; 270 | sourceTree = ""; 271 | }; 272 | /* End PBXVariantGroup section */ 273 | 274 | /* Begin XCBuildConfiguration section */ 275 | 117BE70B1C376A9B0016DFF2 /* Debug */ = { 276 | isa = XCBuildConfiguration; 277 | buildSettings = { 278 | ALWAYS_SEARCH_USER_PATHS = NO; 279 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 280 | CLANG_CXX_LIBRARY = "libc++"; 281 | CLANG_ENABLE_MODULES = YES; 282 | CLANG_ENABLE_OBJC_ARC = YES; 283 | CLANG_WARN_BOOL_CONVERSION = YES; 284 | CLANG_WARN_CONSTANT_CONVERSION = YES; 285 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 286 | CLANG_WARN_EMPTY_BODY = YES; 287 | CLANG_WARN_ENUM_CONVERSION = YES; 288 | CLANG_WARN_INT_CONVERSION = YES; 289 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 290 | CLANG_WARN_UNREACHABLE_CODE = YES; 291 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 292 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 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 = gnu99; 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 = 9.2; 312 | MTL_ENABLE_DEBUG_INFO = YES; 313 | ONLY_ACTIVE_ARCH = YES; 314 | SDKROOT = iphoneos; 315 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 316 | }; 317 | name = Debug; 318 | }; 319 | 117BE70C1C376A9B0016DFF2 /* Release */ = { 320 | isa = XCBuildConfiguration; 321 | buildSettings = { 322 | ALWAYS_SEARCH_USER_PATHS = NO; 323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 324 | CLANG_CXX_LIBRARY = "libc++"; 325 | CLANG_ENABLE_MODULES = YES; 326 | CLANG_ENABLE_OBJC_ARC = YES; 327 | CLANG_WARN_BOOL_CONVERSION = YES; 328 | CLANG_WARN_CONSTANT_CONVERSION = YES; 329 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 330 | CLANG_WARN_EMPTY_BODY = YES; 331 | CLANG_WARN_ENUM_CONVERSION = YES; 332 | CLANG_WARN_INT_CONVERSION = YES; 333 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 334 | CLANG_WARN_UNREACHABLE_CODE = YES; 335 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 336 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 337 | COPY_PHASE_STRIP = NO; 338 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 339 | ENABLE_NS_ASSERTIONS = NO; 340 | ENABLE_STRICT_OBJC_MSGSEND = YES; 341 | GCC_C_LANGUAGE_STANDARD = gnu99; 342 | GCC_NO_COMMON_BLOCKS = YES; 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 350 | MTL_ENABLE_DEBUG_INFO = NO; 351 | SDKROOT = iphoneos; 352 | VALIDATE_PRODUCT = YES; 353 | }; 354 | name = Release; 355 | }; 356 | 117BE70E1C376A9B0016DFF2 /* Debug */ = { 357 | isa = XCBuildConfiguration; 358 | buildSettings = { 359 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 360 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; 361 | INFOPLIST_FILE = Silo/Info.plist; 362 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 363 | PRODUCT_BUNDLE_IDENTIFIER = io.quintero.Silo; 364 | PRODUCT_NAME = "$(TARGET_NAME)"; 365 | }; 366 | name = Debug; 367 | }; 368 | 117BE70F1C376A9B0016DFF2 /* Release */ = { 369 | isa = XCBuildConfiguration; 370 | buildSettings = { 371 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 372 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; 373 | INFOPLIST_FILE = Silo/Info.plist; 374 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 375 | PRODUCT_BUNDLE_IDENTIFIER = io.quintero.Silo; 376 | PRODUCT_NAME = "$(TARGET_NAME)"; 377 | }; 378 | name = Release; 379 | }; 380 | 117BE71F1C377D100016DFF2 /* Debug */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | CLANG_ENABLE_MODULES = YES; 384 | CURRENT_PROJECT_VERSION = 1; 385 | DEFINES_MODULE = YES; 386 | DYLIB_COMPATIBILITY_VERSION = 1; 387 | DYLIB_CURRENT_VERSION = 1; 388 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 389 | INFOPLIST_FILE = SiloView/Info.plist; 390 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 391 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 392 | PRODUCT_BUNDLE_IDENTIFIER = io.quintero.SiloView; 393 | PRODUCT_NAME = "$(TARGET_NAME)"; 394 | SKIP_INSTALL = YES; 395 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 396 | TARGETED_DEVICE_FAMILY = "1,2"; 397 | VERSIONING_SYSTEM = "apple-generic"; 398 | VERSION_INFO_PREFIX = ""; 399 | }; 400 | name = Debug; 401 | }; 402 | 117BE7201C377D100016DFF2 /* Release */ = { 403 | isa = XCBuildConfiguration; 404 | buildSettings = { 405 | CLANG_ENABLE_MODULES = YES; 406 | CURRENT_PROJECT_VERSION = 1; 407 | DEFINES_MODULE = YES; 408 | DYLIB_COMPATIBILITY_VERSION = 1; 409 | DYLIB_CURRENT_VERSION = 1; 410 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 411 | INFOPLIST_FILE = SiloView/Info.plist; 412 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 413 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 414 | PRODUCT_BUNDLE_IDENTIFIER = io.quintero.SiloView; 415 | PRODUCT_NAME = "$(TARGET_NAME)"; 416 | SKIP_INSTALL = YES; 417 | TARGETED_DEVICE_FAMILY = "1,2"; 418 | VERSIONING_SYSTEM = "apple-generic"; 419 | VERSION_INFO_PREFIX = ""; 420 | }; 421 | name = Release; 422 | }; 423 | /* End XCBuildConfiguration section */ 424 | 425 | /* Begin XCConfigurationList section */ 426 | 117BE6F61C376A9B0016DFF2 /* Build configuration list for PBXProject "Silo" */ = { 427 | isa = XCConfigurationList; 428 | buildConfigurations = ( 429 | 117BE70B1C376A9B0016DFF2 /* Debug */, 430 | 117BE70C1C376A9B0016DFF2 /* Release */, 431 | ); 432 | defaultConfigurationIsVisible = 0; 433 | defaultConfigurationName = Release; 434 | }; 435 | 117BE70D1C376A9B0016DFF2 /* Build configuration list for PBXNativeTarget "Silo" */ = { 436 | isa = XCConfigurationList; 437 | buildConfigurations = ( 438 | 117BE70E1C376A9B0016DFF2 /* Debug */, 439 | 117BE70F1C376A9B0016DFF2 /* Release */, 440 | ); 441 | defaultConfigurationIsVisible = 0; 442 | }; 443 | 117BE71E1C377D100016DFF2 /* Build configuration list for PBXNativeTarget "SiloView" */ = { 444 | isa = XCConfigurationList; 445 | buildConfigurations = ( 446 | 117BE71F1C377D100016DFF2 /* Debug */, 447 | 117BE7201C377D100016DFF2 /* Release */, 448 | ); 449 | defaultConfigurationIsVisible = 0; 450 | }; 451 | /* End XCConfigurationList section */ 452 | }; 453 | rootObject = 117BE6F31C376A9B0016DFF2 /* Project object */; 454 | } 455 | -------------------------------------------------------------------------------- /V1/Silo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /V1/Silo.xcodeproj/project.xcworkspace/xcuserdata/josequintero.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josejuanqm/Silo/0ab73b9d261b783a73420c7c18171a01419b92c8/V1/Silo.xcodeproj/project.xcworkspace/xcuserdata/josequintero.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /V1/Silo.xcodeproj/xcuserdata/josequintero.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /V1/Silo.xcodeproj/xcuserdata/josequintero.xcuserdatad/xcschemes/Silo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /V1/Silo.xcodeproj/xcuserdata/josequintero.xcuserdatad/xcschemes/SiloView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /V1/Silo.xcodeproj/xcuserdata/josequintero.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Silo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | SiloView.xcscheme 13 | 14 | orderHint 15 | 1 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 117BE6FA1C376A9B0016DFF2 21 | 22 | primary 23 | 24 | 25 | 117BE7141C377D100016DFF2 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /V1/Silo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Silo 4 | // 5 | // Created by Jose Quintero on 1/1/16. 6 | // Copyright © 2016 Quintero. 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: [NSObject: AnyObject]?) -> 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 | -------------------------------------------------------------------------------- /V1/Silo/Assets.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 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /V1/Silo/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 | 27 | 28 | -------------------------------------------------------------------------------- /V1/Silo/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 | -------------------------------------------------------------------------------- /V1/Silo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSAppTransportSecurity 6 | 7 | NSAllowsArbitraryLoads 8 | 9 | 10 | CFBundleDevelopmentRegion 11 | en 12 | CFBundleExecutable 13 | $(EXECUTABLE_NAME) 14 | CFBundleIdentifier 15 | $(PRODUCT_BUNDLE_IDENTIFIER) 16 | CFBundleInfoDictionaryVersion 17 | 6.0 18 | CFBundleName 19 | $(PRODUCT_NAME) 20 | CFBundlePackageType 21 | APPL 22 | CFBundleShortVersionString 23 | 1.0 24 | CFBundleSignature 25 | ???? 26 | CFBundleVersion 27 | 1 28 | LSRequiresIPhoneOS 29 | 30 | UILaunchStoryboardName 31 | LaunchScreen 32 | UIMainStoryboardFile 33 | Main 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /V1/Silo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Silo 4 | // 5 | // Created by Jose Quintero on 1/1/16. 6 | // Copyright © 2016 Quintero. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SiloView 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet var silo: SiloImageView! 15 | 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | // Do any additional setup after loading the view, typically from a nib. 20 | silo.imageContentMode = .ScaleAspectFit 21 | silo.loaderColor = UIColor.darkGrayColor() 22 | silo.fetchUrl("http://images.apple.com/v/ipad-pro/c/images/overview/canvas_large_2x.jpg") 23 | } 24 | 25 | override func didReceiveMemoryWarning() { 26 | super.didReceiveMemoryWarning() 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /V1/SiloView.framework.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josejuanqm/Silo/0ab73b9d261b783a73420c7c18171a01419b92c8/V1/SiloView.framework.zip -------------------------------------------------------------------------------- /V1/SiloView.framework/Headers/SiloView-Swift.h: -------------------------------------------------------------------------------- 1 | // Generated by Apple Swift version 2.1.1 (swiftlang-700.1.101.15 clang-700.1.81) 2 | #pragma clang diagnostic push 3 | 4 | #if defined(__has_include) && __has_include() 5 | # include 6 | #endif 7 | 8 | #pragma clang diagnostic ignored "-Wauto-import" 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #if defined(__has_include) && __has_include() 15 | # include 16 | #elif !defined(__cplusplus) || __cplusplus < 201103L 17 | typedef uint_least16_t char16_t; 18 | typedef uint_least32_t char32_t; 19 | #endif 20 | 21 | typedef struct _NSZone NSZone; 22 | 23 | #if !defined(SWIFT_PASTE) 24 | # define SWIFT_PASTE_HELPER(x, y) x##y 25 | # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) 26 | #endif 27 | #if !defined(SWIFT_METATYPE) 28 | # define SWIFT_METATYPE(X) Class 29 | #endif 30 | 31 | #if defined(__has_attribute) && __has_attribute(objc_runtime_name) 32 | # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) 33 | #else 34 | # define SWIFT_RUNTIME_NAME(X) 35 | #endif 36 | #if defined(__has_attribute) && __has_attribute(swift_name) 37 | # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) 38 | #else 39 | # define SWIFT_COMPILE_NAME(X) 40 | #endif 41 | #if !defined(SWIFT_CLASS_EXTRA) 42 | # define SWIFT_CLASS_EXTRA 43 | #endif 44 | #if !defined(SWIFT_PROTOCOL_EXTRA) 45 | # define SWIFT_PROTOCOL_EXTRA 46 | #endif 47 | #if !defined(SWIFT_ENUM_EXTRA) 48 | # define SWIFT_ENUM_EXTRA 49 | #endif 50 | #if !defined(SWIFT_CLASS) 51 | # if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted) 52 | # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA 53 | # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA 54 | # else 55 | # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA 56 | # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA 57 | # endif 58 | #endif 59 | 60 | #if !defined(SWIFT_PROTOCOL) 61 | # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA 62 | # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA 63 | #endif 64 | 65 | #if !defined(SWIFT_EXTENSION) 66 | # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) 67 | #endif 68 | 69 | #if !defined(OBJC_DESIGNATED_INITIALIZER) 70 | # if defined(__has_attribute) && __has_attribute(objc_designated_initializer) 71 | # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) 72 | # else 73 | # define OBJC_DESIGNATED_INITIALIZER 74 | # endif 75 | #endif 76 | #if !defined(SWIFT_ENUM) 77 | # define SWIFT_ENUM(_type, _name) enum _name : _type _name; enum SWIFT_ENUM_EXTRA _name : _type 78 | #endif 79 | typedef float swift_float2 __attribute__((__ext_vector_type__(2))); 80 | typedef float swift_float3 __attribute__((__ext_vector_type__(3))); 81 | typedef float swift_float4 __attribute__((__ext_vector_type__(4))); 82 | typedef double swift_double2 __attribute__((__ext_vector_type__(2))); 83 | typedef double swift_double3 __attribute__((__ext_vector_type__(3))); 84 | typedef double swift_double4 __attribute__((__ext_vector_type__(4))); 85 | typedef int swift_int2 __attribute__((__ext_vector_type__(2))); 86 | typedef int swift_int3 __attribute__((__ext_vector_type__(3))); 87 | typedef int swift_int4 __attribute__((__ext_vector_type__(4))); 88 | #if defined(__has_feature) && __has_feature(modules) 89 | @import UIKit; 90 | @import Foundation.NSURLSession; 91 | @import CoreGraphics; 92 | #endif 93 | 94 | #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" 95 | #pragma clang diagnostic ignored "-Wduplicate-method-arg" 96 | @class UIColor; 97 | @class NSCoder; 98 | 99 | SWIFT_CLASS("_TtC8SiloView13SiloImageView") 100 | @interface SiloImageView : UIView 101 | @property (nonatomic, strong) UIColor * __null_unspecified loaderColor; 102 | @property (nonatomic) UIViewContentMode imageContentMode; 103 | - (void)drawRect:(CGRect)rect; 104 | - (void)fetchUrl:(NSString * __nonnull)url; 105 | - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; 106 | - (nullable instancetype)initWithCoder:(NSCoder * __nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; 107 | @end 108 | 109 | 110 | @interface SiloImageView (SWIFT_EXTENSION(SiloView)) 111 | @end 112 | 113 | #pragma clang diagnostic pop 114 | -------------------------------------------------------------------------------- /V1/SiloView.framework/Headers/SiloView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SiloView.h 3 | // SiloView 4 | // 5 | // Created by Jose Quintero on 1/1/16. 6 | // Copyright © 2016 Quintero. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for SiloView. 12 | FOUNDATION_EXPORT double SiloViewVersionNumber; 13 | 14 | //! Project version string for SiloView. 15 | FOUNDATION_EXPORT const unsigned char SiloViewVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /V1/SiloView.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josejuanqm/Silo/0ab73b9d261b783a73420c7c18171a01419b92c8/V1/SiloView.framework/Info.plist -------------------------------------------------------------------------------- /V1/SiloView.framework/Modules/SiloView.swiftmodule/arm.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josejuanqm/Silo/0ab73b9d261b783a73420c7c18171a01419b92c8/V1/SiloView.framework/Modules/SiloView.swiftmodule/arm.swiftdoc -------------------------------------------------------------------------------- /V1/SiloView.framework/Modules/SiloView.swiftmodule/arm.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josejuanqm/Silo/0ab73b9d261b783a73420c7c18171a01419b92c8/V1/SiloView.framework/Modules/SiloView.swiftmodule/arm.swiftmodule -------------------------------------------------------------------------------- /V1/SiloView.framework/Modules/SiloView.swiftmodule/arm64.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josejuanqm/Silo/0ab73b9d261b783a73420c7c18171a01419b92c8/V1/SiloView.framework/Modules/SiloView.swiftmodule/arm64.swiftdoc -------------------------------------------------------------------------------- /V1/SiloView.framework/Modules/SiloView.swiftmodule/arm64.swiftmodule: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josejuanqm/Silo/0ab73b9d261b783a73420c7c18171a01419b92c8/V1/SiloView.framework/Modules/SiloView.swiftmodule/arm64.swiftmodule -------------------------------------------------------------------------------- /V1/SiloView.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module SiloView { 2 | umbrella header "SiloView.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | 8 | module SiloView.Swift { 9 | header "SiloView-Swift.h" 10 | } 11 | -------------------------------------------------------------------------------- /V1/SiloView.framework/SiloView: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josejuanqm/Silo/0ab73b9d261b783a73420c7c18171a01419b92c8/V1/SiloView.framework/SiloView -------------------------------------------------------------------------------- /V1/SiloView.framework/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Headers/SiloView-Swift.h 8 | 9 | IwWNwYhNnW4ndsx51Dkt/vUSqL4= 10 | 11 | Headers/SiloView.h 12 | 13 | t1rVz8EoZgA2rNCbI4WlXvEclz4= 14 | 15 | Info.plist 16 | 17 | kxJQ9V4hn+0KWVd+GdPvVV19KaE= 18 | 19 | Modules/SiloView.swiftmodule/arm.swiftdoc 20 | 21 | XkT9KqxR6udopcO6TbFb34HVGls= 22 | 23 | Modules/SiloView.swiftmodule/arm.swiftmodule 24 | 25 | ynBsMEGIiaGfzmevBxvHtoUXuF4= 26 | 27 | Modules/SiloView.swiftmodule/arm64.swiftdoc 28 | 29 | mVYSmr27lV4RyleQ2hjhTOfUVpg= 30 | 31 | Modules/SiloView.swiftmodule/arm64.swiftmodule 32 | 33 | YfQEbfi+W3yYigZhgGDIih33H0Q= 34 | 35 | Modules/module.modulemap 36 | 37 | Ql4kTlBW7Kd3OdFFHsmHknMEORo= 38 | 39 | 40 | files2 41 | 42 | Headers/SiloView-Swift.h 43 | 44 | IwWNwYhNnW4ndsx51Dkt/vUSqL4= 45 | 46 | Headers/SiloView.h 47 | 48 | t1rVz8EoZgA2rNCbI4WlXvEclz4= 49 | 50 | Modules/SiloView.swiftmodule/arm.swiftdoc 51 | 52 | XkT9KqxR6udopcO6TbFb34HVGls= 53 | 54 | Modules/SiloView.swiftmodule/arm.swiftmodule 55 | 56 | ynBsMEGIiaGfzmevBxvHtoUXuF4= 57 | 58 | Modules/SiloView.swiftmodule/arm64.swiftdoc 59 | 60 | mVYSmr27lV4RyleQ2hjhTOfUVpg= 61 | 62 | Modules/SiloView.swiftmodule/arm64.swiftmodule 63 | 64 | YfQEbfi+W3yYigZhgGDIih33H0Q= 65 | 66 | Modules/module.modulemap 67 | 68 | Ql4kTlBW7Kd3OdFFHsmHknMEORo= 69 | 70 | 71 | rules 72 | 73 | ^ 74 | 75 | ^.*\.lproj/ 76 | 77 | optional 78 | 79 | weight 80 | 1000 81 | 82 | ^.*\.lproj/locversion.plist$ 83 | 84 | omit 85 | 86 | weight 87 | 1100 88 | 89 | ^version.plist$ 90 | 91 | 92 | rules2 93 | 94 | .*\.dSYM($|/) 95 | 96 | weight 97 | 11 98 | 99 | ^ 100 | 101 | weight 102 | 20 103 | 104 | ^(.*/)?\.DS_Store$ 105 | 106 | omit 107 | 108 | weight 109 | 2000 110 | 111 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 112 | 113 | nested 114 | 115 | weight 116 | 10 117 | 118 | ^.* 119 | 120 | ^.*\.lproj/ 121 | 122 | optional 123 | 124 | weight 125 | 1000 126 | 127 | ^.*\.lproj/locversion.plist$ 128 | 129 | omit 130 | 131 | weight 132 | 1100 133 | 134 | ^Info\.plist$ 135 | 136 | omit 137 | 138 | weight 139 | 20 140 | 141 | ^PkgInfo$ 142 | 143 | omit 144 | 145 | weight 146 | 20 147 | 148 | ^[^/]+$ 149 | 150 | nested 151 | 152 | weight 153 | 10 154 | 155 | ^embedded\.provisionprofile$ 156 | 157 | weight 158 | 20 159 | 160 | ^version\.plist$ 161 | 162 | weight 163 | 20 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /V1/SiloView/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 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /V1/SiloView/Silo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Silo.swift 3 | // Silo 4 | // 5 | // Created by Jose Quintero on 1/1/16. 6 | // Copyright © 2016 Quintero. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | public class SiloImageView: UIView, NSURLSessionDelegate{ 13 | 14 | private var imageView: UIImageView! 15 | private var progress: Float! = 0 16 | private var runned = true 17 | private var url: String! 18 | public var loaderColor: UIColor! = UIColor.blackColor() 19 | public var imageContentMode: UIViewContentMode = UIViewContentMode.ScaleAspectFill 20 | 21 | private var downloadTask: NSURLSessionDownloadTask? 22 | 23 | override public func drawRect(rect: CGRect) { 24 | self.imageView = UIImageView(frame: self.bounds) 25 | self.imageView.contentMode = imageContentMode 26 | drawProgressLoader(frame: CGRectMake(((self.bounds.width / 2) - 20), ((self.bounds.height / 2) - 20), 40, 40), shapeColor: self.loaderColor, progressFraction: CGFloat(self.progress)) 27 | if runned == false{ 28 | createDownloadTask(url) 29 | runned = true 30 | } 31 | } 32 | 33 | public func fetchUrl(url:String){ 34 | self.url = url 35 | runned = false 36 | self.setNeedsDisplay() 37 | } 38 | 39 | func createDownloadTask(url: String) { 40 | let downloadRequest = NSMutableURLRequest(URL: NSURL(string: url)!) 41 | let session = NSURLSession(configuration: NSURLSessionConfiguration.defaultSessionConfiguration(), delegate: self, delegateQueue: NSOperationQueue.mainQueue()) 42 | 43 | downloadTask = session.downloadTaskWithRequest(downloadRequest) 44 | downloadTask!.resume() 45 | } 46 | 47 | func URLSession(session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64) { 48 | let progress = Float(totalBytesWritten) / Float(totalBytesExpectedToWrite) 49 | self.progress = progress 50 | self.setNeedsDisplay() 51 | } 52 | 53 | func URLSession(session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didFinishDownloadingToURL location: NSURL) { 54 | if self.progress == 1 { 55 | let img = UIImage(data: NSData(contentsOfURL: location)!) 56 | self.imageView.image = img 57 | self.imageView.clipsToBounds = false 58 | self.imageView.backgroundColor = UIColor.blackColor() 59 | self.addSubview(self.imageView) 60 | self.backgroundColor = UIColor.whiteColor() 61 | } 62 | } 63 | 64 | func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { 65 | if error != nil{ 66 | print("fail") 67 | } 68 | } 69 | } 70 | 71 | extension SiloImageView{ 72 | func drawProgressLoader(frame frame: CGRect = CGRectMake(0, 0, 200, 200), shapeColor: UIColor = UIColor(red: 0.000, green: 0.000, blue: 0.000, alpha: 1.000), progressFraction: CGFloat = 0) { 73 | 74 | //// Variable Declarations 75 | let expression: CGFloat = progressFraction != 0 ? progressFraction * -360 : 1 76 | 77 | //// Oval Drawing 78 | let ovalPath = UIBezierPath(ovalInRect: CGRectMake(frame.minX + floor(frame.width * 0.05500 + 0.5), frame.minY + floor(frame.height * 0.05000 + 0.5), floor(frame.width * 0.95000 + 0.5) - floor(frame.width * 0.05500 + 0.5), floor(frame.height * 0.94500 + 0.5) - floor(frame.height * 0.05000 + 0.5))) 79 | shapeColor.setStroke() 80 | ovalPath.lineWidth = 5 81 | ovalPath.stroke() 82 | 83 | 84 | //// Oval 2 Drawing 85 | let oval2Rect = CGRectMake(frame.minX + floor(frame.width * 0.10500 + 0.5), frame.minY + floor(frame.height * 0.10000 + 0.5), floor(frame.width * 0.90000 + 0.5) - floor(frame.width * 0.10500 + 0.5), floor(frame.height * 0.89500 + 0.5) - floor(frame.height * 0.10000 + 0.5)) 86 | let oval2Path = UIBezierPath() 87 | oval2Path.addArcWithCenter(CGPointMake(oval2Rect.midX, oval2Rect.midY), radius: oval2Rect.width / 2, startAngle: -1 * CGFloat(M_PI)/180, endAngle: -expression * CGFloat(M_PI)/180, clockwise: true) 88 | oval2Path.addLineToPoint(CGPointMake(oval2Rect.midX, oval2Rect.midY)) 89 | oval2Path.closePath() 90 | 91 | shapeColor.setFill() 92 | oval2Path.fill() 93 | } 94 | } -------------------------------------------------------------------------------- /V1/SiloView/SiloView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SiloView.h 3 | // SiloView 4 | // 5 | // Created by Jose Quintero on 1/1/16. 6 | // Copyright © 2016 Quintero. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for SiloView. 12 | FOUNDATION_EXPORT double SiloViewVersionNumber; 13 | 14 | //! Project version string for SiloView. 15 | FOUNDATION_EXPORT const unsigned char SiloViewVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /V2/SiloiOS.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josejuanqm/Silo/0ab73b9d261b783a73420c7c18171a01419b92c8/V2/SiloiOS.zip -------------------------------------------------------------------------------- /V2/SiloiOS/Silo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Silo.swift 3 | // Silo 4 | // 5 | // Created by Jose Quintero on 1/2/16. 6 | // Copyright © 2016 Quintero. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension UIImageView{ 13 | 14 | convenience init(withUrl: String, loaderColor: UIColor, frame: CGRect){ 15 | self.init(frame: frame) 16 | self.toSiloView(withUrl, loaderColor: loaderColor) 17 | } 18 | 19 | convenience init(withUrl: String, frame: CGRect){ 20 | self.init(frame: frame) 21 | self.toSiloView(withUrl) 22 | } 23 | 24 | func setLoaderColorForSiloView(color: UIColor) -> Bool{ 25 | for i in 0.. 1{ 122 | progressInternal = 0 123 | } 124 | } 125 | self.progress = progressInternal 126 | self.setNeedsDisplay() 127 | } 128 | 129 | func URLSession(session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didFinishDownloadingToURL location: NSURL) { 130 | self.alpha = 0 131 | let img = UIImage(data: NSData(contentsOfURL: location)!) 132 | print(parent) 133 | self.parent.image = img 134 | } 135 | 136 | func URLSession(session: NSURLSession, task: NSURLSessionTask, didCompleteWithError error: NSError?) { 137 | if error != nil{ 138 | print("fail") 139 | } 140 | } 141 | } 142 | 143 | extension SiloView{ 144 | 145 | func drawProgressLoader(frame frame: CGRect = CGRectMake(0, 0, 200, 200), shapeColor: UIColor = UIColor(red: 0.000, green: 0.000, blue: 0.000, alpha: 1.000), progressFraction: CGFloat = 0.793) { 146 | 147 | //// Variable Declarations 148 | let expression: CGFloat = progressFraction != 0 ? progressFraction * -360 : 1 149 | 150 | 151 | //// Subframes 152 | let group: CGRect = CGRectMake(frame.minX + floor((frame.width - 22) * 0.50000 + 0.5), frame.minY + floor((frame.height - 22) * 0.50000 + 0.5), 22, 22) 153 | 154 | 155 | //// Group 156 | //// Oval Drawing 157 | let ovalPath = UIBezierPath(ovalInRect: CGRectMake(group.minX, group.minY, 22, 22)) 158 | shapeColor.setStroke() 159 | ovalPath.lineWidth = 2.5 160 | ovalPath.stroke() 161 | 162 | 163 | //// Oval 2 Drawing 164 | let oval2Rect = CGRectMake(group.minX + 1, group.minY + 1, 20, 20) 165 | let oval2Path = UIBezierPath() 166 | oval2Path.addArcWithCenter(CGPointMake(oval2Rect.midX, oval2Rect.midY), radius: oval2Rect.width / 2, startAngle: -1 * CGFloat(M_PI)/180, endAngle: -expression * CGFloat(M_PI)/180, clockwise: true) 167 | oval2Path.addLineToPoint(CGPointMake(oval2Rect.midX, oval2Rect.midY)) 168 | oval2Path.closePath() 169 | 170 | shapeColor.setFill() 171 | oval2Path.fill() 172 | } 173 | 174 | } --------------------------------------------------------------------------------