├── .gitignore ├── README.md ├── StackViewAnimation.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── StackViewAnimation ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist └── ViewController.swift ├── StackViewAnimationTests ├── Info.plist └── StackViewAnimationTests.swift └── StackViewAnimationUITests ├── Info.plist └── StackViewAnimationUITests.swift /.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 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | # Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # StackViewAnimationExample 2 | 3 | Example of a simple animation with StackView 4 | 5 | Blog post here: https://www.natashatherobot.com/button-animation-stackview/ 6 | -------------------------------------------------------------------------------- /StackViewAnimation.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | FA0352121D44032E000E9684 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0352111D44032E000E9684 /* AppDelegate.swift */; }; 11 | FA0352141D44032E000E9684 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0352131D44032E000E9684 /* ViewController.swift */; }; 12 | FA0352171D44032E000E9684 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA0352151D44032E000E9684 /* Main.storyboard */; }; 13 | FA0352191D44032E000E9684 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA0352181D44032E000E9684 /* Assets.xcassets */; }; 14 | FA03521C1D44032E000E9684 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA03521A1D44032E000E9684 /* LaunchScreen.storyboard */; }; 15 | FA0352271D44032E000E9684 /* StackViewAnimationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0352261D44032E000E9684 /* StackViewAnimationTests.swift */; }; 16 | FA0352321D44032E000E9684 /* StackViewAnimationUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0352311D44032E000E9684 /* StackViewAnimationUITests.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | FA0352231D44032E000E9684 /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = FA0352061D44032D000E9684 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = FA03520D1D44032D000E9684; 25 | remoteInfo = StackViewAnimation; 26 | }; 27 | FA03522E1D44032E000E9684 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = FA0352061D44032D000E9684 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = FA03520D1D44032D000E9684; 32 | remoteInfo = StackViewAnimation; 33 | }; 34 | /* End PBXContainerItemProxy section */ 35 | 36 | /* Begin PBXFileReference section */ 37 | FA03520E1D44032D000E9684 /* StackViewAnimation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StackViewAnimation.app; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | FA0352111D44032E000E9684 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 39 | FA0352131D44032E000E9684 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 40 | FA0352161D44032E000E9684 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 41 | FA0352181D44032E000E9684 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 42 | FA03521B1D44032E000E9684 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 43 | FA03521D1D44032E000E9684 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | FA0352221D44032E000E9684 /* StackViewAnimationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StackViewAnimationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | FA0352261D44032E000E9684 /* StackViewAnimationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StackViewAnimationTests.swift; sourceTree = ""; }; 46 | FA0352281D44032E000E9684 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | FA03522D1D44032E000E9684 /* StackViewAnimationUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StackViewAnimationUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | FA0352311D44032E000E9684 /* StackViewAnimationUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StackViewAnimationUITests.swift; sourceTree = ""; }; 49 | FA0352331D44032E000E9684 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | FA03520B1D44032D000E9684 /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | FA03521F1D44032E000E9684 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | FA03522A1D44032E000E9684 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | /* End PBXFrameworksBuildPhase section */ 75 | 76 | /* Begin PBXGroup section */ 77 | FA0352051D44032D000E9684 = { 78 | isa = PBXGroup; 79 | children = ( 80 | FA0352101D44032D000E9684 /* StackViewAnimation */, 81 | FA0352251D44032E000E9684 /* StackViewAnimationTests */, 82 | FA0352301D44032E000E9684 /* StackViewAnimationUITests */, 83 | FA03520F1D44032D000E9684 /* Products */, 84 | ); 85 | sourceTree = ""; 86 | }; 87 | FA03520F1D44032D000E9684 /* Products */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | FA03520E1D44032D000E9684 /* StackViewAnimation.app */, 91 | FA0352221D44032E000E9684 /* StackViewAnimationTests.xctest */, 92 | FA03522D1D44032E000E9684 /* StackViewAnimationUITests.xctest */, 93 | ); 94 | name = Products; 95 | sourceTree = ""; 96 | }; 97 | FA0352101D44032D000E9684 /* StackViewAnimation */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | FA0352111D44032E000E9684 /* AppDelegate.swift */, 101 | FA0352131D44032E000E9684 /* ViewController.swift */, 102 | FA0352151D44032E000E9684 /* Main.storyboard */, 103 | FA0352181D44032E000E9684 /* Assets.xcassets */, 104 | FA03521A1D44032E000E9684 /* LaunchScreen.storyboard */, 105 | FA03521D1D44032E000E9684 /* Info.plist */, 106 | ); 107 | path = StackViewAnimation; 108 | sourceTree = ""; 109 | }; 110 | FA0352251D44032E000E9684 /* StackViewAnimationTests */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | FA0352261D44032E000E9684 /* StackViewAnimationTests.swift */, 114 | FA0352281D44032E000E9684 /* Info.plist */, 115 | ); 116 | path = StackViewAnimationTests; 117 | sourceTree = ""; 118 | }; 119 | FA0352301D44032E000E9684 /* StackViewAnimationUITests */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | FA0352311D44032E000E9684 /* StackViewAnimationUITests.swift */, 123 | FA0352331D44032E000E9684 /* Info.plist */, 124 | ); 125 | path = StackViewAnimationUITests; 126 | sourceTree = ""; 127 | }; 128 | /* End PBXGroup section */ 129 | 130 | /* Begin PBXNativeTarget section */ 131 | FA03520D1D44032D000E9684 /* StackViewAnimation */ = { 132 | isa = PBXNativeTarget; 133 | buildConfigurationList = FA0352361D44032E000E9684 /* Build configuration list for PBXNativeTarget "StackViewAnimation" */; 134 | buildPhases = ( 135 | FA03520A1D44032D000E9684 /* Sources */, 136 | FA03520B1D44032D000E9684 /* Frameworks */, 137 | FA03520C1D44032D000E9684 /* Resources */, 138 | ); 139 | buildRules = ( 140 | ); 141 | dependencies = ( 142 | ); 143 | name = StackViewAnimation; 144 | productName = StackViewAnimation; 145 | productReference = FA03520E1D44032D000E9684 /* StackViewAnimation.app */; 146 | productType = "com.apple.product-type.application"; 147 | }; 148 | FA0352211D44032E000E9684 /* StackViewAnimationTests */ = { 149 | isa = PBXNativeTarget; 150 | buildConfigurationList = FA0352391D44032E000E9684 /* Build configuration list for PBXNativeTarget "StackViewAnimationTests" */; 151 | buildPhases = ( 152 | FA03521E1D44032E000E9684 /* Sources */, 153 | FA03521F1D44032E000E9684 /* Frameworks */, 154 | FA0352201D44032E000E9684 /* Resources */, 155 | ); 156 | buildRules = ( 157 | ); 158 | dependencies = ( 159 | FA0352241D44032E000E9684 /* PBXTargetDependency */, 160 | ); 161 | name = StackViewAnimationTests; 162 | productName = StackViewAnimationTests; 163 | productReference = FA0352221D44032E000E9684 /* StackViewAnimationTests.xctest */; 164 | productType = "com.apple.product-type.bundle.unit-test"; 165 | }; 166 | FA03522C1D44032E000E9684 /* StackViewAnimationUITests */ = { 167 | isa = PBXNativeTarget; 168 | buildConfigurationList = FA03523C1D44032E000E9684 /* Build configuration list for PBXNativeTarget "StackViewAnimationUITests" */; 169 | buildPhases = ( 170 | FA0352291D44032E000E9684 /* Sources */, 171 | FA03522A1D44032E000E9684 /* Frameworks */, 172 | FA03522B1D44032E000E9684 /* Resources */, 173 | ); 174 | buildRules = ( 175 | ); 176 | dependencies = ( 177 | FA03522F1D44032E000E9684 /* PBXTargetDependency */, 178 | ); 179 | name = StackViewAnimationUITests; 180 | productName = StackViewAnimationUITests; 181 | productReference = FA03522D1D44032E000E9684 /* StackViewAnimationUITests.xctest */; 182 | productType = "com.apple.product-type.bundle.ui-testing"; 183 | }; 184 | /* End PBXNativeTarget section */ 185 | 186 | /* Begin PBXProject section */ 187 | FA0352061D44032D000E9684 /* Project object */ = { 188 | isa = PBXProject; 189 | attributes = { 190 | LastSwiftUpdateCheck = 0800; 191 | LastUpgradeCheck = 0800; 192 | ORGANIZATIONNAME = "Natasha Murashev"; 193 | TargetAttributes = { 194 | FA03520D1D44032D000E9684 = { 195 | CreatedOnToolsVersion = 8.0; 196 | ProvisioningStyle = Automatic; 197 | }; 198 | FA0352211D44032E000E9684 = { 199 | CreatedOnToolsVersion = 8.0; 200 | ProvisioningStyle = Automatic; 201 | TestTargetID = FA03520D1D44032D000E9684; 202 | }; 203 | FA03522C1D44032E000E9684 = { 204 | CreatedOnToolsVersion = 8.0; 205 | ProvisioningStyle = Automatic; 206 | TestTargetID = FA03520D1D44032D000E9684; 207 | }; 208 | }; 209 | }; 210 | buildConfigurationList = FA0352091D44032D000E9684 /* Build configuration list for PBXProject "StackViewAnimation" */; 211 | compatibilityVersion = "Xcode 3.2"; 212 | developmentRegion = English; 213 | hasScannedForEncodings = 0; 214 | knownRegions = ( 215 | en, 216 | Base, 217 | ); 218 | mainGroup = FA0352051D44032D000E9684; 219 | productRefGroup = FA03520F1D44032D000E9684 /* Products */; 220 | projectDirPath = ""; 221 | projectRoot = ""; 222 | targets = ( 223 | FA03520D1D44032D000E9684 /* StackViewAnimation */, 224 | FA0352211D44032E000E9684 /* StackViewAnimationTests */, 225 | FA03522C1D44032E000E9684 /* StackViewAnimationUITests */, 226 | ); 227 | }; 228 | /* End PBXProject section */ 229 | 230 | /* Begin PBXResourcesBuildPhase section */ 231 | FA03520C1D44032D000E9684 /* Resources */ = { 232 | isa = PBXResourcesBuildPhase; 233 | buildActionMask = 2147483647; 234 | files = ( 235 | FA03521C1D44032E000E9684 /* LaunchScreen.storyboard in Resources */, 236 | FA0352191D44032E000E9684 /* Assets.xcassets in Resources */, 237 | FA0352171D44032E000E9684 /* Main.storyboard in Resources */, 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | FA0352201D44032E000E9684 /* Resources */ = { 242 | isa = PBXResourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | FA03522B1D44032E000E9684 /* Resources */ = { 249 | isa = PBXResourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | /* End PBXResourcesBuildPhase section */ 256 | 257 | /* Begin PBXSourcesBuildPhase section */ 258 | FA03520A1D44032D000E9684 /* Sources */ = { 259 | isa = PBXSourcesBuildPhase; 260 | buildActionMask = 2147483647; 261 | files = ( 262 | FA0352141D44032E000E9684 /* ViewController.swift in Sources */, 263 | FA0352121D44032E000E9684 /* AppDelegate.swift in Sources */, 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | FA03521E1D44032E000E9684 /* Sources */ = { 268 | isa = PBXSourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | FA0352271D44032E000E9684 /* StackViewAnimationTests.swift in Sources */, 272 | ); 273 | runOnlyForDeploymentPostprocessing = 0; 274 | }; 275 | FA0352291D44032E000E9684 /* Sources */ = { 276 | isa = PBXSourcesBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | FA0352321D44032E000E9684 /* StackViewAnimationUITests.swift in Sources */, 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | }; 283 | /* End PBXSourcesBuildPhase section */ 284 | 285 | /* Begin PBXTargetDependency section */ 286 | FA0352241D44032E000E9684 /* PBXTargetDependency */ = { 287 | isa = PBXTargetDependency; 288 | target = FA03520D1D44032D000E9684 /* StackViewAnimation */; 289 | targetProxy = FA0352231D44032E000E9684 /* PBXContainerItemProxy */; 290 | }; 291 | FA03522F1D44032E000E9684 /* PBXTargetDependency */ = { 292 | isa = PBXTargetDependency; 293 | target = FA03520D1D44032D000E9684 /* StackViewAnimation */; 294 | targetProxy = FA03522E1D44032E000E9684 /* PBXContainerItemProxy */; 295 | }; 296 | /* End PBXTargetDependency section */ 297 | 298 | /* Begin PBXVariantGroup section */ 299 | FA0352151D44032E000E9684 /* Main.storyboard */ = { 300 | isa = PBXVariantGroup; 301 | children = ( 302 | FA0352161D44032E000E9684 /* Base */, 303 | ); 304 | name = Main.storyboard; 305 | sourceTree = ""; 306 | }; 307 | FA03521A1D44032E000E9684 /* LaunchScreen.storyboard */ = { 308 | isa = PBXVariantGroup; 309 | children = ( 310 | FA03521B1D44032E000E9684 /* Base */, 311 | ); 312 | name = LaunchScreen.storyboard; 313 | sourceTree = ""; 314 | }; 315 | /* End PBXVariantGroup section */ 316 | 317 | /* Begin XCBuildConfiguration section */ 318 | FA0352341D44032E000E9684 /* Debug */ = { 319 | isa = XCBuildConfiguration; 320 | buildSettings = { 321 | ALWAYS_SEARCH_USER_PATHS = NO; 322 | CLANG_ANALYZER_NONNULL = YES; 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_DOCUMENTATION_COMMENTS = YES; 331 | CLANG_WARN_EMPTY_BODY = YES; 332 | CLANG_WARN_ENUM_CONVERSION = YES; 333 | CLANG_WARN_INT_CONVERSION = YES; 334 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 335 | CLANG_WARN_UNREACHABLE_CODE = YES; 336 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 337 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 338 | COPY_PHASE_STRIP = NO; 339 | DEBUG_INFORMATION_FORMAT = dwarf; 340 | ENABLE_STRICT_OBJC_MSGSEND = YES; 341 | ENABLE_TESTABILITY = YES; 342 | GCC_C_LANGUAGE_STANDARD = gnu99; 343 | GCC_DYNAMIC_NO_PIC = NO; 344 | GCC_NO_COMMON_BLOCKS = YES; 345 | GCC_OPTIMIZATION_LEVEL = 0; 346 | GCC_PREPROCESSOR_DEFINITIONS = ( 347 | "DEBUG=1", 348 | "$(inherited)", 349 | ); 350 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 351 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 352 | GCC_WARN_UNDECLARED_SELECTOR = YES; 353 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 354 | GCC_WARN_UNUSED_FUNCTION = YES; 355 | GCC_WARN_UNUSED_VARIABLE = YES; 356 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 357 | MTL_ENABLE_DEBUG_INFO = YES; 358 | ONLY_ACTIVE_ARCH = YES; 359 | SDKROOT = iphoneos; 360 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 361 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 362 | TARGETED_DEVICE_FAMILY = "1,2"; 363 | }; 364 | name = Debug; 365 | }; 366 | FA0352351D44032E000E9684 /* Release */ = { 367 | isa = XCBuildConfiguration; 368 | buildSettings = { 369 | ALWAYS_SEARCH_USER_PATHS = NO; 370 | CLANG_ANALYZER_NONNULL = YES; 371 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 372 | CLANG_CXX_LIBRARY = "libc++"; 373 | CLANG_ENABLE_MODULES = YES; 374 | CLANG_ENABLE_OBJC_ARC = YES; 375 | CLANG_WARN_BOOL_CONVERSION = YES; 376 | CLANG_WARN_CONSTANT_CONVERSION = YES; 377 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 378 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 379 | CLANG_WARN_EMPTY_BODY = YES; 380 | CLANG_WARN_ENUM_CONVERSION = YES; 381 | CLANG_WARN_INT_CONVERSION = YES; 382 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 402 | TARGETED_DEVICE_FAMILY = "1,2"; 403 | VALIDATE_PRODUCT = YES; 404 | }; 405 | name = Release; 406 | }; 407 | FA0352371D44032E000E9684 /* Debug */ = { 408 | isa = XCBuildConfiguration; 409 | buildSettings = { 410 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 411 | INFOPLIST_FILE = StackViewAnimation/Info.plist; 412 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 413 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.StackViewAnimation; 414 | PRODUCT_NAME = "$(TARGET_NAME)"; 415 | SWIFT_VERSION = 3.0; 416 | }; 417 | name = Debug; 418 | }; 419 | FA0352381D44032E000E9684 /* Release */ = { 420 | isa = XCBuildConfiguration; 421 | buildSettings = { 422 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 423 | INFOPLIST_FILE = StackViewAnimation/Info.plist; 424 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 425 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.StackViewAnimation; 426 | PRODUCT_NAME = "$(TARGET_NAME)"; 427 | SWIFT_VERSION = 3.0; 428 | }; 429 | name = Release; 430 | }; 431 | FA03523A1D44032E000E9684 /* Debug */ = { 432 | isa = XCBuildConfiguration; 433 | buildSettings = { 434 | BUNDLE_LOADER = "$(TEST_HOST)"; 435 | INFOPLIST_FILE = StackViewAnimationTests/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 437 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.StackViewAnimationTests; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_VERSION = 3.0; 440 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StackViewAnimation.app/StackViewAnimation"; 441 | }; 442 | name = Debug; 443 | }; 444 | FA03523B1D44032E000E9684 /* Release */ = { 445 | isa = XCBuildConfiguration; 446 | buildSettings = { 447 | BUNDLE_LOADER = "$(TEST_HOST)"; 448 | INFOPLIST_FILE = StackViewAnimationTests/Info.plist; 449 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 450 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.StackViewAnimationTests; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | SWIFT_VERSION = 3.0; 453 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StackViewAnimation.app/StackViewAnimation"; 454 | }; 455 | name = Release; 456 | }; 457 | FA03523D1D44032E000E9684 /* Debug */ = { 458 | isa = XCBuildConfiguration; 459 | buildSettings = { 460 | INFOPLIST_FILE = StackViewAnimationUITests/Info.plist; 461 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 462 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.StackViewAnimationUITests; 463 | PRODUCT_NAME = "$(TARGET_NAME)"; 464 | SWIFT_VERSION = 3.0; 465 | TEST_TARGET_NAME = StackViewAnimation; 466 | }; 467 | name = Debug; 468 | }; 469 | FA03523E1D44032E000E9684 /* Release */ = { 470 | isa = XCBuildConfiguration; 471 | buildSettings = { 472 | INFOPLIST_FILE = StackViewAnimationUITests/Info.plist; 473 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 474 | PRODUCT_BUNDLE_IDENTIFIER = com.natashatherobot.StackViewAnimationUITests; 475 | PRODUCT_NAME = "$(TARGET_NAME)"; 476 | SWIFT_VERSION = 3.0; 477 | TEST_TARGET_NAME = StackViewAnimation; 478 | }; 479 | name = Release; 480 | }; 481 | /* End XCBuildConfiguration section */ 482 | 483 | /* Begin XCConfigurationList section */ 484 | FA0352091D44032D000E9684 /* Build configuration list for PBXProject "StackViewAnimation" */ = { 485 | isa = XCConfigurationList; 486 | buildConfigurations = ( 487 | FA0352341D44032E000E9684 /* Debug */, 488 | FA0352351D44032E000E9684 /* Release */, 489 | ); 490 | defaultConfigurationIsVisible = 0; 491 | defaultConfigurationName = Release; 492 | }; 493 | FA0352361D44032E000E9684 /* Build configuration list for PBXNativeTarget "StackViewAnimation" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | FA0352371D44032E000E9684 /* Debug */, 497 | FA0352381D44032E000E9684 /* Release */, 498 | ); 499 | defaultConfigurationIsVisible = 0; 500 | }; 501 | FA0352391D44032E000E9684 /* Build configuration list for PBXNativeTarget "StackViewAnimationTests" */ = { 502 | isa = XCConfigurationList; 503 | buildConfigurations = ( 504 | FA03523A1D44032E000E9684 /* Debug */, 505 | FA03523B1D44032E000E9684 /* Release */, 506 | ); 507 | defaultConfigurationIsVisible = 0; 508 | }; 509 | FA03523C1D44032E000E9684 /* Build configuration list for PBXNativeTarget "StackViewAnimationUITests" */ = { 510 | isa = XCConfigurationList; 511 | buildConfigurations = ( 512 | FA03523D1D44032E000E9684 /* Debug */, 513 | FA03523E1D44032E000E9684 /* Release */, 514 | ); 515 | defaultConfigurationIsVisible = 0; 516 | }; 517 | /* End XCConfigurationList section */ 518 | }; 519 | rootObject = FA0352061D44032D000E9684 /* Project object */; 520 | } 521 | -------------------------------------------------------------------------------- /StackViewAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /StackViewAnimation/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // StackViewAnimation 4 | // 5 | // Created by Natasha Murashev on 7/23/16. 6 | // Copyright © 2016 Natasha Murashev. 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 invalidate graphics rendering callbacks. 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 active 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 | -------------------------------------------------------------------------------- /StackViewAnimation/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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /StackViewAnimation/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 | -------------------------------------------------------------------------------- /StackViewAnimation/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 | 29 | 32 | 35 | 38 | 41 | 44 | 45 | 46 | 51 | 56 | 57 | 58 | 64 | 67 | 70 | 73 | 76 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /StackViewAnimation/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 | 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 | UIRequiresFullScreen 32 | 33 | UIStatusBarHidden 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /StackViewAnimation/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // StackViewAnimation 4 | // 5 | // Created by Natasha Murashev on 7/23/16. 6 | // Copyright © 2016 Natasha Murashev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | @IBOutlet var emojiButtons: [UIButton]! { 14 | didSet { 15 | emojiButtons.forEach { 16 | $0.isHidden = true 17 | } 18 | } 19 | } 20 | 21 | @IBOutlet var emojiButtonsAutolayout: [UIButton]! { 22 | didSet { 23 | emojiButtonsAutolayout.forEach { 24 | $0.isHidden = true 25 | } 26 | } 27 | } 28 | 29 | 30 | override func viewDidLoad() { 31 | super.viewDidLoad() 32 | // Do any additional setup after loading the view, typically from a nib. 33 | } 34 | 35 | @IBAction func onSettingsAutoLayoutButtonTap(_ sender: AnyObject) { 36 | UIView.animate(withDuration: 0.3) { 37 | self.emojiButtonsAutolayout.forEach { 38 | $0.isHidden = !$0.isHidden 39 | } 40 | } 41 | 42 | } 43 | 44 | @IBAction func onSettingsButtonTap(_ sender: AnyObject) { 45 | UIView.animate(withDuration: 0.3) { 46 | self.emojiButtons.forEach { 47 | $0.isHidden = !$0.isHidden 48 | } 49 | } 50 | 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /StackViewAnimationTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /StackViewAnimationTests/StackViewAnimationTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StackViewAnimationTests.swift 3 | // StackViewAnimationTests 4 | // 5 | // Created by Natasha Murashev on 7/23/16. 6 | // Copyright © 2016 Natasha Murashev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import StackViewAnimation 11 | 12 | class StackViewAnimationTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /StackViewAnimationUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /StackViewAnimationUITests/StackViewAnimationUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StackViewAnimationUITests.swift 3 | // StackViewAnimationUITests 4 | // 5 | // Created by Natasha Murashev on 7/23/16. 6 | // Copyright © 2016 Natasha Murashev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class StackViewAnimationUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------