├── .gitignore ├── .travis.yml ├── Example ├── Podfile ├── Podfile.lock ├── StackViewSeparator.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── StackViewSeparator-Example.xcscheme ├── StackViewSeparator.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── StackViewSeparator │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── Tests │ ├── Info.plist │ ├── ReferenceImages_64 │ └── StackViewSeparator_Tests.Tests │ │ ├── testHorizontalAxis@2x.png │ │ ├── testHorizontalAxisWithHiddenView@2x.png │ │ └── testVerticalAxis@2x.png │ └── Tests.swift ├── Images └── storyboard_designables.png ├── LICENSE ├── README.md ├── StackViewSeparator.podspec ├── StackViewSeparator ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── UIStackView+Extension.swift │ └── UIStackView+Swizzler.swift └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | Pods/ 38 | Example/Pods/ -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/StackViewSeparator.xcworkspace -scheme StackViewSeparator-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'StackViewSeparator_Example' do 4 | pod 'StackViewSeparator', :path => '../' 5 | 6 | target 'StackViewSeparator_Tests' do 7 | inherit! :search_paths 8 | pod 'StackViewSeparator', :path => '../' 9 | pod 'iOSSnapshotTestCase' 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - iOSSnapshotTestCase (3.0.0): 3 | - iOSSnapshotTestCase/SwiftSupport (= 3.0.0) 4 | - iOSSnapshotTestCase/Core (3.0.0) 5 | - iOSSnapshotTestCase/SwiftSupport (3.0.0): 6 | - iOSSnapshotTestCase/Core 7 | - StackViewSeparator (0.1.2) 8 | 9 | DEPENDENCIES: 10 | - iOSSnapshotTestCase 11 | - StackViewSeparator (from `../`) 12 | 13 | SPEC REPOS: 14 | https://github.com/CocoaPods/Specs.git: 15 | - iOSSnapshotTestCase 16 | 17 | EXTERNAL SOURCES: 18 | StackViewSeparator: 19 | :path: "../" 20 | 21 | SPEC CHECKSUMS: 22 | iOSSnapshotTestCase: 23984ffe05289728d646cbb6a7a10b4fb1c93440 23 | StackViewSeparator: 3461bedd38457ae5fa503c7d8904a7b2ad41fd45 24 | 25 | PODFILE CHECKSUM: 677c39eebdfa6beafc5feb36e65fae9142784248 26 | 27 | COCOAPODS: 1.9.1 28 | -------------------------------------------------------------------------------- /Example/StackViewSeparator.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 007D62EFB37C99018C0E0CE8 /* Pods_StackViewSeparator_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 638CA7ED8C63DF43FE1022CF /* Pods_StackViewSeparator_Example.framework */; }; 11 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 12 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 13 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 14 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 15 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 16 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 17 | 8000E9AC7280F3DF6EF0DFBE /* Pods_StackViewSeparator_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8EFAC345859A793CD6E9123A /* Pods_StackViewSeparator_Tests.framework */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 26 | remoteInfo = StackViewSeparator; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 08FA717B3F9EDABD5BA7B8A0 /* Pods-StackViewSeparator_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StackViewSeparator_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-StackViewSeparator_Tests/Pods-StackViewSeparator_Tests.release.xcconfig"; sourceTree = ""; }; 32 | 09808936F4C237F8A2CCC232 /* Pods-StackViewSeparator_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StackViewSeparator_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-StackViewSeparator_Example/Pods-StackViewSeparator_Example.debug.xcconfig"; sourceTree = ""; }; 33 | 4CC3380F25AE4F94CD5F656F /* Pods-StackViewSeparator_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StackViewSeparator_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-StackViewSeparator_Tests/Pods-StackViewSeparator_Tests.debug.xcconfig"; sourceTree = ""; }; 34 | 4F7CBF39AAA3FBCC70BBC846 /* Pods-StackViewSeparator_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StackViewSeparator_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-StackViewSeparator_Example/Pods-StackViewSeparator_Example.release.xcconfig"; sourceTree = ""; }; 35 | 607FACD01AFB9204008FA782 /* StackViewSeparator_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StackViewSeparator_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 37 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 38 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 39 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 40 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 41 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 42 | 607FACE51AFB9204008FA782 /* StackViewSeparator_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StackViewSeparator_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 45 | 638CA7ED8C63DF43FE1022CF /* Pods_StackViewSeparator_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_StackViewSeparator_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 7003F3B005E4B341941FA3B4 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 47 | 8EFAC345859A793CD6E9123A /* Pods_StackViewSeparator_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_StackViewSeparator_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 90624B278744500A21A7F696 /* StackViewSeparator.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = StackViewSeparator.podspec; path = ../StackViewSeparator.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 49 | FCC857255CAF5BFC3ACC03D3 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 007D62EFB37C99018C0E0CE8 /* Pods_StackViewSeparator_Example.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 8000E9AC7280F3DF6EF0DFBE /* Pods_StackViewSeparator_Tests.framework in Frameworks */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXFrameworksBuildPhase section */ 70 | 71 | /* Begin PBXGroup section */ 72 | 607FACC71AFB9204008FA782 = { 73 | isa = PBXGroup; 74 | children = ( 75 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 76 | 607FACD21AFB9204008FA782 /* Example for StackViewSeparator */, 77 | 607FACE81AFB9204008FA782 /* Tests */, 78 | 607FACD11AFB9204008FA782 /* Products */, 79 | D5F9A9F4AC8ED94666B73A70 /* Pods */, 80 | 760D56D54120B81503833DB3 /* Frameworks */, 81 | ); 82 | sourceTree = ""; 83 | }; 84 | 607FACD11AFB9204008FA782 /* Products */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 607FACD01AFB9204008FA782 /* StackViewSeparator_Example.app */, 88 | 607FACE51AFB9204008FA782 /* StackViewSeparator_Tests.xctest */, 89 | ); 90 | name = Products; 91 | sourceTree = ""; 92 | }; 93 | 607FACD21AFB9204008FA782 /* Example for StackViewSeparator */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 97 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 98 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 99 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 100 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 101 | 607FACD31AFB9204008FA782 /* Supporting Files */, 102 | ); 103 | name = "Example for StackViewSeparator"; 104 | path = StackViewSeparator; 105 | sourceTree = ""; 106 | }; 107 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 607FACD41AFB9204008FA782 /* Info.plist */, 111 | ); 112 | name = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | 607FACE81AFB9204008FA782 /* Tests */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 119 | 607FACE91AFB9204008FA782 /* Supporting Files */, 120 | ); 121 | path = Tests; 122 | sourceTree = ""; 123 | }; 124 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 607FACEA1AFB9204008FA782 /* Info.plist */, 128 | ); 129 | name = "Supporting Files"; 130 | sourceTree = ""; 131 | }; 132 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 90624B278744500A21A7F696 /* StackViewSeparator.podspec */, 136 | FCC857255CAF5BFC3ACC03D3 /* README.md */, 137 | 7003F3B005E4B341941FA3B4 /* LICENSE */, 138 | ); 139 | name = "Podspec Metadata"; 140 | sourceTree = ""; 141 | }; 142 | 760D56D54120B81503833DB3 /* Frameworks */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 638CA7ED8C63DF43FE1022CF /* Pods_StackViewSeparator_Example.framework */, 146 | 8EFAC345859A793CD6E9123A /* Pods_StackViewSeparator_Tests.framework */, 147 | ); 148 | name = Frameworks; 149 | sourceTree = ""; 150 | }; 151 | D5F9A9F4AC8ED94666B73A70 /* Pods */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 09808936F4C237F8A2CCC232 /* Pods-StackViewSeparator_Example.debug.xcconfig */, 155 | 4F7CBF39AAA3FBCC70BBC846 /* Pods-StackViewSeparator_Example.release.xcconfig */, 156 | 4CC3380F25AE4F94CD5F656F /* Pods-StackViewSeparator_Tests.debug.xcconfig */, 157 | 08FA717B3F9EDABD5BA7B8A0 /* Pods-StackViewSeparator_Tests.release.xcconfig */, 158 | ); 159 | name = Pods; 160 | sourceTree = ""; 161 | }; 162 | /* End PBXGroup section */ 163 | 164 | /* Begin PBXNativeTarget section */ 165 | 607FACCF1AFB9204008FA782 /* StackViewSeparator_Example */ = { 166 | isa = PBXNativeTarget; 167 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "StackViewSeparator_Example" */; 168 | buildPhases = ( 169 | 22AEA9EEDC50E9278B3E9317 /* [CP] Check Pods Manifest.lock */, 170 | 607FACCC1AFB9204008FA782 /* Sources */, 171 | 607FACCD1AFB9204008FA782 /* Frameworks */, 172 | 607FACCE1AFB9204008FA782 /* Resources */, 173 | EE1608851F92E9B18F37EC46 /* [CP] Embed Pods Frameworks */, 174 | ); 175 | buildRules = ( 176 | ); 177 | dependencies = ( 178 | ); 179 | name = StackViewSeparator_Example; 180 | productName = StackViewSeparator; 181 | productReference = 607FACD01AFB9204008FA782 /* StackViewSeparator_Example.app */; 182 | productType = "com.apple.product-type.application"; 183 | }; 184 | 607FACE41AFB9204008FA782 /* StackViewSeparator_Tests */ = { 185 | isa = PBXNativeTarget; 186 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "StackViewSeparator_Tests" */; 187 | buildPhases = ( 188 | D143B019DADAA648FE00491C /* [CP] Check Pods Manifest.lock */, 189 | 607FACE11AFB9204008FA782 /* Sources */, 190 | 607FACE21AFB9204008FA782 /* Frameworks */, 191 | 607FACE31AFB9204008FA782 /* Resources */, 192 | C85E61C838A04DA3E6EC9314 /* [CP] Embed Pods Frameworks */, 193 | ); 194 | buildRules = ( 195 | ); 196 | dependencies = ( 197 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 198 | ); 199 | name = StackViewSeparator_Tests; 200 | productName = Tests; 201 | productReference = 607FACE51AFB9204008FA782 /* StackViewSeparator_Tests.xctest */; 202 | productType = "com.apple.product-type.bundle.unit-test"; 203 | }; 204 | /* End PBXNativeTarget section */ 205 | 206 | /* Begin PBXProject section */ 207 | 607FACC81AFB9204008FA782 /* Project object */ = { 208 | isa = PBXProject; 209 | attributes = { 210 | LastSwiftUpdateCheck = 0830; 211 | LastUpgradeCheck = 0830; 212 | ORGANIZATIONNAME = CocoaPods; 213 | TargetAttributes = { 214 | 607FACCF1AFB9204008FA782 = { 215 | CreatedOnToolsVersion = 6.3.1; 216 | LastSwiftMigration = 0900; 217 | }; 218 | 607FACE41AFB9204008FA782 = { 219 | CreatedOnToolsVersion = 6.3.1; 220 | LastSwiftMigration = 0900; 221 | TestTargetID = 607FACCF1AFB9204008FA782; 222 | }; 223 | }; 224 | }; 225 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "StackViewSeparator" */; 226 | compatibilityVersion = "Xcode 3.2"; 227 | developmentRegion = English; 228 | hasScannedForEncodings = 0; 229 | knownRegions = ( 230 | en, 231 | Base, 232 | ); 233 | mainGroup = 607FACC71AFB9204008FA782; 234 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 235 | projectDirPath = ""; 236 | projectRoot = ""; 237 | targets = ( 238 | 607FACCF1AFB9204008FA782 /* StackViewSeparator_Example */, 239 | 607FACE41AFB9204008FA782 /* StackViewSeparator_Tests */, 240 | ); 241 | }; 242 | /* End PBXProject section */ 243 | 244 | /* Begin PBXResourcesBuildPhase section */ 245 | 607FACCE1AFB9204008FA782 /* Resources */ = { 246 | isa = PBXResourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 250 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 251 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | 607FACE31AFB9204008FA782 /* Resources */ = { 256 | isa = PBXResourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | /* End PBXResourcesBuildPhase section */ 263 | 264 | /* Begin PBXShellScriptBuildPhase section */ 265 | 22AEA9EEDC50E9278B3E9317 /* [CP] Check Pods Manifest.lock */ = { 266 | isa = PBXShellScriptBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | ); 270 | inputPaths = ( 271 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 272 | "${PODS_ROOT}/Manifest.lock", 273 | ); 274 | name = "[CP] Check Pods Manifest.lock"; 275 | outputPaths = ( 276 | "$(DERIVED_FILE_DIR)/Pods-StackViewSeparator_Example-checkManifestLockResult.txt", 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | shellPath = /bin/sh; 280 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 281 | showEnvVarsInLog = 0; 282 | }; 283 | C85E61C838A04DA3E6EC9314 /* [CP] Embed Pods Frameworks */ = { 284 | isa = PBXShellScriptBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | ); 288 | inputPaths = ( 289 | "${PODS_ROOT}/Target Support Files/Pods-StackViewSeparator_Tests/Pods-StackViewSeparator_Tests-frameworks.sh", 290 | "${BUILT_PRODUCTS_DIR}/StackViewSeparator/StackViewSeparator.framework", 291 | "${BUILT_PRODUCTS_DIR}/iOSSnapshotTestCase/FBSnapshotTestCase.framework", 292 | ); 293 | name = "[CP] Embed Pods Frameworks"; 294 | outputPaths = ( 295 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/StackViewSeparator.framework", 296 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSnapshotTestCase.framework", 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | shellPath = /bin/sh; 300 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-StackViewSeparator_Tests/Pods-StackViewSeparator_Tests-frameworks.sh\"\n"; 301 | showEnvVarsInLog = 0; 302 | }; 303 | D143B019DADAA648FE00491C /* [CP] Check Pods Manifest.lock */ = { 304 | isa = PBXShellScriptBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | ); 308 | inputPaths = ( 309 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 310 | "${PODS_ROOT}/Manifest.lock", 311 | ); 312 | name = "[CP] Check Pods Manifest.lock"; 313 | outputPaths = ( 314 | "$(DERIVED_FILE_DIR)/Pods-StackViewSeparator_Tests-checkManifestLockResult.txt", 315 | ); 316 | runOnlyForDeploymentPostprocessing = 0; 317 | shellPath = /bin/sh; 318 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 319 | showEnvVarsInLog = 0; 320 | }; 321 | EE1608851F92E9B18F37EC46 /* [CP] Embed Pods Frameworks */ = { 322 | isa = PBXShellScriptBuildPhase; 323 | buildActionMask = 2147483647; 324 | files = ( 325 | ); 326 | inputPaths = ( 327 | "${PODS_ROOT}/Target Support Files/Pods-StackViewSeparator_Example/Pods-StackViewSeparator_Example-frameworks.sh", 328 | "${BUILT_PRODUCTS_DIR}/StackViewSeparator/StackViewSeparator.framework", 329 | ); 330 | name = "[CP] Embed Pods Frameworks"; 331 | outputPaths = ( 332 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/StackViewSeparator.framework", 333 | ); 334 | runOnlyForDeploymentPostprocessing = 0; 335 | shellPath = /bin/sh; 336 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-StackViewSeparator_Example/Pods-StackViewSeparator_Example-frameworks.sh\"\n"; 337 | showEnvVarsInLog = 0; 338 | }; 339 | /* End PBXShellScriptBuildPhase section */ 340 | 341 | /* Begin PBXSourcesBuildPhase section */ 342 | 607FACCC1AFB9204008FA782 /* Sources */ = { 343 | isa = PBXSourcesBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 347 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 348 | ); 349 | runOnlyForDeploymentPostprocessing = 0; 350 | }; 351 | 607FACE11AFB9204008FA782 /* Sources */ = { 352 | isa = PBXSourcesBuildPhase; 353 | buildActionMask = 2147483647; 354 | files = ( 355 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 356 | ); 357 | runOnlyForDeploymentPostprocessing = 0; 358 | }; 359 | /* End PBXSourcesBuildPhase section */ 360 | 361 | /* Begin PBXTargetDependency section */ 362 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 363 | isa = PBXTargetDependency; 364 | target = 607FACCF1AFB9204008FA782 /* StackViewSeparator_Example */; 365 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 366 | }; 367 | /* End PBXTargetDependency section */ 368 | 369 | /* Begin PBXVariantGroup section */ 370 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 371 | isa = PBXVariantGroup; 372 | children = ( 373 | 607FACDA1AFB9204008FA782 /* Base */, 374 | ); 375 | name = Main.storyboard; 376 | sourceTree = ""; 377 | }; 378 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 379 | isa = PBXVariantGroup; 380 | children = ( 381 | 607FACDF1AFB9204008FA782 /* Base */, 382 | ); 383 | name = LaunchScreen.xib; 384 | sourceTree = ""; 385 | }; 386 | /* End PBXVariantGroup section */ 387 | 388 | /* Begin XCBuildConfiguration section */ 389 | 607FACED1AFB9204008FA782 /* Debug */ = { 390 | isa = XCBuildConfiguration; 391 | buildSettings = { 392 | ALWAYS_SEARCH_USER_PATHS = NO; 393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 394 | CLANG_CXX_LIBRARY = "libc++"; 395 | CLANG_ENABLE_MODULES = YES; 396 | CLANG_ENABLE_OBJC_ARC = YES; 397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 398 | CLANG_WARN_BOOL_CONVERSION = YES; 399 | CLANG_WARN_COMMA = YES; 400 | CLANG_WARN_CONSTANT_CONVERSION = YES; 401 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 402 | CLANG_WARN_EMPTY_BODY = YES; 403 | CLANG_WARN_ENUM_CONVERSION = YES; 404 | CLANG_WARN_INFINITE_RECURSION = YES; 405 | CLANG_WARN_INT_CONVERSION = YES; 406 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 407 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 409 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 410 | CLANG_WARN_STRICT_PROTOTYPES = YES; 411 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 412 | CLANG_WARN_UNREACHABLE_CODE = YES; 413 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 414 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 415 | COPY_PHASE_STRIP = NO; 416 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 417 | ENABLE_STRICT_OBJC_MSGSEND = YES; 418 | ENABLE_TESTABILITY = YES; 419 | GCC_C_LANGUAGE_STANDARD = gnu99; 420 | GCC_DYNAMIC_NO_PIC = NO; 421 | GCC_NO_COMMON_BLOCKS = YES; 422 | GCC_OPTIMIZATION_LEVEL = 0; 423 | GCC_PREPROCESSOR_DEFINITIONS = ( 424 | "DEBUG=1", 425 | "$(inherited)", 426 | ); 427 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 428 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 429 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 430 | GCC_WARN_UNDECLARED_SELECTOR = YES; 431 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 432 | GCC_WARN_UNUSED_FUNCTION = YES; 433 | GCC_WARN_UNUSED_VARIABLE = YES; 434 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 435 | MTL_ENABLE_DEBUG_INFO = YES; 436 | ONLY_ACTIVE_ARCH = YES; 437 | SDKROOT = iphoneos; 438 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 439 | }; 440 | name = Debug; 441 | }; 442 | 607FACEE1AFB9204008FA782 /* Release */ = { 443 | isa = XCBuildConfiguration; 444 | buildSettings = { 445 | ALWAYS_SEARCH_USER_PATHS = NO; 446 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 447 | CLANG_CXX_LIBRARY = "libc++"; 448 | CLANG_ENABLE_MODULES = YES; 449 | CLANG_ENABLE_OBJC_ARC = YES; 450 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 451 | CLANG_WARN_BOOL_CONVERSION = YES; 452 | CLANG_WARN_COMMA = YES; 453 | CLANG_WARN_CONSTANT_CONVERSION = YES; 454 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 455 | CLANG_WARN_EMPTY_BODY = YES; 456 | CLANG_WARN_ENUM_CONVERSION = YES; 457 | CLANG_WARN_INFINITE_RECURSION = YES; 458 | CLANG_WARN_INT_CONVERSION = YES; 459 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 460 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 461 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 462 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 463 | CLANG_WARN_STRICT_PROTOTYPES = YES; 464 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 465 | CLANG_WARN_UNREACHABLE_CODE = YES; 466 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 467 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 468 | COPY_PHASE_STRIP = NO; 469 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 470 | ENABLE_NS_ASSERTIONS = NO; 471 | ENABLE_STRICT_OBJC_MSGSEND = YES; 472 | GCC_C_LANGUAGE_STANDARD = gnu99; 473 | GCC_NO_COMMON_BLOCKS = YES; 474 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 475 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 476 | GCC_WARN_UNDECLARED_SELECTOR = YES; 477 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 478 | GCC_WARN_UNUSED_FUNCTION = YES; 479 | GCC_WARN_UNUSED_VARIABLE = YES; 480 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 481 | MTL_ENABLE_DEBUG_INFO = NO; 482 | SDKROOT = iphoneos; 483 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 484 | VALIDATE_PRODUCT = YES; 485 | }; 486 | name = Release; 487 | }; 488 | 607FACF01AFB9204008FA782 /* Debug */ = { 489 | isa = XCBuildConfiguration; 490 | baseConfigurationReference = 09808936F4C237F8A2CCC232 /* Pods-StackViewSeparator_Example.debug.xcconfig */; 491 | buildSettings = { 492 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 493 | INFOPLIST_FILE = StackViewSeparator/Info.plist; 494 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 495 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 496 | MODULE_NAME = ExampleApp; 497 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 500 | SWIFT_VERSION = 4.0; 501 | }; 502 | name = Debug; 503 | }; 504 | 607FACF11AFB9204008FA782 /* Release */ = { 505 | isa = XCBuildConfiguration; 506 | baseConfigurationReference = 4F7CBF39AAA3FBCC70BBC846 /* Pods-StackViewSeparator_Example.release.xcconfig */; 507 | buildSettings = { 508 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 509 | INFOPLIST_FILE = StackViewSeparator/Info.plist; 510 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 511 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 512 | MODULE_NAME = ExampleApp; 513 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 514 | PRODUCT_NAME = "$(TARGET_NAME)"; 515 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 516 | SWIFT_VERSION = 4.0; 517 | }; 518 | name = Release; 519 | }; 520 | 607FACF31AFB9204008FA782 /* Debug */ = { 521 | isa = XCBuildConfiguration; 522 | baseConfigurationReference = 4CC3380F25AE4F94CD5F656F /* Pods-StackViewSeparator_Tests.debug.xcconfig */; 523 | buildSettings = { 524 | FRAMEWORK_SEARCH_PATHS = ( 525 | "$(SDKROOT)/Developer/Library/Frameworks", 526 | "$(inherited)", 527 | ); 528 | GCC_PREPROCESSOR_DEFINITIONS = ( 529 | "DEBUG=1", 530 | "$(inherited)", 531 | ); 532 | INFOPLIST_FILE = Tests/Info.plist; 533 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 534 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 535 | PRODUCT_NAME = "$(TARGET_NAME)"; 536 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 537 | SWIFT_VERSION = 4.0; 538 | }; 539 | name = Debug; 540 | }; 541 | 607FACF41AFB9204008FA782 /* Release */ = { 542 | isa = XCBuildConfiguration; 543 | baseConfigurationReference = 08FA717B3F9EDABD5BA7B8A0 /* Pods-StackViewSeparator_Tests.release.xcconfig */; 544 | buildSettings = { 545 | FRAMEWORK_SEARCH_PATHS = ( 546 | "$(SDKROOT)/Developer/Library/Frameworks", 547 | "$(inherited)", 548 | ); 549 | INFOPLIST_FILE = Tests/Info.plist; 550 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 551 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 552 | PRODUCT_NAME = "$(TARGET_NAME)"; 553 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 554 | SWIFT_VERSION = 4.0; 555 | }; 556 | name = Release; 557 | }; 558 | /* End XCBuildConfiguration section */ 559 | 560 | /* Begin XCConfigurationList section */ 561 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "StackViewSeparator" */ = { 562 | isa = XCConfigurationList; 563 | buildConfigurations = ( 564 | 607FACED1AFB9204008FA782 /* Debug */, 565 | 607FACEE1AFB9204008FA782 /* Release */, 566 | ); 567 | defaultConfigurationIsVisible = 0; 568 | defaultConfigurationName = Release; 569 | }; 570 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "StackViewSeparator_Example" */ = { 571 | isa = XCConfigurationList; 572 | buildConfigurations = ( 573 | 607FACF01AFB9204008FA782 /* Debug */, 574 | 607FACF11AFB9204008FA782 /* Release */, 575 | ); 576 | defaultConfigurationIsVisible = 0; 577 | defaultConfigurationName = Release; 578 | }; 579 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "StackViewSeparator_Tests" */ = { 580 | isa = XCConfigurationList; 581 | buildConfigurations = ( 582 | 607FACF31AFB9204008FA782 /* Debug */, 583 | 607FACF41AFB9204008FA782 /* Release */, 584 | ); 585 | defaultConfigurationIsVisible = 0; 586 | defaultConfigurationName = Release; 587 | }; 588 | /* End XCConfigurationList section */ 589 | }; 590 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 591 | } 592 | -------------------------------------------------------------------------------- /Example/StackViewSeparator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/StackViewSeparator.xcodeproj/xcshareddata/xcschemes/StackViewSeparator-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 93 | 94 | 98 | 99 | 100 | 101 | 102 | 103 | 109 | 111 | 117 | 118 | 119 | 120 | 122 | 123 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /Example/StackViewSeparator.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/StackViewSeparator.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/StackViewSeparator/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // StackViewSeparator 4 | // 5 | // Created by Baris Atamer on 04/04/2018. 6 | // Copyright (c) 2018 Baris Atamer. 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 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/StackViewSeparator/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Example/StackViewSeparator/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 | 31 | 32 | 33 | 34 | 41 | 48 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 81 | 88 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /Example/StackViewSeparator/Images.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" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/StackViewSeparator/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Example/StackViewSeparator/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // StackViewSeparator 4 | // 5 | // Created by Baris Atamer on 04/04/2018. 6 | // Copyright (c) 2018 Baris Atamer. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import StackViewSeparator 11 | 12 | class ViewController: UIViewController { 13 | 14 | // MARK: - IB Outlet 15 | 16 | @IBOutlet weak var horizontalStackView: UIStackView! 17 | @IBOutlet weak var verticalStackView: UIStackView! 18 | 19 | @IBOutlet weak var labelLengthRatio: UILabel! 20 | @IBOutlet weak var labelThickness: UILabel! 21 | @IBOutlet weak var labelCornerRadius: UILabel! 22 | 23 | 24 | // MARK: - Private Properties 25 | 26 | private var separatorLengthRatio: CGFloat = 1 { 27 | didSet { 28 | horizontalStackView.separatorPercent = separatorLengthRatio * 0.01 29 | verticalStackView.separatorPercent = separatorLengthRatio * 0.01 30 | labelLengthRatio.text = "Length Ratio: \(separatorLengthRatio * 0.01)" 31 | } 32 | } 33 | 34 | private var separatorThickness: CGFloat = 1.0 { 35 | didSet { 36 | horizontalStackView.separatorThickness = separatorThickness 37 | verticalStackView.separatorThickness = separatorThickness 38 | labelThickness.text = "Thickness: \(Int(separatorThickness))" 39 | } 40 | } 41 | 42 | private var separatorCornerRadius: CGFloat = 3.0 { 43 | didSet { 44 | horizontalStackView.separatorCornerRadius = separatorCornerRadius 45 | verticalStackView.separatorCornerRadius = separatorCornerRadius 46 | labelCornerRadius.text = "Corner Radius: \(separatorCornerRadius)" 47 | } 48 | } 49 | 50 | 51 | // MARK: - View Cycle 52 | 53 | override func viewDidLoad() { 54 | super.viewDidLoad() 55 | 56 | horizontalStackView.addSeparators() 57 | verticalStackView.addSeparators() 58 | } 59 | 60 | 61 | // MARK: - Actions 62 | 63 | @IBAction func lengthRatioValueChanged(_ stepper: UIStepper) { 64 | separatorLengthRatio = CGFloat(stepper.value) 65 | } 66 | 67 | @IBAction func thicknessValueChanged(_ stepper: UIStepper) { 68 | separatorThickness = CGFloat(stepper.value) 69 | } 70 | 71 | @IBAction func cornerRadiusValueChanged(_ stepper: UIStepper) { 72 | separatorCornerRadius = CGFloat(stepper.value) 73 | } 74 | 75 | } 76 | 77 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/ReferenceImages_64/StackViewSeparator_Tests.Tests/testHorizontalAxis@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/barisatamer/StackViewSeparator/e2bbc46f17eecdcc80780165f2ca3af28797ca43/Example/Tests/ReferenceImages_64/StackViewSeparator_Tests.Tests/testHorizontalAxis@2x.png -------------------------------------------------------------------------------- /Example/Tests/ReferenceImages_64/StackViewSeparator_Tests.Tests/testHorizontalAxisWithHiddenView@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/barisatamer/StackViewSeparator/e2bbc46f17eecdcc80780165f2ca3af28797ca43/Example/Tests/ReferenceImages_64/StackViewSeparator_Tests.Tests/testHorizontalAxisWithHiddenView@2x.png -------------------------------------------------------------------------------- /Example/Tests/ReferenceImages_64/StackViewSeparator_Tests.Tests/testVerticalAxis@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/barisatamer/StackViewSeparator/e2bbc46f17eecdcc80780165f2ca3af28797ca43/Example/Tests/ReferenceImages_64/StackViewSeparator_Tests.Tests/testVerticalAxis@2x.png -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | import StackViewSeparator 4 | import FBSnapshotTestCase 5 | 6 | class Tests: FBSnapshotTestCase { 7 | 8 | override func setUp() { 9 | super.setUp() 10 | 11 | // Uncomment to enable saving reference images: 12 | // recordMode = true 13 | } 14 | 15 | override func tearDown() { 16 | super.tearDown() 17 | } 18 | 19 | func testHorizontalAxis() { 20 | // Create a horizontal stack view with buttons 21 | let stackView = createStackView( 22 | axis: .horizontal, 23 | separatorPercent: 0.2, 24 | separatorColor: .green, 25 | separatorThickness: 5, 26 | separatorCornerRadius: 2 27 | ) 28 | 29 | // Verify 30 | FBSnapshotVerifyView(stackView) 31 | } 32 | 33 | func testVerticalAxis() { 34 | // Create a vertical stack view with buttons 35 | let stackView = createStackView( 36 | axis: .vertical, 37 | separatorPercent: 0.5, 38 | separatorColor: .cyan, 39 | separatorThickness: 10, 40 | separatorCornerRadius: 4 41 | ) 42 | 43 | // Verify 44 | FBSnapshotVerifyView(stackView) 45 | } 46 | 47 | func testHorizontalAxisWithHiddenView() { 48 | // Create a horizontal stack view with buttons 49 | let stackView: UIStackView = createStackView( 50 | axis: .horizontal, 51 | separatorPercent: 0.2, 52 | separatorColor: .green, 53 | separatorThickness: 5, 54 | separatorCornerRadius: 2 55 | ) 56 | stackView.arrangedSubviews[1].isHidden = true 57 | stackView.addSeparators() 58 | stackView.relayout() 59 | 60 | // Verify 61 | FBSnapshotVerifyView(stackView) 62 | } 63 | 64 | private func createStackView( 65 | axis: UILayoutConstraintAxis, 66 | separatorPercent: CGFloat = 1, 67 | separatorColor: UIColor = .red, 68 | separatorThickness: CGFloat = 4, 69 | separatorCornerRadius: CGFloat = 0 70 | ) -> UIStackView { 71 | let stackView = UIStackView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) 72 | stackView.axis = axis 73 | stackView.distribution = .fillEqually 74 | stackView.spacing = 15 75 | 76 | for i in 0...2 { 77 | let button = UIButton() 78 | button.setTitle("\(i)", for: .normal) 79 | button.backgroundColor = .blue 80 | stackView.addArrangedSubview(button) 81 | } 82 | 83 | stackView.separatorColor = separatorColor 84 | stackView.separatorThickness = separatorThickness 85 | stackView.separatorCornerRadius = separatorCornerRadius 86 | stackView.separatorPercent = separatorPercent 87 | 88 | stackView.addSeparators() 89 | stackView.relayout() 90 | 91 | return stackView 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Images/storyboard_designables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/barisatamer/StackViewSeparator/e2bbc46f17eecdcc80780165f2ca3af28797ca43/Images/storyboard_designables.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Baris Atamer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # StackViewSeparator 2 | 3 | [![CI Status](http://img.shields.io/travis/barisatamer/StackViewSeparator.svg?style=flat)](https://travis-ci.org/barisatamer/StackViewSeparator) 4 | [![Version](https://img.shields.io/cocoapods/v/StackViewSeparator.svg?style=flat)](http://cocoapods.org/pods/StackViewSeparator) 5 | [![License](https://img.shields.io/cocoapods/l/StackViewSeparator.svg?style=flat)](http://cocoapods.org/pods/StackViewSeparator) 6 | [![Platform](https://img.shields.io/cocoapods/p/StackViewSeparator.svg?style=flat)](http://cocoapods.org/pods/StackViewSeparator) 7 | 8 | ![demo](https://i.imgur.com/X8mTuIQ.gif) 9 | 10 | ## Example 11 | 12 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 13 | 14 | ## Requirements 15 | 16 | ## Installation 17 | 18 | StackViewSeparator is available through [CocoaPods](http://cocoapods.org). To install 19 | it, simply add the following line to your Podfile: 20 | 21 | ```ruby 22 | pod 'StackViewSeparator' 23 | ``` 24 | 25 | ### Storyboard 26 | Thickness, Corner Radius, Percent, Color can be set 27 | 28 | ![](Images/storyboard_designables.png) 29 | 30 | ### Code 31 | ```swift 32 | import StackViewSeparator 33 | 34 | let stackView = UIStackView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) 35 | ... 36 | ... 37 | stackView.separatorColor = .blue 38 | stackView.separatorThickness = 3 39 | stackView.separatorCornerRadius = 1 40 | stackView.separatorPercent = 0.7 // 0...1 41 | ``` 42 | 43 | ## Author 44 | 45 | Baris Atamer, brsatamer@gmail.com 46 | 47 | ## License 48 | 49 | StackViewSeparator is available under the MIT license. See the LICENSE file for more info. 50 | -------------------------------------------------------------------------------- /StackViewSeparator.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint StackViewSeparator.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'StackViewSeparator' 11 | s.version = '0.1.3' 12 | s.summary = 'An extension to adding separators to UIStackViews' 13 | s.swift_version = '4.1' 14 | 15 | # This description is used to generate tags and improve search results. 16 | # * Think: What does it do? Why did you write it? What is the focus? 17 | # * Try to keep it short, snappy and to the point. 18 | # * Write the description between the DESC delimiters below. 19 | # * Finally, don't worry about the indent, CocoaPods strips it! 20 | 21 | s.description = <<-DESC 22 | An extension to add separator views to UIStackView, written in Swift 4.0 23 | DESC 24 | 25 | s.homepage = 'https://github.com/barisatamer/StackViewSeparator' 26 | s.screenshots = 'https://camo.githubusercontent.com/40a3a2b78ebc51deaff7a67671003079e835b529/68747470733a2f2f692e696d6775722e636f6d2f58386d547549512e676966' 27 | s.license = { :type => 'MIT', :file => 'LICENSE' } 28 | s.author = { 'Baris Atamer' => 'baris@igenius.net' } 29 | s.source = { :git => 'https://github.com/barisatamer/StackViewSeparator.git', :tag => s.version.to_s } 30 | # s.social_media_url = 'https://twitter.com/' 31 | 32 | s.ios.deployment_target = '9.3' 33 | 34 | s.source_files = 'StackViewSeparator/Classes/**/*' 35 | 36 | # s.resource_bundles = { 37 | # 'StackViewSeparator' => ['StackViewSeparator/Assets/*.png'] 38 | # } 39 | 40 | # s.public_header_files = 'Pod/Classes/**/*.h' 41 | # s.frameworks = 'UIKit', 'MapKit' 42 | # s.dependency 'AFNetworking', '~> 2.3' 43 | end 44 | -------------------------------------------------------------------------------- /StackViewSeparator/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/barisatamer/StackViewSeparator/e2bbc46f17eecdcc80780165f2ca3af28797ca43/StackViewSeparator/Assets/.gitkeep -------------------------------------------------------------------------------- /StackViewSeparator/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/barisatamer/StackViewSeparator/e2bbc46f17eecdcc80780165f2ca3af28797ca43/StackViewSeparator/Classes/.gitkeep -------------------------------------------------------------------------------- /StackViewSeparator/Classes/UIStackView+Extension.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | import UIKit 4 | 5 | extension UIStackView { 6 | 7 | private struct AssociatedKeys { 8 | static var thickness = "separator_thickness" 9 | static var color = "separator_color" 10 | static var cornerRadius = "separator_cornerRadius" 11 | static var percent = "separator_percent" 12 | static var separatorViews = "separator_views" 13 | } 14 | 15 | fileprivate var separatorViews: [UIView] { 16 | get { return objc_getAssociatedObject(self, &AssociatedKeys.separatorViews) as? [UIView] ?? [UIView]() } 17 | set { objc_setAssociatedObject(self, &AssociatedKeys.separatorViews, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) } 18 | } 19 | 20 | /// Thickness of the separator lines 21 | @IBInspectable open var separatorThickness: CGFloat { 22 | get { return objc_getAssociatedObject(self, &AssociatedKeys.thickness) as? CGFloat ?? 0 } 23 | set { 24 | objc_setAssociatedObject(self, &AssociatedKeys.thickness, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 25 | layoutSubviews() 26 | } 27 | } 28 | 29 | /// Corner Radius of the separator lines 30 | @IBInspectable open var separatorCornerRadius: CGFloat { 31 | get { return objc_getAssociatedObject(self, &AssociatedKeys.cornerRadius) as? CGFloat ?? 3 } 32 | set { 33 | objc_setAssociatedObject(self, &AssociatedKeys.cornerRadius, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 34 | layoutSubviews() 35 | } 36 | } 37 | 38 | /// Percent for the separator length 39 | @IBInspectable open var separatorPercent: CGFloat { 40 | get { return objc_getAssociatedObject(self, &AssociatedKeys.percent) as? CGFloat ?? 1.0 } 41 | set { 42 | objc_setAssociatedObject(self, &AssociatedKeys.percent, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 43 | layoutSubviews() 44 | } 45 | } 46 | 47 | /// Color of the separator lines 48 | @IBInspectable open var separatorColor: UIColor { 49 | get { return objc_getAssociatedObject(self, &AssociatedKeys.color) as? UIColor ?? .black } 50 | set { 51 | objc_setAssociatedObject(self, &AssociatedKeys.color, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 52 | layoutSubviews() 53 | } 54 | } 55 | 56 | /// Adds separator view for each visible arranged subview. Call this function after updating your stack view items. 57 | open func addSeparators() { 58 | // Remove all separators. 59 | separatorViews.forEach({ $0.removeFromSuperview() }) 60 | separatorViews = [] 61 | 62 | // Add separtors for each visible item. 63 | let visibleItems = arrangedSubviews.filter({ $0.isHidden == false }) 64 | guard visibleItems.count > 1 else { return } 65 | for _ in 1..