├── .gitignore ├── Hola.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── Hola ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── image1.imageset │ │ ├── Contents.json │ │ └── image1.jpg │ ├── image2.imageset │ │ ├── Contents.json │ │ └── image2.jpg │ └── image3.imageset │ │ ├── Contents.json │ │ └── image3.jpg ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Hola.swift ├── Info.plist └── ViewController.swift ├── HolaExample ├── HolaExample.xcodeproj │ └── project.pbxproj └── HolaExample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── image1.imageset │ │ ├── Contents.json │ │ └── image1.jpg │ ├── image2.imageset │ │ ├── Contents.json │ │ └── image2.jpg │ └── image3.imageset │ │ ├── Contents.json │ │ └── image3.jpg │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Hola.swift │ ├── Info.plist │ ├── SceneDelegate.swift │ └── ViewController.swift ├── LICENSE ├── README.md └── gif ├── gifVertical.gif ├── horizontalGif.gif ├── viewgifhorizontal.gif └── viewgifvertical.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | Hola.xcodeproj/ 20 | *xcworkspace/ 21 | *xcworkspace/xcuserdata/* 22 | 23 | ## Other 24 | *.moved-aside 25 | *.xccheckout 26 | *.xcscmblueprint 27 | 28 | ## Obj-C/Swift specific 29 | *.hmap 30 | *.ipa 31 | *.dSYM.zip 32 | *.dSYM 33 | 34 | ## Playgrounds 35 | timeline.xctimeline 36 | playground.xcworkspace 37 | 38 | # Swift Package Manager 39 | # 40 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 41 | # Packages/ 42 | # Package.pins 43 | # Package.resolved 44 | .build/ 45 | 46 | # CocoaPods 47 | # 48 | # We recommend against adding the Pods directory to your .gitignore. However 49 | # you should judge for yourself, the pros and cons are mentioned at: 50 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 51 | # 52 | # Pods/ 53 | 54 | # Carthage 55 | # 56 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 57 | # Carthage/Checkouts 58 | 59 | Carthage/Build 60 | 61 | # fastlane 62 | # 63 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 64 | # screenshots whenever they are needed. 65 | # For more information about the recommended setup visit: 66 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 67 | 68 | fastlane/report.xml 69 | fastlane/Preview.html 70 | fastlane/screenshots 71 | fastlane/test_output 72 | -------------------------------------------------------------------------------- /Hola.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | AAA997381FB7C40300B129AC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAA997371FB7C40300B129AC /* AppDelegate.swift */; }; 11 | AAA9973A1FB7C40300B129AC /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAA997391FB7C40300B129AC /* ViewController.swift */; }; 12 | AAA9973D1FB7C40300B129AC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AAA9973B1FB7C40300B129AC /* Main.storyboard */; }; 13 | AAA9973F1FB7C40300B129AC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AAA9973E1FB7C40300B129AC /* Assets.xcassets */; }; 14 | AAA997421FB7C40300B129AC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AAA997401FB7C40300B129AC /* LaunchScreen.storyboard */; }; 15 | AAA9974A1FB7CA3C00B129AC /* Hola.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAA997491FB7CA3C00B129AC /* Hola.swift */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | AAA997341FB7C40300B129AC /* Hola.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Hola.app; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | AAA997371FB7C40300B129AC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 21 | AAA997391FB7C40300B129AC /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 22 | AAA9973C1FB7C40300B129AC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 23 | AAA9973E1FB7C40300B129AC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 24 | AAA997411FB7C40300B129AC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 25 | AAA997431FB7C40300B129AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 26 | AAA997491FB7CA3C00B129AC /* Hola.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Hola.swift; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | AAA997311FB7C40300B129AC /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | ); 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXFrameworksBuildPhase section */ 38 | 39 | /* Begin PBXGroup section */ 40 | AAA9972B1FB7C40200B129AC = { 41 | isa = PBXGroup; 42 | children = ( 43 | AAA997361FB7C40300B129AC /* Hola */, 44 | AAA997351FB7C40300B129AC /* Products */, 45 | ); 46 | sourceTree = ""; 47 | }; 48 | AAA997351FB7C40300B129AC /* Products */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | AAA997341FB7C40300B129AC /* Hola.app */, 52 | ); 53 | name = Products; 54 | sourceTree = ""; 55 | }; 56 | AAA997361FB7C40300B129AC /* Hola */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | AAA997371FB7C40300B129AC /* AppDelegate.swift */, 60 | AAA997391FB7C40300B129AC /* ViewController.swift */, 61 | AAA9973B1FB7C40300B129AC /* Main.storyboard */, 62 | AAA9973E1FB7C40300B129AC /* Assets.xcassets */, 63 | AAA997401FB7C40300B129AC /* LaunchScreen.storyboard */, 64 | AAA997431FB7C40300B129AC /* Info.plist */, 65 | AAA997491FB7CA3C00B129AC /* Hola.swift */, 66 | ); 67 | path = Hola; 68 | sourceTree = ""; 69 | }; 70 | /* End PBXGroup section */ 71 | 72 | /* Begin PBXNativeTarget section */ 73 | AAA997331FB7C40300B129AC /* Hola */ = { 74 | isa = PBXNativeTarget; 75 | buildConfigurationList = AAA997461FB7C40300B129AC /* Build configuration list for PBXNativeTarget "Hola" */; 76 | buildPhases = ( 77 | AAA997301FB7C40300B129AC /* Sources */, 78 | AAA997311FB7C40300B129AC /* Frameworks */, 79 | AAA997321FB7C40300B129AC /* Resources */, 80 | ); 81 | buildRules = ( 82 | ); 83 | dependencies = ( 84 | ); 85 | name = Hola; 86 | productName = Hola; 87 | productReference = AAA997341FB7C40300B129AC /* Hola.app */; 88 | productType = "com.apple.product-type.application"; 89 | }; 90 | /* End PBXNativeTarget section */ 91 | 92 | /* Begin PBXProject section */ 93 | AAA9972C1FB7C40200B129AC /* Project object */ = { 94 | isa = PBXProject; 95 | attributes = { 96 | LastSwiftUpdateCheck = 0910; 97 | LastUpgradeCheck = 0910; 98 | ORGANIZATIONNAME = EmrahKorkmaz; 99 | TargetAttributes = { 100 | AAA997331FB7C40300B129AC = { 101 | CreatedOnToolsVersion = 9.1; 102 | ProvisioningStyle = Automatic; 103 | }; 104 | }; 105 | }; 106 | buildConfigurationList = AAA9972F1FB7C40200B129AC /* Build configuration list for PBXProject "Hola" */; 107 | compatibilityVersion = "Xcode 8.0"; 108 | developmentRegion = en; 109 | hasScannedForEncodings = 0; 110 | knownRegions = ( 111 | en, 112 | Base, 113 | ); 114 | mainGroup = AAA9972B1FB7C40200B129AC; 115 | productRefGroup = AAA997351FB7C40300B129AC /* Products */; 116 | projectDirPath = ""; 117 | projectRoot = ""; 118 | targets = ( 119 | AAA997331FB7C40300B129AC /* Hola */, 120 | ); 121 | }; 122 | /* End PBXProject section */ 123 | 124 | /* Begin PBXResourcesBuildPhase section */ 125 | AAA997321FB7C40300B129AC /* Resources */ = { 126 | isa = PBXResourcesBuildPhase; 127 | buildActionMask = 2147483647; 128 | files = ( 129 | AAA997421FB7C40300B129AC /* LaunchScreen.storyboard in Resources */, 130 | AAA9973F1FB7C40300B129AC /* Assets.xcassets in Resources */, 131 | AAA9973D1FB7C40300B129AC /* Main.storyboard in Resources */, 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXResourcesBuildPhase section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | AAA997301FB7C40300B129AC /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | AAA9973A1FB7C40300B129AC /* ViewController.swift in Sources */, 143 | AAA9974A1FB7CA3C00B129AC /* Hola.swift in Sources */, 144 | AAA997381FB7C40300B129AC /* AppDelegate.swift in Sources */, 145 | ); 146 | runOnlyForDeploymentPostprocessing = 0; 147 | }; 148 | /* End PBXSourcesBuildPhase section */ 149 | 150 | /* Begin PBXVariantGroup section */ 151 | AAA9973B1FB7C40300B129AC /* Main.storyboard */ = { 152 | isa = PBXVariantGroup; 153 | children = ( 154 | AAA9973C1FB7C40300B129AC /* Base */, 155 | ); 156 | name = Main.storyboard; 157 | sourceTree = ""; 158 | }; 159 | AAA997401FB7C40300B129AC /* LaunchScreen.storyboard */ = { 160 | isa = PBXVariantGroup; 161 | children = ( 162 | AAA997411FB7C40300B129AC /* Base */, 163 | ); 164 | name = LaunchScreen.storyboard; 165 | sourceTree = ""; 166 | }; 167 | /* End PBXVariantGroup section */ 168 | 169 | /* Begin XCBuildConfiguration section */ 170 | AAA997441FB7C40300B129AC /* Debug */ = { 171 | isa = XCBuildConfiguration; 172 | buildSettings = { 173 | ALWAYS_SEARCH_USER_PATHS = NO; 174 | CLANG_ANALYZER_NONNULL = YES; 175 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 176 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 177 | CLANG_CXX_LIBRARY = "libc++"; 178 | CLANG_ENABLE_MODULES = YES; 179 | CLANG_ENABLE_OBJC_ARC = YES; 180 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 181 | CLANG_WARN_BOOL_CONVERSION = YES; 182 | CLANG_WARN_COMMA = YES; 183 | CLANG_WARN_CONSTANT_CONVERSION = YES; 184 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 185 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 186 | CLANG_WARN_EMPTY_BODY = YES; 187 | CLANG_WARN_ENUM_CONVERSION = YES; 188 | CLANG_WARN_INFINITE_RECURSION = YES; 189 | CLANG_WARN_INT_CONVERSION = YES; 190 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 191 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 192 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 193 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 194 | CLANG_WARN_STRICT_PROTOTYPES = YES; 195 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 196 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 197 | CLANG_WARN_UNREACHABLE_CODE = YES; 198 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 199 | CODE_SIGN_IDENTITY = "iPhone Developer"; 200 | COPY_PHASE_STRIP = NO; 201 | DEBUG_INFORMATION_FORMAT = dwarf; 202 | ENABLE_STRICT_OBJC_MSGSEND = YES; 203 | ENABLE_TESTABILITY = YES; 204 | GCC_C_LANGUAGE_STANDARD = gnu11; 205 | GCC_DYNAMIC_NO_PIC = NO; 206 | GCC_NO_COMMON_BLOCKS = YES; 207 | GCC_OPTIMIZATION_LEVEL = 0; 208 | GCC_PREPROCESSOR_DEFINITIONS = ( 209 | "DEBUG=1", 210 | "$(inherited)", 211 | ); 212 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 213 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 214 | GCC_WARN_UNDECLARED_SELECTOR = YES; 215 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 216 | GCC_WARN_UNUSED_FUNCTION = YES; 217 | GCC_WARN_UNUSED_VARIABLE = YES; 218 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 219 | MTL_ENABLE_DEBUG_INFO = YES; 220 | ONLY_ACTIVE_ARCH = YES; 221 | SDKROOT = iphoneos; 222 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 223 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 224 | }; 225 | name = Debug; 226 | }; 227 | AAA997451FB7C40300B129AC /* Release */ = { 228 | isa = XCBuildConfiguration; 229 | buildSettings = { 230 | ALWAYS_SEARCH_USER_PATHS = NO; 231 | CLANG_ANALYZER_NONNULL = YES; 232 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 233 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 234 | CLANG_CXX_LIBRARY = "libc++"; 235 | CLANG_ENABLE_MODULES = YES; 236 | CLANG_ENABLE_OBJC_ARC = YES; 237 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 238 | CLANG_WARN_BOOL_CONVERSION = YES; 239 | CLANG_WARN_COMMA = YES; 240 | CLANG_WARN_CONSTANT_CONVERSION = YES; 241 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 242 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 243 | CLANG_WARN_EMPTY_BODY = YES; 244 | CLANG_WARN_ENUM_CONVERSION = YES; 245 | CLANG_WARN_INFINITE_RECURSION = YES; 246 | CLANG_WARN_INT_CONVERSION = YES; 247 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 248 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 249 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 250 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 251 | CLANG_WARN_STRICT_PROTOTYPES = YES; 252 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 253 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 254 | CLANG_WARN_UNREACHABLE_CODE = YES; 255 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 256 | CODE_SIGN_IDENTITY = "iPhone Developer"; 257 | COPY_PHASE_STRIP = NO; 258 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 259 | ENABLE_NS_ASSERTIONS = NO; 260 | ENABLE_STRICT_OBJC_MSGSEND = YES; 261 | GCC_C_LANGUAGE_STANDARD = gnu11; 262 | GCC_NO_COMMON_BLOCKS = YES; 263 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 264 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 265 | GCC_WARN_UNDECLARED_SELECTOR = YES; 266 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 267 | GCC_WARN_UNUSED_FUNCTION = YES; 268 | GCC_WARN_UNUSED_VARIABLE = YES; 269 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 270 | MTL_ENABLE_DEBUG_INFO = NO; 271 | SDKROOT = iphoneos; 272 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 273 | VALIDATE_PRODUCT = YES; 274 | }; 275 | name = Release; 276 | }; 277 | AAA997471FB7C40300B129AC /* Debug */ = { 278 | isa = XCBuildConfiguration; 279 | buildSettings = { 280 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 281 | CODE_SIGN_STYLE = Automatic; 282 | INFOPLIST_FILE = Hola/Info.plist; 283 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 284 | PRODUCT_BUNDLE_IDENTIFIER = com.emrah.Hola; 285 | PRODUCT_NAME = "$(TARGET_NAME)"; 286 | SWIFT_VERSION = 4.0; 287 | TARGETED_DEVICE_FAMILY = "1,2"; 288 | }; 289 | name = Debug; 290 | }; 291 | AAA997481FB7C40300B129AC /* Release */ = { 292 | isa = XCBuildConfiguration; 293 | buildSettings = { 294 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 295 | CODE_SIGN_STYLE = Automatic; 296 | INFOPLIST_FILE = Hola/Info.plist; 297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 298 | PRODUCT_BUNDLE_IDENTIFIER = com.emrah.Hola; 299 | PRODUCT_NAME = "$(TARGET_NAME)"; 300 | SWIFT_VERSION = 4.0; 301 | TARGETED_DEVICE_FAMILY = "1,2"; 302 | }; 303 | name = Release; 304 | }; 305 | /* End XCBuildConfiguration section */ 306 | 307 | /* Begin XCConfigurationList section */ 308 | AAA9972F1FB7C40200B129AC /* Build configuration list for PBXProject "Hola" */ = { 309 | isa = XCConfigurationList; 310 | buildConfigurations = ( 311 | AAA997441FB7C40300B129AC /* Debug */, 312 | AAA997451FB7C40300B129AC /* Release */, 313 | ); 314 | defaultConfigurationIsVisible = 0; 315 | defaultConfigurationName = Release; 316 | }; 317 | AAA997461FB7C40300B129AC /* Build configuration list for PBXNativeTarget "Hola" */ = { 318 | isa = XCConfigurationList; 319 | buildConfigurations = ( 320 | AAA997471FB7C40300B129AC /* Debug */, 321 | AAA997481FB7C40300B129AC /* Release */, 322 | ); 323 | defaultConfigurationIsVisible = 0; 324 | defaultConfigurationName = Release; 325 | }; 326 | /* End XCConfigurationList section */ 327 | }; 328 | rootObject = AAA9972C1FB7C40200B129AC /* Project object */; 329 | } 330 | -------------------------------------------------------------------------------- /Hola.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Hola/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Hola 4 | // 5 | // Created by xcodewarrior on 12.11.2017. 6 | // Copyright © 2017 EmrahKorkmaz. 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: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | 20 | window = UIWindow(frame: UIScreen.main.bounds) 21 | window?.makeKeyAndVisible() 22 | window?.rootViewController = ViewController() 23 | 24 | 25 | 26 | return true 27 | } 28 | 29 | func applicationWillResignActive(_ application: UIApplication) { 30 | // 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. 31 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 32 | } 33 | 34 | func applicationDidEnterBackground(_ application: UIApplication) { 35 | // 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. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | func applicationWillEnterForeground(_ application: UIApplication) { 40 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 41 | } 42 | 43 | func applicationDidBecomeActive(_ application: UIApplication) { 44 | // 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. 45 | } 46 | 47 | func applicationWillTerminate(_ application: UIApplication) { 48 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 49 | } 50 | 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /Hola/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Hola/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Hola/Assets.xcassets/image1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image1.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Hola/Assets.xcassets/image1.imageset/image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliakorkmaz/Hola/b2a1b2d4aa279ee2224da9c08d7cc7e9636811a6/Hola/Assets.xcassets/image1.imageset/image1.jpg -------------------------------------------------------------------------------- /Hola/Assets.xcassets/image2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Hola/Assets.xcassets/image2.imageset/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliakorkmaz/Hola/b2a1b2d4aa279ee2224da9c08d7cc7e9636811a6/Hola/Assets.xcassets/image2.imageset/image2.jpg -------------------------------------------------------------------------------- /Hola/Assets.xcassets/image3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Hola/Assets.xcassets/image3.imageset/image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliakorkmaz/Hola/b2a1b2d4aa279ee2224da9c08d7cc7e9636811a6/Hola/Assets.xcassets/image3.imageset/image3.jpg -------------------------------------------------------------------------------- /Hola/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 | -------------------------------------------------------------------------------- /Hola/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 | -------------------------------------------------------------------------------- /Hola/Hola.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Hola.swift 3 | // Hola 4 | // 5 | // Created by xcodewarrior on 12.11.2017. 6 | // Copyright © 2017 EmrahKorkmaz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public enum rotationWay { 12 | case horizontal 13 | case vertical 14 | } 15 | 16 | 17 | class Hola: UIView{ 18 | 19 | private var _rotation: rotationWay! 20 | private var _count: Int! 21 | /* 22 | this count variable is added for binding between scrollViewDidScroll functions and limit of page. 23 | If there have 3 page, Hola has provide to scroll just between 0 and 3 section. 24 | */ 25 | 26 | 27 | var scrollView: UIScrollView! 28 | var pageControl: UIPageControl! 29 | 30 | // init function that represent Hola with view 31 | public init(frame: CGRect, viewArray uiviewArray:[UIView], _ rotation: rotationWay) { 32 | 33 | // set the count before the init cause that otherwise return nil when detect scrolling 34 | 35 | self._count = uiviewArray.count 36 | 37 | super.init(frame: frame) 38 | 39 | builder(uiviewArray.count, rotation) 40 | 41 | insertViewElements(uiviewArray, rotation) 42 | 43 | } 44 | 45 | 46 | // init function that represent Hola with images 47 | public init(frame: CGRect, imageArray uiimageArray:[UIImage],_ rotation: rotationWay ){ 48 | 49 | self._count = uiimageArray.count; 50 | 51 | super.init(frame: frame) 52 | 53 | builder(uiimageArray.count, rotation) 54 | 55 | insertImageElements(uiimageArray, rotation) 56 | 57 | } 58 | 59 | // helper methods 60 | private func attributesForPageControl(_ pageControl: UIPageControl, _ count:Int){ 61 | pageControl.numberOfPages = count 62 | 63 | pageControl.currentPage = 0 64 | 65 | pageControl.layer.zPosition = 1 66 | 67 | pageControl.backgroundColor = UIColor.clear 68 | } 69 | 70 | fileprivate func pageToFloatVertical(_ simpleInteger: Int) -> CGFloat{ 71 | return CGFloat(simpleInteger) * UIScreen.main.bounds.height 72 | } 73 | 74 | fileprivate func pageToFloatHorizontal(_ simpleInteger: Int) -> CGFloat{ 75 | return CGFloat(simpleInteger) * UIScreen.main.bounds.width 76 | } 77 | 78 | fileprivate func offsetToPage(_ scrollViewOffset: CGFloat) -> Int{ 79 | return Int(scrollViewOffset / UIScreen.main.bounds.width) 80 | } 81 | 82 | fileprivate func offsetToPageVertical(withHeightOffset scrollViewOffset: CGFloat) -> Int{ 83 | return Int(scrollViewOffset / UIScreen.main.bounds.height) 84 | } 85 | 86 | fileprivate func getWidth() -> CGFloat{ 87 | return UIScreen.main.bounds.width 88 | } 89 | 90 | fileprivate func getHeight() -> CGFloat{ 91 | return UIScreen.main.bounds.height 92 | } 93 | 94 | func prepareImagesForStoryboard(uiimageArray: [UIImage], rotation: rotationWay){ 95 | builder(uiimageArray.count, rotation) 96 | 97 | insertImageElements(uiimageArray, rotation) 98 | } 99 | 100 | func prepareViewsForStoryboard(viewArray: [UIView], rotation: rotationWay){ 101 | builder(viewArray.count, rotation) 102 | 103 | insertViewElements(viewArray, rotation) 104 | } 105 | 106 | private func insertImageElements(_ elements: [UIImage], _ rotation: rotationWay){ 107 | 108 | var imageViewArray: [UIImageView?] = [UIImageView?].init(repeating: nil, count: elements.count) 109 | 110 | // initialize and setting up frame the uiviews with every view of viewArray 111 | for i in 0...elements.count-1 { 112 | 113 | imageViewArray[i] = UIImageView() 114 | 115 | switch rotation{ 116 | 117 | case .horizontal: 118 | 119 | imageViewArray[i]?.frame = CGRect(x: pageToFloatHorizontal(i), y: 0, width: getWidth(), height: getHeight()) 120 | 121 | case .vertical: 122 | 123 | imageViewArray[i]?.frame = CGRect(x: 0, y: pageToFloatVertical(i), width: getWidth(), height: getHeight()) 124 | } 125 | 126 | imageViewArray[i]?.image = (elements[i]) 127 | 128 | scrollView.addSubview(imageViewArray[i]!) 129 | } 130 | } 131 | 132 | private func insertViewElements(_ elements: [UIView], _ rotation: rotationWay){ 133 | var viewArray: [UIView?] = [UIView?].init(repeating: nil, count: elements.count) 134 | 135 | // initialize and setting up frame the uiviews with every view of viewArray 136 | for i in 0...elements.count-1 { 137 | 138 | viewArray[i] = UIView() 139 | 140 | switch rotation{ 141 | 142 | case .horizontal: 143 | 144 | viewArray[i]?.frame = CGRect(x: pageToFloatHorizontal(i), y: 0, width: getWidth(), height: getHeight()) 145 | 146 | elements[i].frame.origin = CGPoint(x: pageToFloatHorizontal(i), y: 0) 147 | 148 | case .vertical: 149 | 150 | viewArray[i]?.frame = CGRect(x: 0, y: pageToFloatVertical(i), width: getWidth(), height: getHeight()) 151 | 152 | elements[i].frame.origin = CGPoint(x: 0, y: pageToFloatVertical(i)) 153 | } 154 | 155 | viewArray[i]! = elements[i] 156 | 157 | scrollView.addSubview(viewArray[i]!) 158 | } 159 | 160 | } 161 | 162 | private func builder(_ count: Int, _ rotation: rotationWay){ 163 | self._count = count 164 | 165 | self._rotation = rotation 166 | 167 | scrollView = UIScrollView() 168 | 169 | scrollView.frame = CGRect(x: 0, y: 0, width: Int(UIScreen.main.bounds.width), height: Int(UIScreen.main.bounds.height)) 170 | 171 | scrollView.backgroundColor = UIColor.clear 172 | 173 | scrollView.isPagingEnabled = true 174 | 175 | // setting scroll view contentsize for given direction 176 | switch rotation { 177 | 178 | case .horizontal: 179 | 180 | scrollView.contentSize = CGSize(width: Int(UIScreen.main.bounds.width)*count, height: 0) 181 | 182 | scrollView.showsHorizontalScrollIndicator = false 183 | 184 | case .vertical: 185 | 186 | scrollView.contentSize = CGSize(width: 0, height: Int(UIScreen.main.bounds.height)*count) 187 | 188 | scrollView.showsVerticalScrollIndicator = false 189 | } 190 | 191 | 192 | scrollView.delegate = self 193 | 194 | // settings up pagecontrol 195 | pageControl = UIPageControl() 196 | 197 | pageControl.translatesAutoresizingMaskIntoConstraints = false 198 | 199 | switch rotation { 200 | 201 | case .vertical: 202 | 203 | pageControl.transform = CGAffineTransform(rotationAngle: .pi / 2) 204 | 205 | default: 206 | 207 | break 208 | } 209 | 210 | 211 | self.addSubview(pageControl) 212 | 213 | self.attributesForPageControl(pageControl,count) 214 | 215 | self.addSubview(scrollView) 216 | 217 | switch rotation { 218 | 219 | case .vertical: 220 | 221 | scrollView.setContentOffset(CGPoint.init(x: 0, y: 20), animated: false) 222 | 223 | scrollView.setContentOffset(CGPoint.init(x: 0, y: 0), animated: false) 224 | 225 | pageControl.heightAnchor.constraint(equalToConstant: 100).isActive = true 226 | 227 | pageControl.widthAnchor.constraint(equalToConstant: 25).isActive = true 228 | 229 | pageControl.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -3).isActive = true 230 | 231 | pageControl.centerYAnchor.constraint(equalTo: self.centerYAnchor).isActive = true 232 | 233 | case .horizontal: 234 | 235 | pageControl.heightAnchor.constraint(equalToConstant: 25).isActive = true 236 | 237 | pageControl.widthAnchor.constraint(equalToConstant: 100).isActive = true 238 | 239 | pageControl.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true 240 | 241 | pageControl.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -50).isActive = true 242 | } 243 | } 244 | 245 | required init?(coder aDecoder: NSCoder) { 246 | super.init(coder: aDecoder) 247 | } 248 | 249 | } 250 | 251 | extension Hola: UIScrollViewDelegate{ 252 | 253 | func scrollViewDidScroll(_ scrollView: UIScrollView) { 254 | 255 | // its forbidden to scroll to negative offset or upper offset of biggest offset limit. 256 | 257 | let rotation: rotationWay = _rotation! 258 | let count: Int = _count! 259 | 260 | 261 | switch rotation { 262 | 263 | case .horizontal: 264 | if scrollView.contentOffset.x <= 0{ 265 | 266 | scrollView.setContentOffset(CGPoint.init(x: 0, y: 0), animated: false) 267 | 268 | }else if scrollView.contentOffset.x >= UIScreen.main.bounds.width*CGFloat(count-1){ 269 | 270 | scrollView.setContentOffset(CGPoint.init(x: Int(UIScreen.main.bounds.width)*(count-1), y: 0), animated: false) 271 | 272 | } 273 | case .vertical: 274 | if scrollView.contentOffset.y <= 0{ 275 | 276 | scrollView.setContentOffset(CGPoint.init(x: 0, y: 0), animated: false) 277 | 278 | }else if scrollView.contentOffset.y >= UIScreen.main.bounds.height*CGFloat(count-1){ 279 | 280 | scrollView.setContentOffset(CGPoint.init(x: 0, y: Int(UIScreen.main.bounds.height)*(count-1)), animated: false) 281 | 282 | } 283 | } 284 | } 285 | 286 | func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { 287 | 288 | // setting pageControl currentPage with every changing on scrollView page. 289 | 290 | let rotation: rotationWay = _rotation! 291 | 292 | switch rotation { 293 | 294 | case .horizontal: 295 | 296 | pageControl.currentPage = offsetToPage(scrollView.contentOffset.x) 297 | 298 | case .vertical: 299 | 300 | pageControl.currentPage = offsetToPageVertical(withHeightOffset: scrollView.contentOffset.y) 301 | 302 | } 303 | } 304 | 305 | } 306 | -------------------------------------------------------------------------------- /Hola/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Hola/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Hola 4 | // 5 | // Created by xcodewarrior on 12.11.2017. 6 | // Copyright © 2017 EmrahKorkmaz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | view.backgroundColor = UIColor.white 17 | 18 | 19 | testWithImage(.vertical) 20 | // testWithView(.vertical) 21 | 22 | } 23 | 24 | 25 | 26 | // testing function for uiimage 27 | fileprivate func testWithImage(_ rotation: rotationWay){ 28 | 29 | let _image1: UIImage = UIImage(named:"image1")! 30 | let _image2: UIImage = UIImage(named:"image2")! 31 | let _image3: UIImage = UIImage(named:"image3")! 32 | let _image4: UIImage = UIImage(named:"image2")! 33 | 34 | let imageArray: [UIImage] = [_image1,_image2,_image3,_image4] 35 | 36 | let sss: Hola = Hola(frame: CGRect(), imageArray: imageArray, rotation); 37 | sss.frame = CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height) 38 | view.addSubview(sss) 39 | } 40 | 41 | // testing function for uiview 42 | fileprivate func testWithView(_ rotation: rotationWay){ 43 | let view1: UIView = UIView() 44 | view1.frame = CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height) 45 | view1.backgroundColor = UIColor.lightGray 46 | 47 | let label1: UILabel = UILabel() 48 | label1.textColor = UIColor.white 49 | label1.text = "Simple View Label 1" 50 | label1.textAlignment = .center 51 | label1.font = UIFont.boldSystemFont(ofSize: 18) 52 | label1.frame = CGRect(x: 0, y: 0, width: 250, height:50) 53 | label1.center = view1.center 54 | view1.addSubview(label1) 55 | 56 | let view2: UIView = UIView() 57 | view2.frame = CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height) 58 | view2.backgroundColor = UIColor.brown 59 | 60 | let label2: UILabel = UILabel() 61 | label2.textColor = UIColor.white 62 | label2.text = "Simple View Label 2" 63 | label2.textAlignment = .center 64 | label2.font = UIFont.boldSystemFont(ofSize: 18) 65 | label2.frame = CGRect(x: 0, y: 0, width: 250, height:50) 66 | label2.center = view2.center 67 | view2.addSubview(label2) 68 | 69 | let view3: UIView = UIView() 70 | view3.frame = CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height) 71 | view3.backgroundColor = UIColor.black 72 | 73 | let label3: UILabel = UILabel() 74 | label3.textColor = UIColor.white 75 | label3.text = "Simple View Label 3" 76 | label3.textAlignment = .center 77 | label3.font = UIFont.boldSystemFont(ofSize: 18) 78 | label3.frame = CGRect(x: 0, y: 0, width: 250, height:50) 79 | label3.center = view3.center 80 | view3.addSubview(label3) 81 | 82 | let viewArray: [UIView] = [view1,view2,view3] 83 | 84 | let ttt: Hola = Hola(frame: CGRect(), viewArray: viewArray, rotation) 85 | ttt.frame = CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height) 86 | view.addSubview(ttt) 87 | } 88 | 89 | } 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /HolaExample/HolaExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2F71D267235A56DF00776385 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F71D266235A56DF00776385 /* AppDelegate.swift */; }; 11 | 2F71D26B235A56DF00776385 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F71D26A235A56DF00776385 /* ViewController.swift */; }; 12 | 2F71D26E235A56DF00776385 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2F71D26C235A56DF00776385 /* Main.storyboard */; }; 13 | 2F71D270235A56E100776385 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2F71D26F235A56E100776385 /* Assets.xcassets */; }; 14 | 2F71D273235A56E100776385 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2F71D271235A56E100776385 /* LaunchScreen.storyboard */; }; 15 | 2F71D27B235A573400776385 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F71D27A235A573400776385 /* SceneDelegate.swift */; }; 16 | 2F71D27D235A574E00776385 /* Hola.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F71D27C235A574E00776385 /* Hola.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 2F71D263235A56DF00776385 /* HolaExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HolaExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 2F71D266235A56DF00776385 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | 2F71D26A235A56DF00776385 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 23 | 2F71D26D235A56DF00776385 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 24 | 2F71D26F235A56E100776385 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 25 | 2F71D272235A56E100776385 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 26 | 2F71D274235A56E100776385 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 27 | 2F71D27A235A573400776385 /* SceneDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 28 | 2F71D27C235A574E00776385 /* Hola.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Hola.swift; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 2F71D260235A56DF00776385 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | 2F71D25A235A56DF00776385 = { 43 | isa = PBXGroup; 44 | children = ( 45 | 2F71D265235A56DF00776385 /* HolaExample */, 46 | 2F71D264235A56DF00776385 /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | 2F71D264235A56DF00776385 /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 2F71D263235A56DF00776385 /* HolaExample.app */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | 2F71D265235A56DF00776385 /* HolaExample */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 2F71D27A235A573400776385 /* SceneDelegate.swift */, 62 | 2F71D266235A56DF00776385 /* AppDelegate.swift */, 63 | 2F71D26A235A56DF00776385 /* ViewController.swift */, 64 | 2F71D26C235A56DF00776385 /* Main.storyboard */, 65 | 2F71D26F235A56E100776385 /* Assets.xcassets */, 66 | 2F71D271235A56E100776385 /* LaunchScreen.storyboard */, 67 | 2F71D27C235A574E00776385 /* Hola.swift */, 68 | 2F71D274235A56E100776385 /* Info.plist */, 69 | ); 70 | path = HolaExample; 71 | sourceTree = ""; 72 | }; 73 | /* End PBXGroup section */ 74 | 75 | /* Begin PBXNativeTarget section */ 76 | 2F71D262235A56DF00776385 /* HolaExample */ = { 77 | isa = PBXNativeTarget; 78 | buildConfigurationList = 2F71D277235A56E100776385 /* Build configuration list for PBXNativeTarget "HolaExample" */; 79 | buildPhases = ( 80 | 2F71D25F235A56DF00776385 /* Sources */, 81 | 2F71D260235A56DF00776385 /* Frameworks */, 82 | 2F71D261235A56DF00776385 /* Resources */, 83 | ); 84 | buildRules = ( 85 | ); 86 | dependencies = ( 87 | ); 88 | name = HolaExample; 89 | productName = HolaExample; 90 | productReference = 2F71D263235A56DF00776385 /* HolaExample.app */; 91 | productType = "com.apple.product-type.application"; 92 | }; 93 | /* End PBXNativeTarget section */ 94 | 95 | /* Begin PBXProject section */ 96 | 2F71D25B235A56DF00776385 /* Project object */ = { 97 | isa = PBXProject; 98 | attributes = { 99 | LastSwiftUpdateCheck = 1100; 100 | LastUpgradeCheck = 1100; 101 | ORGANIZATIONNAME = "Emrah Korkmaz"; 102 | TargetAttributes = { 103 | 2F71D262235A56DF00776385 = { 104 | CreatedOnToolsVersion = 11.0; 105 | }; 106 | }; 107 | }; 108 | buildConfigurationList = 2F71D25E235A56DF00776385 /* Build configuration list for PBXProject "HolaExample" */; 109 | compatibilityVersion = "Xcode 9.3"; 110 | developmentRegion = en; 111 | hasScannedForEncodings = 0; 112 | knownRegions = ( 113 | en, 114 | Base, 115 | ); 116 | mainGroup = 2F71D25A235A56DF00776385; 117 | productRefGroup = 2F71D264235A56DF00776385 /* Products */; 118 | projectDirPath = ""; 119 | projectRoot = ""; 120 | targets = ( 121 | 2F71D262235A56DF00776385 /* HolaExample */, 122 | ); 123 | }; 124 | /* End PBXProject section */ 125 | 126 | /* Begin PBXResourcesBuildPhase section */ 127 | 2F71D261235A56DF00776385 /* Resources */ = { 128 | isa = PBXResourcesBuildPhase; 129 | buildActionMask = 2147483647; 130 | files = ( 131 | 2F71D273235A56E100776385 /* LaunchScreen.storyboard in Resources */, 132 | 2F71D270235A56E100776385 /* Assets.xcassets in Resources */, 133 | 2F71D26E235A56DF00776385 /* Main.storyboard in Resources */, 134 | ); 135 | runOnlyForDeploymentPostprocessing = 0; 136 | }; 137 | /* End PBXResourcesBuildPhase section */ 138 | 139 | /* Begin PBXSourcesBuildPhase section */ 140 | 2F71D25F235A56DF00776385 /* Sources */ = { 141 | isa = PBXSourcesBuildPhase; 142 | buildActionMask = 2147483647; 143 | files = ( 144 | 2F71D27B235A573400776385 /* SceneDelegate.swift in Sources */, 145 | 2F71D27D235A574E00776385 /* Hola.swift in Sources */, 146 | 2F71D26B235A56DF00776385 /* ViewController.swift in Sources */, 147 | 2F71D267235A56DF00776385 /* AppDelegate.swift in Sources */, 148 | ); 149 | runOnlyForDeploymentPostprocessing = 0; 150 | }; 151 | /* End PBXSourcesBuildPhase section */ 152 | 153 | /* Begin PBXVariantGroup section */ 154 | 2F71D26C235A56DF00776385 /* Main.storyboard */ = { 155 | isa = PBXVariantGroup; 156 | children = ( 157 | 2F71D26D235A56DF00776385 /* Base */, 158 | ); 159 | name = Main.storyboard; 160 | sourceTree = ""; 161 | }; 162 | 2F71D271235A56E100776385 /* LaunchScreen.storyboard */ = { 163 | isa = PBXVariantGroup; 164 | children = ( 165 | 2F71D272235A56E100776385 /* Base */, 166 | ); 167 | name = LaunchScreen.storyboard; 168 | sourceTree = ""; 169 | }; 170 | /* End PBXVariantGroup section */ 171 | 172 | /* Begin XCBuildConfiguration section */ 173 | 2F71D275235A56E100776385 /* Debug */ = { 174 | isa = XCBuildConfiguration; 175 | buildSettings = { 176 | ALWAYS_SEARCH_USER_PATHS = NO; 177 | CLANG_ANALYZER_NONNULL = YES; 178 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 179 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 180 | CLANG_CXX_LIBRARY = "libc++"; 181 | CLANG_ENABLE_MODULES = YES; 182 | CLANG_ENABLE_OBJC_ARC = YES; 183 | CLANG_ENABLE_OBJC_WEAK = YES; 184 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 185 | CLANG_WARN_BOOL_CONVERSION = YES; 186 | CLANG_WARN_COMMA = YES; 187 | CLANG_WARN_CONSTANT_CONVERSION = YES; 188 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 189 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 190 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 191 | CLANG_WARN_EMPTY_BODY = YES; 192 | CLANG_WARN_ENUM_CONVERSION = YES; 193 | CLANG_WARN_INFINITE_RECURSION = YES; 194 | CLANG_WARN_INT_CONVERSION = YES; 195 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 196 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 197 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 198 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 199 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 200 | CLANG_WARN_STRICT_PROTOTYPES = YES; 201 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 202 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 203 | CLANG_WARN_UNREACHABLE_CODE = YES; 204 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 205 | COPY_PHASE_STRIP = NO; 206 | DEBUG_INFORMATION_FORMAT = dwarf; 207 | ENABLE_STRICT_OBJC_MSGSEND = YES; 208 | ENABLE_TESTABILITY = YES; 209 | GCC_C_LANGUAGE_STANDARD = gnu11; 210 | GCC_DYNAMIC_NO_PIC = NO; 211 | GCC_NO_COMMON_BLOCKS = YES; 212 | GCC_OPTIMIZATION_LEVEL = 0; 213 | GCC_PREPROCESSOR_DEFINITIONS = ( 214 | "DEBUG=1", 215 | "$(inherited)", 216 | ); 217 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 218 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 219 | GCC_WARN_UNDECLARED_SELECTOR = YES; 220 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 221 | GCC_WARN_UNUSED_FUNCTION = YES; 222 | GCC_WARN_UNUSED_VARIABLE = YES; 223 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 224 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 225 | MTL_FAST_MATH = YES; 226 | ONLY_ACTIVE_ARCH = YES; 227 | SDKROOT = iphoneos; 228 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 229 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 230 | }; 231 | name = Debug; 232 | }; 233 | 2F71D276235A56E100776385 /* Release */ = { 234 | isa = XCBuildConfiguration; 235 | buildSettings = { 236 | ALWAYS_SEARCH_USER_PATHS = NO; 237 | CLANG_ANALYZER_NONNULL = YES; 238 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_ENABLE_OBJC_WEAK = YES; 244 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 245 | CLANG_WARN_BOOL_CONVERSION = YES; 246 | CLANG_WARN_COMMA = YES; 247 | CLANG_WARN_CONSTANT_CONVERSION = YES; 248 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 249 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 250 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 251 | CLANG_WARN_EMPTY_BODY = YES; 252 | CLANG_WARN_ENUM_CONVERSION = YES; 253 | CLANG_WARN_INFINITE_RECURSION = YES; 254 | CLANG_WARN_INT_CONVERSION = YES; 255 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 257 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 258 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 259 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 260 | CLANG_WARN_STRICT_PROTOTYPES = YES; 261 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 262 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 263 | CLANG_WARN_UNREACHABLE_CODE = YES; 264 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 265 | COPY_PHASE_STRIP = NO; 266 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 267 | ENABLE_NS_ASSERTIONS = NO; 268 | ENABLE_STRICT_OBJC_MSGSEND = YES; 269 | GCC_C_LANGUAGE_STANDARD = gnu11; 270 | GCC_NO_COMMON_BLOCKS = YES; 271 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 272 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 273 | GCC_WARN_UNDECLARED_SELECTOR = YES; 274 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 275 | GCC_WARN_UNUSED_FUNCTION = YES; 276 | GCC_WARN_UNUSED_VARIABLE = YES; 277 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 278 | MTL_ENABLE_DEBUG_INFO = NO; 279 | MTL_FAST_MATH = YES; 280 | SDKROOT = iphoneos; 281 | SWIFT_COMPILATION_MODE = wholemodule; 282 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 283 | VALIDATE_PRODUCT = YES; 284 | }; 285 | name = Release; 286 | }; 287 | 2F71D278235A56E100776385 /* Debug */ = { 288 | isa = XCBuildConfiguration; 289 | buildSettings = { 290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 291 | CODE_SIGN_STYLE = Automatic; 292 | DEVELOPMENT_TEAM = Q84A6DV979; 293 | INFOPLIST_FILE = HolaExample/Info.plist; 294 | LD_RUNPATH_SEARCH_PATHS = ( 295 | "$(inherited)", 296 | "@executable_path/Frameworks", 297 | ); 298 | PRODUCT_BUNDLE_IDENTIFIER = com.emrahkorkmaz.HolaExample; 299 | PRODUCT_NAME = "$(TARGET_NAME)"; 300 | SWIFT_VERSION = 5.0; 301 | TARGETED_DEVICE_FAMILY = "1,2"; 302 | }; 303 | name = Debug; 304 | }; 305 | 2F71D279235A56E100776385 /* Release */ = { 306 | isa = XCBuildConfiguration; 307 | buildSettings = { 308 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 309 | CODE_SIGN_STYLE = Automatic; 310 | DEVELOPMENT_TEAM = Q84A6DV979; 311 | INFOPLIST_FILE = HolaExample/Info.plist; 312 | LD_RUNPATH_SEARCH_PATHS = ( 313 | "$(inherited)", 314 | "@executable_path/Frameworks", 315 | ); 316 | PRODUCT_BUNDLE_IDENTIFIER = com.emrahkorkmaz.HolaExample; 317 | PRODUCT_NAME = "$(TARGET_NAME)"; 318 | SWIFT_VERSION = 5.0; 319 | TARGETED_DEVICE_FAMILY = "1,2"; 320 | }; 321 | name = Release; 322 | }; 323 | /* End XCBuildConfiguration section */ 324 | 325 | /* Begin XCConfigurationList section */ 326 | 2F71D25E235A56DF00776385 /* Build configuration list for PBXProject "HolaExample" */ = { 327 | isa = XCConfigurationList; 328 | buildConfigurations = ( 329 | 2F71D275235A56E100776385 /* Debug */, 330 | 2F71D276235A56E100776385 /* Release */, 331 | ); 332 | defaultConfigurationIsVisible = 0; 333 | defaultConfigurationName = Release; 334 | }; 335 | 2F71D277235A56E100776385 /* Build configuration list for PBXNativeTarget "HolaExample" */ = { 336 | isa = XCConfigurationList; 337 | buildConfigurations = ( 338 | 2F71D278235A56E100776385 /* Debug */, 339 | 2F71D279235A56E100776385 /* Release */, 340 | ); 341 | defaultConfigurationIsVisible = 0; 342 | defaultConfigurationName = Release; 343 | }; 344 | /* End XCConfigurationList section */ 345 | }; 346 | rootObject = 2F71D25B235A56DF00776385 /* Project object */; 347 | } 348 | -------------------------------------------------------------------------------- /HolaExample/HolaExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // HolaExample 4 | // 5 | // Created by Emrah Korkmaz on 10/18/19. 6 | // Copyright © 2019 Emrah Korkmaz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /HolaExample/HolaExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /HolaExample/HolaExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /HolaExample/HolaExample/Assets.xcassets/image1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image1.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HolaExample/HolaExample/Assets.xcassets/image1.imageset/image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliakorkmaz/Hola/b2a1b2d4aa279ee2224da9c08d7cc7e9636811a6/HolaExample/HolaExample/Assets.xcassets/image1.imageset/image1.jpg -------------------------------------------------------------------------------- /HolaExample/HolaExample/Assets.xcassets/image2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HolaExample/HolaExample/Assets.xcassets/image2.imageset/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliakorkmaz/Hola/b2a1b2d4aa279ee2224da9c08d7cc7e9636811a6/HolaExample/HolaExample/Assets.xcassets/image2.imageset/image2.jpg -------------------------------------------------------------------------------- /HolaExample/HolaExample/Assets.xcassets/image3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HolaExample/HolaExample/Assets.xcassets/image3.imageset/image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliakorkmaz/Hola/b2a1b2d4aa279ee2224da9c08d7cc7e9636811a6/HolaExample/HolaExample/Assets.xcassets/image3.imageset/image3.jpg -------------------------------------------------------------------------------- /HolaExample/HolaExample/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 | -------------------------------------------------------------------------------- /HolaExample/HolaExample/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 | -------------------------------------------------------------------------------- /HolaExample/HolaExample/Hola.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Hola.swift 3 | // Hola 4 | // 5 | // Created by xcodewarrior on 12.11.2017. 6 | // Copyright © 2017 EmrahKorkmaz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public enum rotationWay { 12 | case horizontal 13 | case vertical 14 | } 15 | 16 | 17 | class Hola: UIView{ 18 | 19 | private var _rotation: rotationWay! 20 | private var _count: Int! 21 | /* 22 | this count variable is added for binding between scrollViewDidScroll functions and limit of page. 23 | If there have 3 page, Hola has provide to scroll just between 0 and 3 section. 24 | */ 25 | 26 | 27 | var scrollView: UIScrollView! 28 | var pageControl: UIPageControl! 29 | 30 | // init function that represent Hola with view 31 | public init(frame: CGRect, viewArray uiviewArray:[UIView], _ rotation: rotationWay) { 32 | 33 | // set the count before the init cause that otherwise return nil when detect scrolling 34 | 35 | self._count = uiviewArray.count 36 | 37 | super.init(frame: frame) 38 | 39 | builder(uiviewArray.count, rotation) 40 | 41 | insertViewElements(uiviewArray, rotation) 42 | 43 | } 44 | 45 | 46 | // init function that represent Hola with images 47 | public init(frame: CGRect, imageArray uiimageArray:[UIImage],_ rotation: rotationWay ){ 48 | 49 | self._count = uiimageArray.count; 50 | 51 | super.init(frame: frame) 52 | 53 | builder(uiimageArray.count, rotation) 54 | 55 | insertImageElements(uiimageArray, rotation) 56 | 57 | } 58 | 59 | // helper methods 60 | private func attributesForPageControl(_ pageControl: UIPageControl, _ count:Int){ 61 | pageControl.numberOfPages = count 62 | 63 | pageControl.currentPage = 0 64 | 65 | pageControl.layer.zPosition = 1 66 | 67 | pageControl.backgroundColor = UIColor.clear 68 | } 69 | 70 | fileprivate func pageToFloatVertical(_ simpleInteger: Int) -> CGFloat{ 71 | return CGFloat(simpleInteger) * UIScreen.main.bounds.height 72 | } 73 | 74 | fileprivate func pageToFloatHorizontal(_ simpleInteger: Int) -> CGFloat{ 75 | return CGFloat(simpleInteger) * UIScreen.main.bounds.width 76 | } 77 | 78 | fileprivate func offsetToPage(_ scrollViewOffset: CGFloat) -> Int{ 79 | return Int(scrollViewOffset / UIScreen.main.bounds.width) 80 | } 81 | 82 | fileprivate func offsetToPageVertical(withHeightOffset scrollViewOffset: CGFloat) -> Int{ 83 | return Int(scrollViewOffset / UIScreen.main.bounds.height) 84 | } 85 | 86 | fileprivate func getWidth() -> CGFloat{ 87 | return UIScreen.main.bounds.width 88 | } 89 | 90 | fileprivate func getHeight() -> CGFloat{ 91 | return UIScreen.main.bounds.height 92 | } 93 | 94 | func prepareImagesForStoryboard(uiimageArray: [UIImage], rotation: rotationWay){ 95 | builder(uiimageArray.count, rotation) 96 | 97 | insertImageElements(uiimageArray, rotation) 98 | } 99 | 100 | func prepareViewsForStoryboard(viewArray: [UIView], rotation: rotationWay){ 101 | builder(viewArray.count, rotation) 102 | 103 | insertViewElements(viewArray, rotation) 104 | } 105 | 106 | private func insertImageElements(_ elements: [UIImage], _ rotation: rotationWay){ 107 | 108 | var imageViewArray: [UIImageView?] = [UIImageView?].init(repeating: nil, count: elements.count) 109 | 110 | // initialize and setting up frame the uiviews with every view of viewArray 111 | for i in 0...elements.count-1 { 112 | 113 | imageViewArray[i] = UIImageView() 114 | 115 | switch rotation{ 116 | 117 | case .horizontal: 118 | 119 | imageViewArray[i]?.frame = CGRect(x: pageToFloatHorizontal(i), y: 0, width: getWidth(), height: getHeight()) 120 | 121 | case .vertical: 122 | 123 | imageViewArray[i]?.frame = CGRect(x: 0, y: pageToFloatVertical(i), width: getWidth(), height: getHeight()) 124 | } 125 | 126 | imageViewArray[i]?.image = (elements[i]) 127 | 128 | scrollView.addSubview(imageViewArray[i]!) 129 | } 130 | } 131 | 132 | private func insertViewElements(_ elements: [UIView], _ rotation: rotationWay){ 133 | var viewArray: [UIView?] = [UIView?].init(repeating: nil, count: elements.count) 134 | 135 | // initialize and setting up frame the uiviews with every view of viewArray 136 | for i in 0...elements.count-1 { 137 | 138 | viewArray[i] = UIView() 139 | 140 | switch rotation{ 141 | 142 | case .horizontal: 143 | 144 | viewArray[i]?.frame = CGRect(x: pageToFloatHorizontal(i), y: 0, width: getWidth(), height: getHeight()) 145 | 146 | elements[i].frame.origin = CGPoint(x: pageToFloatHorizontal(i), y: 0) 147 | 148 | case .vertical: 149 | 150 | viewArray[i]?.frame = CGRect(x: 0, y: pageToFloatVertical(i), width: getWidth(), height: getHeight()) 151 | 152 | elements[i].frame.origin = CGPoint(x: 0, y: pageToFloatVertical(i)) 153 | } 154 | 155 | viewArray[i]! = elements[i] 156 | 157 | scrollView.addSubview(viewArray[i]!) 158 | } 159 | 160 | } 161 | 162 | private func builder(_ count: Int, _ rotation: rotationWay){ 163 | self._count = count 164 | 165 | self._rotation = rotation 166 | 167 | scrollView = UIScrollView() 168 | 169 | scrollView.frame = CGRect(x: 0, y: 0, width: Int(UIScreen.main.bounds.width), height: Int(UIScreen.main.bounds.height)) 170 | 171 | scrollView.backgroundColor = UIColor.clear 172 | 173 | scrollView.isPagingEnabled = true 174 | 175 | // setting scroll view contentsize for given direction 176 | switch rotation { 177 | 178 | case .horizontal: 179 | 180 | scrollView.contentSize = CGSize(width: Int(UIScreen.main.bounds.width)*count, height: 0) 181 | 182 | scrollView.showsHorizontalScrollIndicator = false 183 | 184 | case .vertical: 185 | 186 | scrollView.contentSize = CGSize(width: 0, height: Int(UIScreen.main.bounds.height)*count) 187 | 188 | scrollView.showsVerticalScrollIndicator = false 189 | } 190 | 191 | 192 | scrollView.delegate = self 193 | 194 | // settings up pagecontrol 195 | pageControl = UIPageControl() 196 | 197 | pageControl.translatesAutoresizingMaskIntoConstraints = false 198 | 199 | switch rotation { 200 | 201 | case .vertical: 202 | 203 | pageControl.transform = CGAffineTransform(rotationAngle: .pi / 2) 204 | 205 | default: 206 | 207 | break 208 | } 209 | 210 | 211 | self.addSubview(pageControl) 212 | 213 | self.attributesForPageControl(pageControl,count) 214 | 215 | self.addSubview(scrollView) 216 | 217 | switch rotation { 218 | 219 | case .vertical: 220 | 221 | scrollView.setContentOffset(CGPoint.init(x: 0, y: 20), animated: false) 222 | 223 | scrollView.setContentOffset(CGPoint.init(x: 0, y: 0), animated: false) 224 | 225 | pageControl.heightAnchor.constraint(equalToConstant: 100).isActive = true 226 | 227 | pageControl.widthAnchor.constraint(equalToConstant: 25).isActive = true 228 | 229 | pageControl.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -3).isActive = true 230 | 231 | pageControl.centerYAnchor.constraint(equalTo: self.centerYAnchor).isActive = true 232 | 233 | case .horizontal: 234 | 235 | pageControl.heightAnchor.constraint(equalToConstant: 25).isActive = true 236 | 237 | pageControl.widthAnchor.constraint(equalToConstant: 100).isActive = true 238 | 239 | pageControl.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true 240 | 241 | pageControl.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -50).isActive = true 242 | } 243 | } 244 | 245 | required init?(coder aDecoder: NSCoder) { 246 | super.init(coder: aDecoder) 247 | } 248 | 249 | } 250 | 251 | extension Hola: UIScrollViewDelegate{ 252 | 253 | func scrollViewDidScroll(_ scrollView: UIScrollView) { 254 | 255 | // its forbidden to scroll to negative offset or upper offset of biggest offset limit. 256 | 257 | let rotation: rotationWay = _rotation! 258 | let count: Int = _count! 259 | 260 | 261 | switch rotation { 262 | 263 | case .horizontal: 264 | if scrollView.contentOffset.x <= 0{ 265 | 266 | scrollView.setContentOffset(CGPoint.init(x: 0, y: 0), animated: false) 267 | 268 | }else if scrollView.contentOffset.x >= UIScreen.main.bounds.width*CGFloat(count-1){ 269 | 270 | scrollView.setContentOffset(CGPoint.init(x: Int(UIScreen.main.bounds.width)*(count-1), y: 0), animated: false) 271 | 272 | } 273 | case .vertical: 274 | if scrollView.contentOffset.y <= 0{ 275 | 276 | scrollView.setContentOffset(CGPoint.init(x: 0, y: 0), animated: false) 277 | 278 | }else if scrollView.contentOffset.y >= UIScreen.main.bounds.height*CGFloat(count-1){ 279 | 280 | scrollView.setContentOffset(CGPoint.init(x: 0, y: Int(UIScreen.main.bounds.height)*(count-1)), animated: false) 281 | 282 | } 283 | } 284 | } 285 | 286 | func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { 287 | 288 | // setting pageControl currentPage with every changing on scrollView page. 289 | 290 | let rotation: rotationWay = _rotation! 291 | 292 | switch rotation { 293 | 294 | case .horizontal: 295 | 296 | pageControl.currentPage = offsetToPage(scrollView.contentOffset.x) 297 | 298 | case .vertical: 299 | 300 | pageControl.currentPage = offsetToPageVertical(withHeightOffset: scrollView.contentOffset.y) 301 | 302 | } 303 | } 304 | 305 | } 306 | -------------------------------------------------------------------------------- /HolaExample/HolaExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | UISceneStoryboardFile 37 | Main 38 | 39 | 40 | 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIMainStoryboardFile 45 | Main 46 | UIRequiredDeviceCapabilities 47 | 48 | armv7 49 | 50 | UISupportedInterfaceOrientations 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationLandscapeLeft 54 | UIInterfaceOrientationLandscapeRight 55 | 56 | UISupportedInterfaceOrientations~ipad 57 | 58 | UIInterfaceOrientationPortrait 59 | UIInterfaceOrientationPortraitUpsideDown 60 | UIInterfaceOrientationLandscapeLeft 61 | UIInterfaceOrientationLandscapeRight 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /HolaExample/HolaExample/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // HolaExample 4 | // 5 | // Created by Emrah Korkmaz on 10/18/19. 6 | // Copyright © 2019 Emrah Korkmaz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | 16 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 17 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 18 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 19 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 20 | guard let _ = (scene as? UIWindowScene) else { return } 21 | } 22 | 23 | func sceneDidDisconnect(_ scene: UIScene) { 24 | // Called as the scene is being released by the system. 25 | // This occurs shortly after the scene enters the background, or when its session is discarded. 26 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 27 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 28 | } 29 | 30 | func sceneDidBecomeActive(_ scene: UIScene) { 31 | // Called when the scene has moved from an inactive state to an active state. 32 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 33 | } 34 | 35 | func sceneWillResignActive(_ scene: UIScene) { 36 | // Called when the scene will move from an active state to an inactive state. 37 | // This may occur due to temporary interruptions (ex. an incoming phone call). 38 | } 39 | 40 | func sceneWillEnterForeground(_ scene: UIScene) { 41 | // Called as the scene transitions from the background to the foreground. 42 | // Use this method to undo the changes made on entering the background. 43 | } 44 | 45 | func sceneDidEnterBackground(_ scene: UIScene) { 46 | // Called as the scene transitions from the foreground to the background. 47 | // Use this method to save data, release shared resources, and store enough scene-specific state information 48 | // to restore the scene back to its current state. 49 | } 50 | 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /HolaExample/HolaExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // HolaExample 4 | // 5 | // Created by Emrah Korkmaz on 10/18/19. 6 | // Copyright © 2019 Emrah Korkmaz. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | @IBOutlet weak var holaView: Hola! 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | // Do any additional setup after loading the view. 17 | 18 | var image1 = UIImage(named:"image1")! 19 | var image2 = UIImage(named:"image2")! 20 | var image3 = UIImage(named:"image3")! 21 | 22 | var imageArray = [image1, image2, image3] 23 | 24 | holaView.prepareImagesForStoryboard(uiimageArray: imageArray, rotation: rotationWay.horizontal) 25 | 26 | 27 | } 28 | 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Elia 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hola 2 | 3 | #### Light-weight Onboard/Walkthrough View for iOS written Swift 3 4 | 5 | `Hola` is a `UIView` that represent several views or images as `View Pager`, `Onboard` `Walkthrough` in different direction as `Vertical` or `Horizontal`. Its a subclass of `UIView`. 6 | 7 | # Gif for UIImage 8 | 9 | ![verticalGif](https://github.com/eliakorkmaz/Hola/blob/master/gif/gifVertical.gif?raw=true) ![horizontalGif](https://github.com/eliakorkmaz/Hola/blob/master/gif/horizontalGif.gif?raw=true) 10 | 11 | # Gif for UIView 12 | 13 | ![verticalGif](https://github.com/eliakorkmaz/Hola/blob/master/gif/viewgifhorizontal.gif?raw=true) ![horizontalGif](https://github.com/eliakorkmaz/Hola/blob/master/gif/viewgifvertical.gif?raw=true) 14 | 15 | # Update 16 | 17 | ## Support for Storyboard 18 | 19 | ```swift 20 | @IBOutlet weak var holaView: Hola! 21 | 22 | override func viewDidLoad() { 23 | super.viewDidLoad() 24 | 25 | 26 | let _image1: UIImage = UIImage(named:"image1")! 27 | let _image2: UIImage = UIImage(named:"image2")! 28 | let _image3: UIImage = UIImage(named:"image3")! 29 | let _image4: UIImage = UIImage(named:"image2")! 30 | 31 | let imageArray: [UIImage] = [_image1,_image2,_image3,_image4] 32 | let viewArray: [UIView] = [...........yourViews] 33 | 34 | holaView.prepareImagesForStoryboard(uiimageArray: imageArray, rotation: .vertical) 35 | 36 | holaView.prepareViewsForStoryboard(viewArray: viewArray, rotation: .horizontal) 37 | 38 | } 39 | ``` 40 | 41 | - Use prepareImagesForStoryboard or prepareViewsForStoryboard methods for preparing of @IBOutlet variable. 42 | 43 | # Init 44 | 45 | ```swift 46 | public init(frame: CGRect, viewArray uiviewArray:[UIView], _ rotation: rotationWay) 47 | ``` 48 | 49 | If you build pager with array of `UIView` you should use this `init` function. 50 | 51 | let simple: Hola = Hola(frame: CGRect(), viewArray: viewArray, .horizontal) 52 | 53 | ```` 54 | 55 | Another `init function` 56 | ```swift 57 | public init(frame: CGRect, imageArray uiimageArray:[UIImage],_ rotation:rotationWay) 58 | ```` 59 | 60 | For creating `Hola` with array of `UIImage`, use this `init` function to generate it. 61 | 62 | Here is the another example for `usage`. 63 | 64 | ```swift 65 | let simple: Hola = Hola(frame: CGRect(), imageArray: imageArray, .vertical) 66 | ``` 67 | 68 | # Structs 69 | 70 | ```swift 71 | public enum rotationWay { 72 | case horizontal 73 | case vertical 74 | } 75 | ``` 76 | 77 | `rotationWay` is used for specify `Hola`'s rotation as `horizontal`horizontal or `vertical`. 78 | 79 | ### Manually Installation 80 | 81 | ```sh 82 | git clone REPO_URL 83 | cd Hola/ 84 | use Hola.swift 85 | ``` 86 | 87 | ### Development 88 | 89 | Want to contribute? 90 | Feel free to contribute anything on this with describing contributed part 91 | 92 | ### Todos 93 | 94 | - Some transaction animations 95 | - Feel free to play with repo. 96 | 97 | ### Cons 98 | 99 | - The main cons of the Hola is that using the UIScrollView. If you use 1000 image for the this UIScrollView, the app wants to all image on memory, so thats not practible. If you build such a tool with UICollectionView, it will handle the photos with lazy loading, so just some of images will be load into memory which is currently showing to the user on the screen. The main difference and disadvantage of it is about not memory friendly. 100 | 101 | ## License 102 | 103 | _MIT_ 104 | 105 | ❤ **Open Source** 106 | -------------------------------------------------------------------------------- /gif/gifVertical.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliakorkmaz/Hola/b2a1b2d4aa279ee2224da9c08d7cc7e9636811a6/gif/gifVertical.gif -------------------------------------------------------------------------------- /gif/horizontalGif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliakorkmaz/Hola/b2a1b2d4aa279ee2224da9c08d7cc7e9636811a6/gif/horizontalGif.gif -------------------------------------------------------------------------------- /gif/viewgifhorizontal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliakorkmaz/Hola/b2a1b2d4aa279ee2224da9c08d7cc7e9636811a6/gif/viewgifhorizontal.gif -------------------------------------------------------------------------------- /gif/viewgifvertical.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliakorkmaz/Hola/b2a1b2d4aa279ee2224da9c08d7cc7e9636811a6/gif/viewgifvertical.gif --------------------------------------------------------------------------------