├── .gitignore ├── .travis.yml ├── Example ├── IMTreeView.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── IMTreeView-Example.xcscheme ├── IMTreeView.xcworkspace │ └── contents.xcworkspacedata ├── IMTreeView │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── IMTreeView.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── IMTreeView.xcscheme │ └── Target Support Files │ │ ├── IMTreeView │ │ ├── IMTreeView-dummy.m │ │ ├── IMTreeView-prefix.pch │ │ ├── IMTreeView-umbrella.h │ │ ├── IMTreeView.modulemap │ │ ├── IMTreeView.xcconfig │ │ └── Info.plist │ │ ├── Pods-IMTreeView_Example │ │ ├── Info.plist │ │ ├── Pods-IMTreeView_Example-acknowledgements.markdown │ │ ├── Pods-IMTreeView_Example-acknowledgements.plist │ │ ├── Pods-IMTreeView_Example-dummy.m │ │ ├── Pods-IMTreeView_Example-frameworks.sh │ │ ├── Pods-IMTreeView_Example-resources.sh │ │ ├── Pods-IMTreeView_Example-umbrella.h │ │ ├── Pods-IMTreeView_Example.debug.xcconfig │ │ ├── Pods-IMTreeView_Example.modulemap │ │ └── Pods-IMTreeView_Example.release.xcconfig │ │ └── Pods-IMTreeView_Tests │ │ ├── Info.plist │ │ ├── Pods-IMTreeView_Tests-acknowledgements.markdown │ │ ├── Pods-IMTreeView_Tests-acknowledgements.plist │ │ ├── Pods-IMTreeView_Tests-dummy.m │ │ ├── Pods-IMTreeView_Tests-frameworks.sh │ │ ├── Pods-IMTreeView_Tests-resources.sh │ │ ├── Pods-IMTreeView_Tests-umbrella.h │ │ ├── Pods-IMTreeView_Tests.debug.xcconfig │ │ ├── Pods-IMTreeView_Tests.modulemap │ │ └── Pods-IMTreeView_Tests.release.xcconfig └── Tests │ ├── Info.plist │ └── Tests.swift ├── IMTreeView.podspec ├── LICENSE ├── Pod ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ └── IMTreeView.swift ├── README.md ├── _Pods.xcodeproj └── screenshot.png /.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 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | language: objective-c 6 | # cache: cocoapods 7 | # podfile: Example/Podfile 8 | # before_install: 9 | # - gem install cocoapods # Since Travis is not always on latest version 10 | # - pod install --project-directory=Example 11 | script: 12 | - set -o pipefail && xcodebuild test -workspace Example/IMTreeView.xcworkspace -scheme IMTreeView-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty 13 | - pod lib lint 14 | -------------------------------------------------------------------------------- /Example/IMTreeView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 44C23C1287D3C2801F526B04 /* Pods_IMTreeView_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5568F0D4C2515CFC83E3FDD /* Pods_IMTreeView_Tests.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 | 9D585ED425CF2C1FAFB5F64F /* Pods_IMTreeView_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8DCE89713758BA233554E6B /* Pods_IMTreeView_Example.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 = IMTreeView; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 1554B0C7915528866220FA2C /* Pods-IMTreeView_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IMTreeView_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example.release.xcconfig"; sourceTree = ""; }; 32 | 2DC443610936111A9CBB2CB3 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 33 | 607FACD01AFB9204008FA782 /* IMTreeView_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IMTreeView_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 36 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 37 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 38 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 39 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 40 | 607FACE51AFB9204008FA782 /* IMTreeView_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IMTreeView_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 42 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 43 | 8F45780DE2A15DCD79ADB71F /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 44 | B5568F0D4C2515CFC83E3FDD /* Pods_IMTreeView_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_IMTreeView_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | B967F916D120F2818E1CC192 /* IMTreeView.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = IMTreeView.podspec; path = ../IMTreeView.podspec; sourceTree = ""; }; 46 | BAFEB48F6B8F3E533C59DE24 /* Pods-IMTreeView_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IMTreeView_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests.debug.xcconfig"; sourceTree = ""; }; 47 | C0F6A083E757DAC19E2D955B /* Pods-IMTreeView_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IMTreeView_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example.debug.xcconfig"; sourceTree = ""; }; 48 | C27710EB251F20729BF5D872 /* Pods-IMTreeView_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IMTreeView_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests.release.xcconfig"; sourceTree = ""; }; 49 | C8DCE89713758BA233554E6B /* Pods_IMTreeView_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_IMTreeView_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 9D585ED425CF2C1FAFB5F64F /* Pods_IMTreeView_Example.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 44C23C1287D3C2801F526B04 /* Pods_IMTreeView_Tests.framework in Frameworks */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXFrameworksBuildPhase section */ 70 | 71 | /* Begin PBXGroup section */ 72 | 4E4D9C9FB32991E7A788C591 /* Pods */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | C0F6A083E757DAC19E2D955B /* Pods-IMTreeView_Example.debug.xcconfig */, 76 | 1554B0C7915528866220FA2C /* Pods-IMTreeView_Example.release.xcconfig */, 77 | BAFEB48F6B8F3E533C59DE24 /* Pods-IMTreeView_Tests.debug.xcconfig */, 78 | C27710EB251F20729BF5D872 /* Pods-IMTreeView_Tests.release.xcconfig */, 79 | ); 80 | name = Pods; 81 | sourceTree = ""; 82 | }; 83 | 607FACC71AFB9204008FA782 = { 84 | isa = PBXGroup; 85 | children = ( 86 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 87 | 607FACD21AFB9204008FA782 /* Example for IMTreeView */, 88 | 607FACE81AFB9204008FA782 /* Tests */, 89 | 607FACD11AFB9204008FA782 /* Products */, 90 | 4E4D9C9FB32991E7A788C591 /* Pods */, 91 | 81DD3C9B3238C41713E7168F /* Frameworks */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | 607FACD11AFB9204008FA782 /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 607FACD01AFB9204008FA782 /* IMTreeView_Example.app */, 99 | 607FACE51AFB9204008FA782 /* IMTreeView_Tests.xctest */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | 607FACD21AFB9204008FA782 /* Example for IMTreeView */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 108 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 109 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 110 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 111 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 112 | 607FACD31AFB9204008FA782 /* Supporting Files */, 113 | ); 114 | name = "Example for IMTreeView"; 115 | path = IMTreeView; 116 | sourceTree = ""; 117 | }; 118 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 607FACD41AFB9204008FA782 /* Info.plist */, 122 | ); 123 | name = "Supporting Files"; 124 | sourceTree = ""; 125 | }; 126 | 607FACE81AFB9204008FA782 /* Tests */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 130 | 607FACE91AFB9204008FA782 /* Supporting Files */, 131 | ); 132 | path = Tests; 133 | sourceTree = ""; 134 | }; 135 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 607FACEA1AFB9204008FA782 /* Info.plist */, 139 | ); 140 | name = "Supporting Files"; 141 | sourceTree = ""; 142 | }; 143 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | B967F916D120F2818E1CC192 /* IMTreeView.podspec */, 147 | 8F45780DE2A15DCD79ADB71F /* README.md */, 148 | 2DC443610936111A9CBB2CB3 /* LICENSE */, 149 | ); 150 | name = "Podspec Metadata"; 151 | sourceTree = ""; 152 | }; 153 | 81DD3C9B3238C41713E7168F /* Frameworks */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | C8DCE89713758BA233554E6B /* Pods_IMTreeView_Example.framework */, 157 | B5568F0D4C2515CFC83E3FDD /* Pods_IMTreeView_Tests.framework */, 158 | ); 159 | name = Frameworks; 160 | sourceTree = ""; 161 | }; 162 | /* End PBXGroup section */ 163 | 164 | /* Begin PBXNativeTarget section */ 165 | 607FACCF1AFB9204008FA782 /* IMTreeView_Example */ = { 166 | isa = PBXNativeTarget; 167 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "IMTreeView_Example" */; 168 | buildPhases = ( 169 | C8555EC511BBD5F5131A22E2 /* Check Pods Manifest.lock */, 170 | 607FACCC1AFB9204008FA782 /* Sources */, 171 | 607FACCD1AFB9204008FA782 /* Frameworks */, 172 | 607FACCE1AFB9204008FA782 /* Resources */, 173 | EA6F096B526531F0D14CE570 /* Embed Pods Frameworks */, 174 | 7796728194CD07B9B65EF102 /* Copy Pods Resources */, 175 | ); 176 | buildRules = ( 177 | ); 178 | dependencies = ( 179 | ); 180 | name = IMTreeView_Example; 181 | productName = IMTreeView; 182 | productReference = 607FACD01AFB9204008FA782 /* IMTreeView_Example.app */; 183 | productType = "com.apple.product-type.application"; 184 | }; 185 | 607FACE41AFB9204008FA782 /* IMTreeView_Tests */ = { 186 | isa = PBXNativeTarget; 187 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "IMTreeView_Tests" */; 188 | buildPhases = ( 189 | B00AE463B77F7379E27B9B1B /* Check Pods Manifest.lock */, 190 | 607FACE11AFB9204008FA782 /* Sources */, 191 | 607FACE21AFB9204008FA782 /* Frameworks */, 192 | 607FACE31AFB9204008FA782 /* Resources */, 193 | F2CC0F3F8850292BE9DD5043 /* Embed Pods Frameworks */, 194 | 354E434A18F466EEA1BDEDFE /* Copy Pods Resources */, 195 | ); 196 | buildRules = ( 197 | ); 198 | dependencies = ( 199 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 200 | ); 201 | name = IMTreeView_Tests; 202 | productName = Tests; 203 | productReference = 607FACE51AFB9204008FA782 /* IMTreeView_Tests.xctest */; 204 | productType = "com.apple.product-type.bundle.unit-test"; 205 | }; 206 | /* End PBXNativeTarget section */ 207 | 208 | /* Begin PBXProject section */ 209 | 607FACC81AFB9204008FA782 /* Project object */ = { 210 | isa = PBXProject; 211 | attributes = { 212 | LastSwiftUpdateCheck = 0720; 213 | LastUpgradeCheck = 0720; 214 | ORGANIZATIONNAME = CocoaPods; 215 | TargetAttributes = { 216 | 607FACCF1AFB9204008FA782 = { 217 | CreatedOnToolsVersion = 6.3.1; 218 | }; 219 | 607FACE41AFB9204008FA782 = { 220 | CreatedOnToolsVersion = 6.3.1; 221 | TestTargetID = 607FACCF1AFB9204008FA782; 222 | }; 223 | }; 224 | }; 225 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "IMTreeView" */; 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 /* IMTreeView_Example */, 239 | 607FACE41AFB9204008FA782 /* IMTreeView_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 | 354E434A18F466EEA1BDEDFE /* Copy Pods Resources */ = { 266 | isa = PBXShellScriptBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | ); 270 | inputPaths = ( 271 | ); 272 | name = "Copy Pods Resources"; 273 | outputPaths = ( 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | shellPath = /bin/sh; 277 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests-resources.sh\"\n"; 278 | showEnvVarsInLog = 0; 279 | }; 280 | 7796728194CD07B9B65EF102 /* Copy Pods Resources */ = { 281 | isa = PBXShellScriptBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | ); 285 | inputPaths = ( 286 | ); 287 | name = "Copy Pods Resources"; 288 | outputPaths = ( 289 | ); 290 | runOnlyForDeploymentPostprocessing = 0; 291 | shellPath = /bin/sh; 292 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example-resources.sh\"\n"; 293 | showEnvVarsInLog = 0; 294 | }; 295 | B00AE463B77F7379E27B9B1B /* Check Pods Manifest.lock */ = { 296 | isa = PBXShellScriptBuildPhase; 297 | buildActionMask = 2147483647; 298 | files = ( 299 | ); 300 | inputPaths = ( 301 | ); 302 | name = "Check Pods Manifest.lock"; 303 | outputPaths = ( 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | shellPath = /bin/sh; 307 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 308 | showEnvVarsInLog = 0; 309 | }; 310 | C8555EC511BBD5F5131A22E2 /* Check Pods Manifest.lock */ = { 311 | isa = PBXShellScriptBuildPhase; 312 | buildActionMask = 2147483647; 313 | files = ( 314 | ); 315 | inputPaths = ( 316 | ); 317 | name = "Check Pods Manifest.lock"; 318 | outputPaths = ( 319 | ); 320 | runOnlyForDeploymentPostprocessing = 0; 321 | shellPath = /bin/sh; 322 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 323 | showEnvVarsInLog = 0; 324 | }; 325 | EA6F096B526531F0D14CE570 /* Embed Pods Frameworks */ = { 326 | isa = PBXShellScriptBuildPhase; 327 | buildActionMask = 2147483647; 328 | files = ( 329 | ); 330 | inputPaths = ( 331 | ); 332 | name = "Embed Pods Frameworks"; 333 | outputPaths = ( 334 | ); 335 | runOnlyForDeploymentPostprocessing = 0; 336 | shellPath = /bin/sh; 337 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example-frameworks.sh\"\n"; 338 | showEnvVarsInLog = 0; 339 | }; 340 | F2CC0F3F8850292BE9DD5043 /* Embed Pods Frameworks */ = { 341 | isa = PBXShellScriptBuildPhase; 342 | buildActionMask = 2147483647; 343 | files = ( 344 | ); 345 | inputPaths = ( 346 | ); 347 | name = "Embed Pods Frameworks"; 348 | outputPaths = ( 349 | ); 350 | runOnlyForDeploymentPostprocessing = 0; 351 | shellPath = /bin/sh; 352 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests-frameworks.sh\"\n"; 353 | showEnvVarsInLog = 0; 354 | }; 355 | /* End PBXShellScriptBuildPhase section */ 356 | 357 | /* Begin PBXSourcesBuildPhase section */ 358 | 607FACCC1AFB9204008FA782 /* Sources */ = { 359 | isa = PBXSourcesBuildPhase; 360 | buildActionMask = 2147483647; 361 | files = ( 362 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 363 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 364 | ); 365 | runOnlyForDeploymentPostprocessing = 0; 366 | }; 367 | 607FACE11AFB9204008FA782 /* Sources */ = { 368 | isa = PBXSourcesBuildPhase; 369 | buildActionMask = 2147483647; 370 | files = ( 371 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | }; 375 | /* End PBXSourcesBuildPhase section */ 376 | 377 | /* Begin PBXTargetDependency section */ 378 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 379 | isa = PBXTargetDependency; 380 | target = 607FACCF1AFB9204008FA782 /* IMTreeView_Example */; 381 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 382 | }; 383 | /* End PBXTargetDependency section */ 384 | 385 | /* Begin PBXVariantGroup section */ 386 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 387 | isa = PBXVariantGroup; 388 | children = ( 389 | 607FACDA1AFB9204008FA782 /* Base */, 390 | ); 391 | name = Main.storyboard; 392 | sourceTree = ""; 393 | }; 394 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 395 | isa = PBXVariantGroup; 396 | children = ( 397 | 607FACDF1AFB9204008FA782 /* Base */, 398 | ); 399 | name = LaunchScreen.xib; 400 | sourceTree = ""; 401 | }; 402 | /* End PBXVariantGroup section */ 403 | 404 | /* Begin XCBuildConfiguration section */ 405 | 607FACED1AFB9204008FA782 /* Debug */ = { 406 | isa = XCBuildConfiguration; 407 | buildSettings = { 408 | ALWAYS_SEARCH_USER_PATHS = NO; 409 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 410 | CLANG_CXX_LIBRARY = "libc++"; 411 | CLANG_ENABLE_MODULES = YES; 412 | CLANG_ENABLE_OBJC_ARC = YES; 413 | CLANG_WARN_BOOL_CONVERSION = YES; 414 | CLANG_WARN_CONSTANT_CONVERSION = YES; 415 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 416 | CLANG_WARN_EMPTY_BODY = YES; 417 | CLANG_WARN_ENUM_CONVERSION = YES; 418 | CLANG_WARN_INT_CONVERSION = YES; 419 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 420 | CLANG_WARN_UNREACHABLE_CODE = YES; 421 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 422 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 423 | COPY_PHASE_STRIP = NO; 424 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 425 | ENABLE_STRICT_OBJC_MSGSEND = YES; 426 | ENABLE_TESTABILITY = YES; 427 | GCC_C_LANGUAGE_STANDARD = gnu99; 428 | GCC_DYNAMIC_NO_PIC = NO; 429 | GCC_NO_COMMON_BLOCKS = YES; 430 | GCC_OPTIMIZATION_LEVEL = 0; 431 | GCC_PREPROCESSOR_DEFINITIONS = ( 432 | "DEBUG=1", 433 | "$(inherited)", 434 | ); 435 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 436 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 437 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 438 | GCC_WARN_UNDECLARED_SELECTOR = YES; 439 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 440 | GCC_WARN_UNUSED_FUNCTION = YES; 441 | GCC_WARN_UNUSED_VARIABLE = YES; 442 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 443 | MTL_ENABLE_DEBUG_INFO = YES; 444 | ONLY_ACTIVE_ARCH = YES; 445 | SDKROOT = iphoneos; 446 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 447 | }; 448 | name = Debug; 449 | }; 450 | 607FACEE1AFB9204008FA782 /* Release */ = { 451 | isa = XCBuildConfiguration; 452 | buildSettings = { 453 | ALWAYS_SEARCH_USER_PATHS = NO; 454 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 455 | CLANG_CXX_LIBRARY = "libc++"; 456 | CLANG_ENABLE_MODULES = YES; 457 | CLANG_ENABLE_OBJC_ARC = YES; 458 | CLANG_WARN_BOOL_CONVERSION = YES; 459 | CLANG_WARN_CONSTANT_CONVERSION = YES; 460 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 461 | CLANG_WARN_EMPTY_BODY = YES; 462 | CLANG_WARN_ENUM_CONVERSION = YES; 463 | CLANG_WARN_INT_CONVERSION = YES; 464 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 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 = 8.3; 481 | MTL_ENABLE_DEBUG_INFO = NO; 482 | SDKROOT = iphoneos; 483 | VALIDATE_PRODUCT = YES; 484 | }; 485 | name = Release; 486 | }; 487 | 607FACF01AFB9204008FA782 /* Debug */ = { 488 | isa = XCBuildConfiguration; 489 | baseConfigurationReference = C0F6A083E757DAC19E2D955B /* Pods-IMTreeView_Example.debug.xcconfig */; 490 | buildSettings = { 491 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 492 | INFOPLIST_FILE = IMTreeView/Info.plist; 493 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 494 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 495 | MODULE_NAME = ExampleApp; 496 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 497 | PRODUCT_NAME = "$(TARGET_NAME)"; 498 | }; 499 | name = Debug; 500 | }; 501 | 607FACF11AFB9204008FA782 /* Release */ = { 502 | isa = XCBuildConfiguration; 503 | baseConfigurationReference = 1554B0C7915528866220FA2C /* Pods-IMTreeView_Example.release.xcconfig */; 504 | buildSettings = { 505 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 506 | INFOPLIST_FILE = IMTreeView/Info.plist; 507 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 508 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 509 | MODULE_NAME = ExampleApp; 510 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 511 | PRODUCT_NAME = "$(TARGET_NAME)"; 512 | }; 513 | name = Release; 514 | }; 515 | 607FACF31AFB9204008FA782 /* Debug */ = { 516 | isa = XCBuildConfiguration; 517 | baseConfigurationReference = BAFEB48F6B8F3E533C59DE24 /* Pods-IMTreeView_Tests.debug.xcconfig */; 518 | buildSettings = { 519 | BUNDLE_LOADER = "$(TEST_HOST)"; 520 | FRAMEWORK_SEARCH_PATHS = ( 521 | "$(SDKROOT)/Developer/Library/Frameworks", 522 | "$(inherited)", 523 | ); 524 | GCC_PREPROCESSOR_DEFINITIONS = ( 525 | "DEBUG=1", 526 | "$(inherited)", 527 | ); 528 | INFOPLIST_FILE = Tests/Info.plist; 529 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 530 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 531 | PRODUCT_NAME = "$(TARGET_NAME)"; 532 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IMTreeView_Example.app/IMTreeView_Example"; 533 | }; 534 | name = Debug; 535 | }; 536 | 607FACF41AFB9204008FA782 /* Release */ = { 537 | isa = XCBuildConfiguration; 538 | baseConfigurationReference = C27710EB251F20729BF5D872 /* Pods-IMTreeView_Tests.release.xcconfig */; 539 | buildSettings = { 540 | BUNDLE_LOADER = "$(TEST_HOST)"; 541 | FRAMEWORK_SEARCH_PATHS = ( 542 | "$(SDKROOT)/Developer/Library/Frameworks", 543 | "$(inherited)", 544 | ); 545 | INFOPLIST_FILE = Tests/Info.plist; 546 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 547 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 548 | PRODUCT_NAME = "$(TARGET_NAME)"; 549 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IMTreeView_Example.app/IMTreeView_Example"; 550 | }; 551 | name = Release; 552 | }; 553 | /* End XCBuildConfiguration section */ 554 | 555 | /* Begin XCConfigurationList section */ 556 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "IMTreeView" */ = { 557 | isa = XCConfigurationList; 558 | buildConfigurations = ( 559 | 607FACED1AFB9204008FA782 /* Debug */, 560 | 607FACEE1AFB9204008FA782 /* Release */, 561 | ); 562 | defaultConfigurationIsVisible = 0; 563 | defaultConfigurationName = Release; 564 | }; 565 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "IMTreeView_Example" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 607FACF01AFB9204008FA782 /* Debug */, 569 | 607FACF11AFB9204008FA782 /* Release */, 570 | ); 571 | defaultConfigurationIsVisible = 0; 572 | defaultConfigurationName = Release; 573 | }; 574 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "IMTreeView_Tests" */ = { 575 | isa = XCConfigurationList; 576 | buildConfigurations = ( 577 | 607FACF31AFB9204008FA782 /* Debug */, 578 | 607FACF41AFB9204008FA782 /* Release */, 579 | ); 580 | defaultConfigurationIsVisible = 0; 581 | defaultConfigurationName = Release; 582 | }; 583 | /* End XCConfigurationList section */ 584 | }; 585 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 586 | } 587 | -------------------------------------------------------------------------------- /Example/IMTreeView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/IMTreeView.xcodeproj/xcshareddata/xcschemes/IMTreeView-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 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/IMTreeView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/IMTreeView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // IMTreeView 4 | // 5 | // Created by Ian McDowell on 03/08/2016. 6 | // Copyright (c) 2016 Ian McDowell. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/IMTreeView/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/IMTreeView/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 | -------------------------------------------------------------------------------- /Example/IMTreeView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/IMTreeView/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 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/IMTreeView/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // IMTreeView 4 | // 5 | // Created by Ian McDowell on 03/08/2016. 6 | // Copyright (c) 2016 Ian McDowell. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import IMTreeView 11 | 12 | private struct Node { 13 | var title = "" 14 | var children = [Node]() 15 | } 16 | 17 | class ViewController: UIViewController, UITableViewDataSource, IMTreeViewDataSource { 18 | 19 | private var tableView: UITableView! 20 | 21 | private var nodes = [Node]() 22 | 23 | override func viewDidLoad() { 24 | super.viewDidLoad() 25 | 26 | self.tableView = { 27 | let t = UITableView() 28 | 29 | t.registerClass(UITableViewCell.self, forCellReuseIdentifier: "identifier") 30 | 31 | t.dataSource = self 32 | 33 | self.view.addSubview(t) 34 | 35 | t.translatesAutoresizingMaskIntoConstraints = false 36 | t.leadingAnchor.constraintEqualToAnchor(self.view.leadingAnchor).active = true 37 | t.trailingAnchor.constraintEqualToAnchor(self.view.trailingAnchor).active = true 38 | t.topAnchor.constraintEqualToAnchor(self.view.topAnchor).active = true 39 | t.bottomAnchor.constraintEqualToAnchor(self.view.bottomAnchor).active = true 40 | 41 | return t 42 | }() 43 | 44 | self.nodes = [ 45 | Node(title: "Row 0", children: []), 46 | Node(title: "Row 1", children: [ 47 | Node(title: "Row 1.0", children: [ 48 | Node(title: "Row 1.0.0", children: []) 49 | ]) 50 | ]), 51 | Node(title: "Row 2", children: []), 52 | Node(title: "Row 3", children: [ 53 | Node(title: "Row 3.0", children: [ 54 | Node(title: "Row 3.0.0", children: [ 55 | Node(title: "Row 3.0.0.0", children: []) 56 | ]), 57 | Node(title: "Row 3.0.1", children: []) 58 | ]), 59 | Node(title: "Row 3.1", children: []), 60 | Node(title: "Row 3.2", children: []) 61 | ]), 62 | Node(title: "Row 4", children: [ 63 | Node(title: "Row 4.0", children: []), 64 | Node(title: "Row 4.1", children: []), 65 | Node(title: "Row 4.2", children: []), 66 | Node(title: "Row 4.3", children: []) 67 | ]), 68 | Node(title: "Row 5", children: []) 69 | ] 70 | } 71 | 72 | 73 | // MARK: UITableViewDataSource 74 | 75 | func numberOfSectionsInTableView(tableView: UITableView) -> Int { 76 | return 1 // or however many you would like to 77 | } 78 | 79 | func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 80 | 81 | // this allows the tableView to function as a tree 82 | return tableView.numberOfItemsInSection(section) 83 | 84 | } 85 | 86 | func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 87 | 88 | // convert the tableView indexPath to a tree-based indexPath 89 | let treeIndexPath = tableView.treeIndexPathFromTablePath(indexPath) 90 | 91 | // retrieve the data to display 92 | let node = self.nodeAtIndexPath(treeIndexPath) 93 | 94 | // to determine indentation 95 | let level = treeIndexPath.length - 2 96 | 97 | // get a cell 98 | let cell = tableView.dequeueReusableCellWithIdentifier("identifier", forIndexPath: indexPath) 99 | 100 | // configure cell 101 | cell.textLabel?.text = node.title 102 | cell.indentationLevel = level 103 | 104 | return cell 105 | } 106 | 107 | 108 | // MARK: IMTreeViewDataSource 109 | 110 | func tableView(tableView: UITableView, numberOfChildrenForIndexPath indexPath: NSIndexPath) -> Int { 111 | if indexPath.length == 1 { 112 | // return the number of root nodes 113 | return self.nodes.count 114 | } else { 115 | // return the number of children of this node 116 | let node = self.nodeAtIndexPath(indexPath) 117 | return node.children.count 118 | } 119 | } 120 | 121 | func tableView(tableView: UITableView, isCellExpandedAtIndexPath indexPath: NSIndexPath) -> Bool { 122 | return true // if supporting collapsing, you should return whether this indexPath is expanded. 123 | } 124 | 125 | 126 | // MARK: Helpers 127 | 128 | private func nodeAtIndexPath(indexPath: NSIndexPath) -> Node { 129 | var node = self.nodes[indexPath.indexAtPosition(0)] 130 | var nodes = self.nodes 131 | 132 | for i in 1 ..< indexPath.length { 133 | let index = indexPath.indexAtPosition(i) 134 | 135 | node = nodes[index] 136 | 137 | if indexPath.length - 1 == i { 138 | return node 139 | } 140 | 141 | nodes = node.children 142 | } 143 | 144 | return node 145 | } 146 | 147 | } 148 | 149 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | use_frameworks! 3 | 4 | target 'IMTreeView_Example', :exclusive => true do 5 | pod 'IMTreeView', :path => '../' 6 | end 7 | 8 | target 'IMTreeView_Tests', :exclusive => true do 9 | pod 'IMTreeView', :path => '../' 10 | 11 | 12 | end 13 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - IMTreeView (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - IMTreeView (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | IMTreeView: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | IMTreeView: daed2aa6bd72f5d76eeebc94c8ed414160cb566c 13 | 14 | COCOAPODS: 0.39.0 15 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/IMTreeView.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "IMTreeView", 3 | "version": "0.1.0", 4 | "summary": "A short description of IMTreeView.", 5 | "description": "", 6 | "homepage": "https://github.com//IMTreeView", 7 | "license": "MIT", 8 | "authors": { 9 | "Ian McDowell": "ian@ianmcdowell.net" 10 | }, 11 | "source": { 12 | "git": "https://github.com//IMTreeView.git", 13 | "tag": "0.1.0" 14 | }, 15 | "platforms": { 16 | "ios": "8.0" 17 | }, 18 | "requires_arc": true, 19 | "source_files": "Pod/Classes/**/*", 20 | "resource_bundles": { 21 | "IMTreeView": [ 22 | "Pod/Assets/*.png" 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - IMTreeView (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - IMTreeView (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | IMTreeView: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | IMTreeView: daed2aa6bd72f5d76eeebc94c8ed414160cb566c 13 | 14 | COCOAPODS: 0.39.0 15 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 025A8F20008D564E6AE3A7A9B721E9CD /* IMTreeView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EC4A93AF6B70A111103780A4BE9DD049 /* IMTreeView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 0C184724D1E34DB629D3A7A368CF9FC6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; }; 12 | 121E3B0C2010F8061F91A77340FEF9A2 /* IMTreeView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 17E8C7956A9203D1CCEE2F8494190F6F /* IMTreeView-dummy.m */; }; 13 | 14C0F7F691DECF8FDA4A90E1E7D92786 /* Pods-IMTreeView_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C965342885DF34B8CF927BC3DD3C9DB /* Pods-IMTreeView_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | 28C68817A9702BD7D5EDF1BAF9FD6DB5 /* Pods-IMTreeView_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = AC9C364B7219C9884BCDA5BC20B94FE9 /* Pods-IMTreeView_Tests-dummy.m */; }; 15 | 3C9BCDA61C8EA57B00AFED6A /* IMTreeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C9BCDA51C8EA57B00AFED6A /* IMTreeView.swift */; }; 16 | 51C09DD1ADED5FDAD8D0282776203AFD /* IMTreeView.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EA3CFC2A38D107D9367E2F07F154F654 /* IMTreeView.bundle */; }; 17 | 80805E497E94DB56026AEF79A40D02ED /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; }; 18 | ABEF87202DBFEB4BE1F05ED02BB5EC5F /* Pods-IMTreeView_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C95689E3F494EF66829DCB41E7538A7A /* Pods-IMTreeView_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 19 | D72432A311C2D7C58F59690E20D6B1BC /* Pods-IMTreeView_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = DE9B8D804279AAA039845BC0135C6ABE /* Pods-IMTreeView_Example-dummy.m */; }; 20 | F1F0D1A633D8ADD0093CF6B532A4517B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 01383EC56D5059E5E5FADB87E4A4E83F /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 58BB8B2E37D952FAE8F4D1CB46EC7AC9; 29 | remoteInfo = IMTreeView; 30 | }; 31 | 25724E43E8454B80EC4B305445556B4F /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 58BB8B2E37D952FAE8F4D1CB46EC7AC9; 36 | remoteInfo = IMTreeView; 37 | }; 38 | A936E82D8553E5304D277BD0BB81CE88 /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 41 | proxyType = 1; 42 | remoteGlobalIDString = 9FCCF3714F3246410C83EA148DD64025; 43 | remoteInfo = "IMTreeView-IMTreeView"; 44 | }; 45 | /* End PBXContainerItemProxy section */ 46 | 47 | /* Begin PBXFileReference section */ 48 | 04E91C945DF46DF7FC1BF56C903F9789 /* Pods-IMTreeView_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-IMTreeView_Tests.debug.xcconfig"; sourceTree = ""; }; 49 | 17E8C7956A9203D1CCEE2F8494190F6F /* IMTreeView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "IMTreeView-dummy.m"; sourceTree = ""; }; 50 | 1F2E83FD5635A4457A6C2B15B01E4CDC /* IMTreeView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = IMTreeView.xcconfig; sourceTree = ""; }; 51 | 34A8F2FA212D2684AD19256D3EE17C88 /* IMTreeView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "IMTreeView-prefix.pch"; sourceTree = ""; }; 52 | 35795A32F00C9ECD8125FD160A484205 /* Pods-IMTreeView_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-IMTreeView_Tests.modulemap"; sourceTree = ""; }; 53 | 3C9BCDA51C8EA57B00AFED6A /* IMTreeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IMTreeView.swift; sourceTree = ""; }; 54 | 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 55 | 4A4F60A7664E7D9103408D479449D6A9 /* IMTreeView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = IMTreeView.modulemap; sourceTree = ""; }; 56 | 53118750EEC3D5699630ACB4D466BFDA /* Pods-IMTreeView_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-IMTreeView_Example-resources.sh"; sourceTree = ""; }; 57 | 550363C6B6BB48CD4CBEDF4CECFB3FA7 /* Pods-IMTreeView_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-IMTreeView_Example.modulemap"; sourceTree = ""; }; 58 | 56BA53A97A5FBEA15ADB3C194DC573DD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | 578284DFEE9E3A39F842D904BA2D55BE /* Pods-IMTreeView_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-IMTreeView_Tests-acknowledgements.plist"; sourceTree = ""; }; 60 | 7C965342885DF34B8CF927BC3DD3C9DB /* Pods-IMTreeView_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-IMTreeView_Tests-umbrella.h"; sourceTree = ""; }; 61 | 8CE794FCCC1E39F46D3AE6D9C3632545 /* IMTreeView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = IMTreeView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | 9ED4614FE5B68277EE958CB8066B2EB2 /* Pods-IMTreeView_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-IMTreeView_Example-acknowledgements.plist"; sourceTree = ""; }; 63 | A1863D12D54D63D693391E8E3C0BE496 /* Pods-IMTreeView_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-IMTreeView_Tests.release.xcconfig"; sourceTree = ""; }; 64 | AC9C364B7219C9884BCDA5BC20B94FE9 /* Pods-IMTreeView_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-IMTreeView_Tests-dummy.m"; sourceTree = ""; }; 65 | B2F5666D54B46D916A92C2F212B247ED /* Pods-IMTreeView_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-IMTreeView_Example-frameworks.sh"; sourceTree = ""; }; 66 | B7968459FC459AAAB820DB23C06D22A9 /* Pods_IMTreeView_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_IMTreeView_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 68 | BC678266D0F178FF74CC608FE535B2EB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 69 | BDE3D3AB0C8F4940FE6062C1FBA76AB6 /* Pods-IMTreeView_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-IMTreeView_Example.debug.xcconfig"; sourceTree = ""; }; 70 | C95689E3F494EF66829DCB41E7538A7A /* Pods-IMTreeView_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-IMTreeView_Example-umbrella.h"; sourceTree = ""; }; 71 | DE9B8D804279AAA039845BC0135C6ABE /* Pods-IMTreeView_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-IMTreeView_Example-dummy.m"; sourceTree = ""; }; 72 | E15C351BA6D1534BD609F9F2404106F8 /* Pods-IMTreeView_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-IMTreeView_Tests-acknowledgements.markdown"; sourceTree = ""; }; 73 | E4B1D48DA1B0E2FE9D9776CD36E67412 /* Pods-IMTreeView_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-IMTreeView_Example.release.xcconfig"; sourceTree = ""; }; 74 | EA3CFC2A38D107D9367E2F07F154F654 /* IMTreeView.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IMTreeView.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | EA5EF08B9A2C231B8D1ECA5B760A4F9D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 76 | EC4A93AF6B70A111103780A4BE9DD049 /* IMTreeView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "IMTreeView-umbrella.h"; sourceTree = ""; }; 77 | F6DCA549509821EB13CE2CCF03D672F5 /* Pods_IMTreeView_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_IMTreeView_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 78 | F8D8F07A8ED2613AE32A82C734772B18 /* Pods-IMTreeView_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-IMTreeView_Tests-resources.sh"; sourceTree = ""; }; 79 | FAF42370D03B0381CAA8B3142EC667EB /* Pods-IMTreeView_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-IMTreeView_Tests-frameworks.sh"; sourceTree = ""; }; 80 | FDAA0ABB2D22320593499858E43238C5 /* Pods-IMTreeView_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-IMTreeView_Example-acknowledgements.markdown"; sourceTree = ""; }; 81 | /* End PBXFileReference section */ 82 | 83 | /* Begin PBXFrameworksBuildPhase section */ 84 | 23401705C854F91CB9F5A62CF389A35E /* Frameworks */ = { 85 | isa = PBXFrameworksBuildPhase; 86 | buildActionMask = 2147483647; 87 | files = ( 88 | 0C184724D1E34DB629D3A7A368CF9FC6 /* Foundation.framework in Frameworks */, 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | 7B552DC924C0CAF17785DF11A3676890 /* Frameworks */ = { 93 | isa = PBXFrameworksBuildPhase; 94 | buildActionMask = 2147483647; 95 | files = ( 96 | 80805E497E94DB56026AEF79A40D02ED /* Foundation.framework in Frameworks */, 97 | ); 98 | runOnlyForDeploymentPostprocessing = 0; 99 | }; 100 | B9DCF06C8F534187DEE979046757761C /* Frameworks */ = { 101 | isa = PBXFrameworksBuildPhase; 102 | buildActionMask = 2147483647; 103 | files = ( 104 | F1F0D1A633D8ADD0093CF6B532A4517B /* Foundation.framework in Frameworks */, 105 | ); 106 | runOnlyForDeploymentPostprocessing = 0; 107 | }; 108 | DDF4F4168EDD790FF9319A1A53C707FD /* Frameworks */ = { 109 | isa = PBXFrameworksBuildPhase; 110 | buildActionMask = 2147483647; 111 | files = ( 112 | ); 113 | runOnlyForDeploymentPostprocessing = 0; 114 | }; 115 | /* End PBXFrameworksBuildPhase section */ 116 | 117 | /* Begin PBXGroup section */ 118 | 3902700D2D7BD24BD8EBC85966BE4B07 /* Pod */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | A97B56C50FBB6F74E396B437391C0F3B /* Classes */, 122 | ); 123 | path = Pod; 124 | sourceTree = ""; 125 | }; 126 | 5676CB48691EECE907AA78F08096FC12 /* Pods-IMTreeView_Tests */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | BC678266D0F178FF74CC608FE535B2EB /* Info.plist */, 130 | 35795A32F00C9ECD8125FD160A484205 /* Pods-IMTreeView_Tests.modulemap */, 131 | E15C351BA6D1534BD609F9F2404106F8 /* Pods-IMTreeView_Tests-acknowledgements.markdown */, 132 | 578284DFEE9E3A39F842D904BA2D55BE /* Pods-IMTreeView_Tests-acknowledgements.plist */, 133 | AC9C364B7219C9884BCDA5BC20B94FE9 /* Pods-IMTreeView_Tests-dummy.m */, 134 | FAF42370D03B0381CAA8B3142EC667EB /* Pods-IMTreeView_Tests-frameworks.sh */, 135 | F8D8F07A8ED2613AE32A82C734772B18 /* Pods-IMTreeView_Tests-resources.sh */, 136 | 7C965342885DF34B8CF927BC3DD3C9DB /* Pods-IMTreeView_Tests-umbrella.h */, 137 | 04E91C945DF46DF7FC1BF56C903F9789 /* Pods-IMTreeView_Tests.debug.xcconfig */, 138 | A1863D12D54D63D693391E8E3C0BE496 /* Pods-IMTreeView_Tests.release.xcconfig */, 139 | ); 140 | name = "Pods-IMTreeView_Tests"; 141 | path = "Target Support Files/Pods-IMTreeView_Tests"; 142 | sourceTree = ""; 143 | }; 144 | 7DB346D0F39D3F0E887471402A8071AB = { 145 | isa = PBXGroup; 146 | children = ( 147 | BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, 148 | EC16DD8090778E389A6CB79336A4BD97 /* Development Pods */, 149 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 150 | 9A1352F9691957846E1C43D59D60D0B7 /* Products */, 151 | 99616ADD7250FE66AFF13097BB989E82 /* Targets Support Files */, 152 | ); 153 | sourceTree = ""; 154 | }; 155 | 99616ADD7250FE66AFF13097BB989E82 /* Targets Support Files */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | C472C208EF6842D0EAF0DE9679E78B0B /* Pods-IMTreeView_Example */, 159 | 5676CB48691EECE907AA78F08096FC12 /* Pods-IMTreeView_Tests */, 160 | ); 161 | name = "Targets Support Files"; 162 | sourceTree = ""; 163 | }; 164 | 9A1352F9691957846E1C43D59D60D0B7 /* Products */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | EA3CFC2A38D107D9367E2F07F154F654 /* IMTreeView.bundle */, 168 | 8CE794FCCC1E39F46D3AE6D9C3632545 /* IMTreeView.framework */, 169 | B7968459FC459AAAB820DB23C06D22A9 /* Pods_IMTreeView_Example.framework */, 170 | F6DCA549509821EB13CE2CCF03D672F5 /* Pods_IMTreeView_Tests.framework */, 171 | ); 172 | name = Products; 173 | sourceTree = ""; 174 | }; 175 | A42199C75D9B672F61EBD4829456F311 /* Support Files */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | 4A4F60A7664E7D9103408D479449D6A9 /* IMTreeView.modulemap */, 179 | 1F2E83FD5635A4457A6C2B15B01E4CDC /* IMTreeView.xcconfig */, 180 | 17E8C7956A9203D1CCEE2F8494190F6F /* IMTreeView-dummy.m */, 181 | 34A8F2FA212D2684AD19256D3EE17C88 /* IMTreeView-prefix.pch */, 182 | EC4A93AF6B70A111103780A4BE9DD049 /* IMTreeView-umbrella.h */, 183 | EA5EF08B9A2C231B8D1ECA5B760A4F9D /* Info.plist */, 184 | ); 185 | name = "Support Files"; 186 | path = "Example/Pods/Target Support Files/IMTreeView"; 187 | sourceTree = ""; 188 | }; 189 | A97B56C50FBB6F74E396B437391C0F3B /* Classes */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | 3C9BCDA51C8EA57B00AFED6A /* IMTreeView.swift */, 193 | ); 194 | path = Classes; 195 | sourceTree = ""; 196 | }; 197 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 198 | isa = PBXGroup; 199 | children = ( 200 | BF6342C8B29F4CEEA088EFF7AB4DE362 /* iOS */, 201 | ); 202 | name = Frameworks; 203 | sourceTree = ""; 204 | }; 205 | BF6342C8B29F4CEEA088EFF7AB4DE362 /* iOS */ = { 206 | isa = PBXGroup; 207 | children = ( 208 | 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */, 209 | ); 210 | name = iOS; 211 | sourceTree = ""; 212 | }; 213 | C472C208EF6842D0EAF0DE9679E78B0B /* Pods-IMTreeView_Example */ = { 214 | isa = PBXGroup; 215 | children = ( 216 | 56BA53A97A5FBEA15ADB3C194DC573DD /* Info.plist */, 217 | 550363C6B6BB48CD4CBEDF4CECFB3FA7 /* Pods-IMTreeView_Example.modulemap */, 218 | FDAA0ABB2D22320593499858E43238C5 /* Pods-IMTreeView_Example-acknowledgements.markdown */, 219 | 9ED4614FE5B68277EE958CB8066B2EB2 /* Pods-IMTreeView_Example-acknowledgements.plist */, 220 | DE9B8D804279AAA039845BC0135C6ABE /* Pods-IMTreeView_Example-dummy.m */, 221 | B2F5666D54B46D916A92C2F212B247ED /* Pods-IMTreeView_Example-frameworks.sh */, 222 | 53118750EEC3D5699630ACB4D466BFDA /* Pods-IMTreeView_Example-resources.sh */, 223 | C95689E3F494EF66829DCB41E7538A7A /* Pods-IMTreeView_Example-umbrella.h */, 224 | BDE3D3AB0C8F4940FE6062C1FBA76AB6 /* Pods-IMTreeView_Example.debug.xcconfig */, 225 | E4B1D48DA1B0E2FE9D9776CD36E67412 /* Pods-IMTreeView_Example.release.xcconfig */, 226 | ); 227 | name = "Pods-IMTreeView_Example"; 228 | path = "Target Support Files/Pods-IMTreeView_Example"; 229 | sourceTree = ""; 230 | }; 231 | DD67E31A6C6C08F94AD1B1DB50897EC2 /* IMTreeView */ = { 232 | isa = PBXGroup; 233 | children = ( 234 | 3902700D2D7BD24BD8EBC85966BE4B07 /* Pod */, 235 | A42199C75D9B672F61EBD4829456F311 /* Support Files */, 236 | ); 237 | name = IMTreeView; 238 | path = ../..; 239 | sourceTree = ""; 240 | }; 241 | EC16DD8090778E389A6CB79336A4BD97 /* Development Pods */ = { 242 | isa = PBXGroup; 243 | children = ( 244 | DD67E31A6C6C08F94AD1B1DB50897EC2 /* IMTreeView */, 245 | ); 246 | name = "Development Pods"; 247 | sourceTree = ""; 248 | }; 249 | /* End PBXGroup section */ 250 | 251 | /* Begin PBXHeadersBuildPhase section */ 252 | 361439DCA38F0B69462B1E00097CD2F1 /* Headers */ = { 253 | isa = PBXHeadersBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | 025A8F20008D564E6AE3A7A9B721E9CD /* IMTreeView-umbrella.h in Headers */, 257 | ); 258 | runOnlyForDeploymentPostprocessing = 0; 259 | }; 260 | 51E004C9AB951D38A7EE6114F6B4EAD2 /* Headers */ = { 261 | isa = PBXHeadersBuildPhase; 262 | buildActionMask = 2147483647; 263 | files = ( 264 | 14C0F7F691DECF8FDA4A90E1E7D92786 /* Pods-IMTreeView_Tests-umbrella.h in Headers */, 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | }; 268 | 9622932C3A8CA6EC7E4EF59EC31B0F10 /* Headers */ = { 269 | isa = PBXHeadersBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | ABEF87202DBFEB4BE1F05ED02BB5EC5F /* Pods-IMTreeView_Example-umbrella.h in Headers */, 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | /* End PBXHeadersBuildPhase section */ 277 | 278 | /* Begin PBXNativeTarget section */ 279 | 003D26CD9DC52B497394398D9A7FE7DB /* Pods-IMTreeView_Example */ = { 280 | isa = PBXNativeTarget; 281 | buildConfigurationList = 65363039423A48C3227BF0B05DD37F86 /* Build configuration list for PBXNativeTarget "Pods-IMTreeView_Example" */; 282 | buildPhases = ( 283 | EB138CC170BDEEF9BE7EE595F4755072 /* Sources */, 284 | B9DCF06C8F534187DEE979046757761C /* Frameworks */, 285 | 9622932C3A8CA6EC7E4EF59EC31B0F10 /* Headers */, 286 | ); 287 | buildRules = ( 288 | ); 289 | dependencies = ( 290 | A6FFDAF37F0F018FF996CFDF1BEFD930 /* PBXTargetDependency */, 291 | ); 292 | name = "Pods-IMTreeView_Example"; 293 | productName = "Pods-IMTreeView_Example"; 294 | productReference = B7968459FC459AAAB820DB23C06D22A9 /* Pods_IMTreeView_Example.framework */; 295 | productType = "com.apple.product-type.framework"; 296 | }; 297 | 05430E12806E9E50E61F9A021B4D1612 /* Pods-IMTreeView_Tests */ = { 298 | isa = PBXNativeTarget; 299 | buildConfigurationList = 2B6B7DBC71139B891228C173D92A7569 /* Build configuration list for PBXNativeTarget "Pods-IMTreeView_Tests" */; 300 | buildPhases = ( 301 | 18F6397BF86C5051564C3FCC55D59EB6 /* Sources */, 302 | 23401705C854F91CB9F5A62CF389A35E /* Frameworks */, 303 | 51E004C9AB951D38A7EE6114F6B4EAD2 /* Headers */, 304 | ); 305 | buildRules = ( 306 | ); 307 | dependencies = ( 308 | BC56B629D471B3B82C2B27189E94D2BB /* PBXTargetDependency */, 309 | ); 310 | name = "Pods-IMTreeView_Tests"; 311 | productName = "Pods-IMTreeView_Tests"; 312 | productReference = F6DCA549509821EB13CE2CCF03D672F5 /* Pods_IMTreeView_Tests.framework */; 313 | productType = "com.apple.product-type.framework"; 314 | }; 315 | 58BB8B2E37D952FAE8F4D1CB46EC7AC9 /* IMTreeView */ = { 316 | isa = PBXNativeTarget; 317 | buildConfigurationList = D96A18EFF2F3AD4C7FD49CDB298AEEA9 /* Build configuration list for PBXNativeTarget "IMTreeView" */; 318 | buildPhases = ( 319 | 1A73FAB36B661B1BD0F8C7798BC0198F /* Sources */, 320 | 7B552DC924C0CAF17785DF11A3676890 /* Frameworks */, 321 | 4314340B2D31C613555E55BB861D1466 /* Resources */, 322 | 361439DCA38F0B69462B1E00097CD2F1 /* Headers */, 323 | ); 324 | buildRules = ( 325 | ); 326 | dependencies = ( 327 | C9954165998ED20533E4D1FB714E731F /* PBXTargetDependency */, 328 | ); 329 | name = IMTreeView; 330 | productName = IMTreeView; 331 | productReference = 8CE794FCCC1E39F46D3AE6D9C3632545 /* IMTreeView.framework */; 332 | productType = "com.apple.product-type.framework"; 333 | }; 334 | 9FCCF3714F3246410C83EA148DD64025 /* IMTreeView-IMTreeView */ = { 335 | isa = PBXNativeTarget; 336 | buildConfigurationList = 315CC7F5333967B01639EE25F7140A90 /* Build configuration list for PBXNativeTarget "IMTreeView-IMTreeView" */; 337 | buildPhases = ( 338 | C4DCA1932C10B4BB3057407288AA8666 /* Sources */, 339 | DDF4F4168EDD790FF9319A1A53C707FD /* Frameworks */, 340 | DDB4B4E7A23768C6C40A9328B888205F /* Resources */, 341 | ); 342 | buildRules = ( 343 | ); 344 | dependencies = ( 345 | ); 346 | name = "IMTreeView-IMTreeView"; 347 | productName = "IMTreeView-IMTreeView"; 348 | productReference = EA3CFC2A38D107D9367E2F07F154F654 /* IMTreeView.bundle */; 349 | productType = "com.apple.product-type.bundle"; 350 | }; 351 | /* End PBXNativeTarget section */ 352 | 353 | /* Begin PBXProject section */ 354 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 355 | isa = PBXProject; 356 | attributes = { 357 | LastSwiftUpdateCheck = 0700; 358 | LastUpgradeCheck = 0700; 359 | }; 360 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 361 | compatibilityVersion = "Xcode 3.2"; 362 | developmentRegion = English; 363 | hasScannedForEncodings = 0; 364 | knownRegions = ( 365 | en, 366 | ); 367 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 368 | productRefGroup = 9A1352F9691957846E1C43D59D60D0B7 /* Products */; 369 | projectDirPath = ""; 370 | projectRoot = ""; 371 | targets = ( 372 | 58BB8B2E37D952FAE8F4D1CB46EC7AC9 /* IMTreeView */, 373 | 9FCCF3714F3246410C83EA148DD64025 /* IMTreeView-IMTreeView */, 374 | 003D26CD9DC52B497394398D9A7FE7DB /* Pods-IMTreeView_Example */, 375 | 05430E12806E9E50E61F9A021B4D1612 /* Pods-IMTreeView_Tests */, 376 | ); 377 | }; 378 | /* End PBXProject section */ 379 | 380 | /* Begin PBXResourcesBuildPhase section */ 381 | 4314340B2D31C613555E55BB861D1466 /* Resources */ = { 382 | isa = PBXResourcesBuildPhase; 383 | buildActionMask = 2147483647; 384 | files = ( 385 | 51C09DD1ADED5FDAD8D0282776203AFD /* IMTreeView.bundle in Resources */, 386 | ); 387 | runOnlyForDeploymentPostprocessing = 0; 388 | }; 389 | DDB4B4E7A23768C6C40A9328B888205F /* Resources */ = { 390 | isa = PBXResourcesBuildPhase; 391 | buildActionMask = 2147483647; 392 | files = ( 393 | ); 394 | runOnlyForDeploymentPostprocessing = 0; 395 | }; 396 | /* End PBXResourcesBuildPhase section */ 397 | 398 | /* Begin PBXSourcesBuildPhase section */ 399 | 18F6397BF86C5051564C3FCC55D59EB6 /* Sources */ = { 400 | isa = PBXSourcesBuildPhase; 401 | buildActionMask = 2147483647; 402 | files = ( 403 | 28C68817A9702BD7D5EDF1BAF9FD6DB5 /* Pods-IMTreeView_Tests-dummy.m in Sources */, 404 | ); 405 | runOnlyForDeploymentPostprocessing = 0; 406 | }; 407 | 1A73FAB36B661B1BD0F8C7798BC0198F /* Sources */ = { 408 | isa = PBXSourcesBuildPhase; 409 | buildActionMask = 2147483647; 410 | files = ( 411 | 121E3B0C2010F8061F91A77340FEF9A2 /* IMTreeView-dummy.m in Sources */, 412 | 3C9BCDA61C8EA57B00AFED6A /* IMTreeView.swift in Sources */, 413 | ); 414 | runOnlyForDeploymentPostprocessing = 0; 415 | }; 416 | C4DCA1932C10B4BB3057407288AA8666 /* Sources */ = { 417 | isa = PBXSourcesBuildPhase; 418 | buildActionMask = 2147483647; 419 | files = ( 420 | ); 421 | runOnlyForDeploymentPostprocessing = 0; 422 | }; 423 | EB138CC170BDEEF9BE7EE595F4755072 /* Sources */ = { 424 | isa = PBXSourcesBuildPhase; 425 | buildActionMask = 2147483647; 426 | files = ( 427 | D72432A311C2D7C58F59690E20D6B1BC /* Pods-IMTreeView_Example-dummy.m in Sources */, 428 | ); 429 | runOnlyForDeploymentPostprocessing = 0; 430 | }; 431 | /* End PBXSourcesBuildPhase section */ 432 | 433 | /* Begin PBXTargetDependency section */ 434 | A6FFDAF37F0F018FF996CFDF1BEFD930 /* PBXTargetDependency */ = { 435 | isa = PBXTargetDependency; 436 | name = IMTreeView; 437 | target = 58BB8B2E37D952FAE8F4D1CB46EC7AC9 /* IMTreeView */; 438 | targetProxy = 01383EC56D5059E5E5FADB87E4A4E83F /* PBXContainerItemProxy */; 439 | }; 440 | BC56B629D471B3B82C2B27189E94D2BB /* PBXTargetDependency */ = { 441 | isa = PBXTargetDependency; 442 | name = IMTreeView; 443 | target = 58BB8B2E37D952FAE8F4D1CB46EC7AC9 /* IMTreeView */; 444 | targetProxy = 25724E43E8454B80EC4B305445556B4F /* PBXContainerItemProxy */; 445 | }; 446 | C9954165998ED20533E4D1FB714E731F /* PBXTargetDependency */ = { 447 | isa = PBXTargetDependency; 448 | name = "IMTreeView-IMTreeView"; 449 | target = 9FCCF3714F3246410C83EA148DD64025 /* IMTreeView-IMTreeView */; 450 | targetProxy = A936E82D8553E5304D277BD0BB81CE88 /* PBXContainerItemProxy */; 451 | }; 452 | /* End PBXTargetDependency section */ 453 | 454 | /* Begin XCBuildConfiguration section */ 455 | 10DE1947DAC0ED28F6C0A9F9BD75D546 /* Release */ = { 456 | isa = XCBuildConfiguration; 457 | buildSettings = { 458 | ALWAYS_SEARCH_USER_PATHS = NO; 459 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 460 | CLANG_CXX_LIBRARY = "libc++"; 461 | CLANG_ENABLE_MODULES = YES; 462 | CLANG_ENABLE_OBJC_ARC = YES; 463 | CLANG_WARN_BOOL_CONVERSION = YES; 464 | CLANG_WARN_CONSTANT_CONVERSION = YES; 465 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 466 | CLANG_WARN_EMPTY_BODY = YES; 467 | CLANG_WARN_ENUM_CONVERSION = YES; 468 | CLANG_WARN_INT_CONVERSION = YES; 469 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 470 | CLANG_WARN_UNREACHABLE_CODE = YES; 471 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 472 | COPY_PHASE_STRIP = YES; 473 | ENABLE_NS_ASSERTIONS = NO; 474 | GCC_C_LANGUAGE_STANDARD = gnu99; 475 | GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; 476 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 477 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 478 | GCC_WARN_UNDECLARED_SELECTOR = YES; 479 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 480 | GCC_WARN_UNUSED_FUNCTION = YES; 481 | GCC_WARN_UNUSED_VARIABLE = YES; 482 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 483 | STRIP_INSTALLED_PRODUCT = NO; 484 | SYMROOT = "${SRCROOT}/../build"; 485 | VALIDATE_PRODUCT = YES; 486 | }; 487 | name = Release; 488 | }; 489 | 17E530133DBEFBB768CC10B1EF964C36 /* Debug */ = { 490 | isa = XCBuildConfiguration; 491 | baseConfigurationReference = BDE3D3AB0C8F4940FE6062C1FBA76AB6 /* Pods-IMTreeView_Example.debug.xcconfig */; 492 | buildSettings = { 493 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 494 | CURRENT_PROJECT_VERSION = 1; 495 | DEFINES_MODULE = YES; 496 | DYLIB_COMPATIBILITY_VERSION = 1; 497 | DYLIB_CURRENT_VERSION = 1; 498 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 499 | ENABLE_STRICT_OBJC_MSGSEND = YES; 500 | INFOPLIST_FILE = "Target Support Files/Pods-IMTreeView_Example/Info.plist"; 501 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 502 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 504 | MACH_O_TYPE = staticlib; 505 | MODULEMAP_FILE = "Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example.modulemap"; 506 | MTL_ENABLE_DEBUG_INFO = YES; 507 | OTHER_LDFLAGS = ""; 508 | OTHER_LIBTOOLFLAGS = ""; 509 | PODS_ROOT = "$(SRCROOT)"; 510 | PRODUCT_NAME = Pods_IMTreeView_Example; 511 | SDKROOT = iphoneos; 512 | SKIP_INSTALL = YES; 513 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 514 | TARGETED_DEVICE_FAMILY = "1,2"; 515 | VERSIONING_SYSTEM = "apple-generic"; 516 | VERSION_INFO_PREFIX = ""; 517 | }; 518 | name = Debug; 519 | }; 520 | 36D323D8EACFDC27D9FD5933E53A4653 /* Debug */ = { 521 | isa = XCBuildConfiguration; 522 | baseConfigurationReference = 04E91C945DF46DF7FC1BF56C903F9789 /* Pods-IMTreeView_Tests.debug.xcconfig */; 523 | buildSettings = { 524 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 525 | CURRENT_PROJECT_VERSION = 1; 526 | DEFINES_MODULE = YES; 527 | DYLIB_COMPATIBILITY_VERSION = 1; 528 | DYLIB_CURRENT_VERSION = 1; 529 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 530 | ENABLE_STRICT_OBJC_MSGSEND = YES; 531 | INFOPLIST_FILE = "Target Support Files/Pods-IMTreeView_Tests/Info.plist"; 532 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 533 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 534 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 535 | MACH_O_TYPE = staticlib; 536 | MODULEMAP_FILE = "Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests.modulemap"; 537 | MTL_ENABLE_DEBUG_INFO = YES; 538 | OTHER_LDFLAGS = ""; 539 | OTHER_LIBTOOLFLAGS = ""; 540 | PODS_ROOT = "$(SRCROOT)"; 541 | PRODUCT_NAME = Pods_IMTreeView_Tests; 542 | SDKROOT = iphoneos; 543 | SKIP_INSTALL = YES; 544 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 545 | TARGETED_DEVICE_FAMILY = "1,2"; 546 | VERSIONING_SYSTEM = "apple-generic"; 547 | VERSION_INFO_PREFIX = ""; 548 | }; 549 | name = Debug; 550 | }; 551 | 42DB58311A71AD1B6E46256A27042150 /* Release */ = { 552 | isa = XCBuildConfiguration; 553 | baseConfigurationReference = 1F2E83FD5635A4457A6C2B15B01E4CDC /* IMTreeView.xcconfig */; 554 | buildSettings = { 555 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 556 | CURRENT_PROJECT_VERSION = 1; 557 | DEFINES_MODULE = YES; 558 | DYLIB_COMPATIBILITY_VERSION = 1; 559 | DYLIB_CURRENT_VERSION = 1; 560 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 561 | ENABLE_STRICT_OBJC_MSGSEND = YES; 562 | GCC_PREFIX_HEADER = "Target Support Files/IMTreeView/IMTreeView-prefix.pch"; 563 | INFOPLIST_FILE = "Target Support Files/IMTreeView/Info.plist"; 564 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 565 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 566 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 567 | MODULEMAP_FILE = "Target Support Files/IMTreeView/IMTreeView.modulemap"; 568 | MTL_ENABLE_DEBUG_INFO = NO; 569 | PRODUCT_NAME = IMTreeView; 570 | SDKROOT = iphoneos; 571 | SKIP_INSTALL = YES; 572 | TARGETED_DEVICE_FAMILY = "1,2"; 573 | VERSIONING_SYSTEM = "apple-generic"; 574 | VERSION_INFO_PREFIX = ""; 575 | }; 576 | name = Release; 577 | }; 578 | 552D02D5BA751AC2E8790D2811D496CA /* Debug */ = { 579 | isa = XCBuildConfiguration; 580 | buildSettings = { 581 | ALWAYS_SEARCH_USER_PATHS = NO; 582 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 583 | CLANG_CXX_LIBRARY = "libc++"; 584 | CLANG_ENABLE_MODULES = YES; 585 | CLANG_ENABLE_OBJC_ARC = YES; 586 | CLANG_WARN_BOOL_CONVERSION = YES; 587 | CLANG_WARN_CONSTANT_CONVERSION = YES; 588 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 589 | CLANG_WARN_EMPTY_BODY = YES; 590 | CLANG_WARN_ENUM_CONVERSION = YES; 591 | CLANG_WARN_INT_CONVERSION = YES; 592 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 593 | CLANG_WARN_UNREACHABLE_CODE = YES; 594 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 595 | COPY_PHASE_STRIP = NO; 596 | GCC_C_LANGUAGE_STANDARD = gnu99; 597 | GCC_DYNAMIC_NO_PIC = NO; 598 | GCC_OPTIMIZATION_LEVEL = 0; 599 | GCC_PREPROCESSOR_DEFINITIONS = ( 600 | "DEBUG=1", 601 | "$(inherited)", 602 | ); 603 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 604 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 605 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 606 | GCC_WARN_UNDECLARED_SELECTOR = YES; 607 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 608 | GCC_WARN_UNUSED_FUNCTION = YES; 609 | GCC_WARN_UNUSED_VARIABLE = YES; 610 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 611 | ONLY_ACTIVE_ARCH = YES; 612 | STRIP_INSTALLED_PRODUCT = NO; 613 | SYMROOT = "${SRCROOT}/../build"; 614 | }; 615 | name = Debug; 616 | }; 617 | 5EDB5DF862D1FF91EBAE977A6022B4EB /* Debug */ = { 618 | isa = XCBuildConfiguration; 619 | baseConfigurationReference = 1F2E83FD5635A4457A6C2B15B01E4CDC /* IMTreeView.xcconfig */; 620 | buildSettings = { 621 | ENABLE_STRICT_OBJC_MSGSEND = YES; 622 | PRODUCT_NAME = IMTreeView; 623 | SDKROOT = iphoneos; 624 | SKIP_INSTALL = YES; 625 | WRAPPER_EXTENSION = bundle; 626 | }; 627 | name = Debug; 628 | }; 629 | C160F3B166B919876C4A7706E5B83ECD /* Debug */ = { 630 | isa = XCBuildConfiguration; 631 | baseConfigurationReference = 1F2E83FD5635A4457A6C2B15B01E4CDC /* IMTreeView.xcconfig */; 632 | buildSettings = { 633 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 634 | CURRENT_PROJECT_VERSION = 1; 635 | DEFINES_MODULE = YES; 636 | DYLIB_COMPATIBILITY_VERSION = 1; 637 | DYLIB_CURRENT_VERSION = 1; 638 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 639 | ENABLE_STRICT_OBJC_MSGSEND = YES; 640 | GCC_PREFIX_HEADER = "Target Support Files/IMTreeView/IMTreeView-prefix.pch"; 641 | INFOPLIST_FILE = "Target Support Files/IMTreeView/Info.plist"; 642 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 643 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 644 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 645 | MODULEMAP_FILE = "Target Support Files/IMTreeView/IMTreeView.modulemap"; 646 | MTL_ENABLE_DEBUG_INFO = YES; 647 | PRODUCT_NAME = IMTreeView; 648 | SDKROOT = iphoneos; 649 | SKIP_INSTALL = YES; 650 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 651 | TARGETED_DEVICE_FAMILY = "1,2"; 652 | VERSIONING_SYSTEM = "apple-generic"; 653 | VERSION_INFO_PREFIX = ""; 654 | }; 655 | name = Debug; 656 | }; 657 | DD74791BAB08E6B2505F3C450FFBE5B8 /* Release */ = { 658 | isa = XCBuildConfiguration; 659 | baseConfigurationReference = 1F2E83FD5635A4457A6C2B15B01E4CDC /* IMTreeView.xcconfig */; 660 | buildSettings = { 661 | ENABLE_STRICT_OBJC_MSGSEND = YES; 662 | PRODUCT_NAME = IMTreeView; 663 | SDKROOT = iphoneos; 664 | SKIP_INSTALL = YES; 665 | WRAPPER_EXTENSION = bundle; 666 | }; 667 | name = Release; 668 | }; 669 | EFAF1EE35151CECCC748433FD3269614 /* Release */ = { 670 | isa = XCBuildConfiguration; 671 | baseConfigurationReference = A1863D12D54D63D693391E8E3C0BE496 /* Pods-IMTreeView_Tests.release.xcconfig */; 672 | buildSettings = { 673 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 674 | CURRENT_PROJECT_VERSION = 1; 675 | DEFINES_MODULE = YES; 676 | DYLIB_COMPATIBILITY_VERSION = 1; 677 | DYLIB_CURRENT_VERSION = 1; 678 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 679 | ENABLE_STRICT_OBJC_MSGSEND = YES; 680 | INFOPLIST_FILE = "Target Support Files/Pods-IMTreeView_Tests/Info.plist"; 681 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 682 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 683 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 684 | MACH_O_TYPE = staticlib; 685 | MODULEMAP_FILE = "Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests.modulemap"; 686 | MTL_ENABLE_DEBUG_INFO = NO; 687 | OTHER_LDFLAGS = ""; 688 | OTHER_LIBTOOLFLAGS = ""; 689 | PODS_ROOT = "$(SRCROOT)"; 690 | PRODUCT_NAME = Pods_IMTreeView_Tests; 691 | SDKROOT = iphoneos; 692 | SKIP_INSTALL = YES; 693 | TARGETED_DEVICE_FAMILY = "1,2"; 694 | VERSIONING_SYSTEM = "apple-generic"; 695 | VERSION_INFO_PREFIX = ""; 696 | }; 697 | name = Release; 698 | }; 699 | F8D60AA3626EEDB918857657B9FABC7D /* Release */ = { 700 | isa = XCBuildConfiguration; 701 | baseConfigurationReference = E4B1D48DA1B0E2FE9D9776CD36E67412 /* Pods-IMTreeView_Example.release.xcconfig */; 702 | buildSettings = { 703 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 704 | CURRENT_PROJECT_VERSION = 1; 705 | DEFINES_MODULE = YES; 706 | DYLIB_COMPATIBILITY_VERSION = 1; 707 | DYLIB_CURRENT_VERSION = 1; 708 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 709 | ENABLE_STRICT_OBJC_MSGSEND = YES; 710 | INFOPLIST_FILE = "Target Support Files/Pods-IMTreeView_Example/Info.plist"; 711 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 712 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 713 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 714 | MACH_O_TYPE = staticlib; 715 | MODULEMAP_FILE = "Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example.modulemap"; 716 | MTL_ENABLE_DEBUG_INFO = NO; 717 | OTHER_LDFLAGS = ""; 718 | OTHER_LIBTOOLFLAGS = ""; 719 | PODS_ROOT = "$(SRCROOT)"; 720 | PRODUCT_NAME = Pods_IMTreeView_Example; 721 | SDKROOT = iphoneos; 722 | SKIP_INSTALL = YES; 723 | TARGETED_DEVICE_FAMILY = "1,2"; 724 | VERSIONING_SYSTEM = "apple-generic"; 725 | VERSION_INFO_PREFIX = ""; 726 | }; 727 | name = Release; 728 | }; 729 | /* End XCBuildConfiguration section */ 730 | 731 | /* Begin XCConfigurationList section */ 732 | 2B6B7DBC71139B891228C173D92A7569 /* Build configuration list for PBXNativeTarget "Pods-IMTreeView_Tests" */ = { 733 | isa = XCConfigurationList; 734 | buildConfigurations = ( 735 | 36D323D8EACFDC27D9FD5933E53A4653 /* Debug */, 736 | EFAF1EE35151CECCC748433FD3269614 /* Release */, 737 | ); 738 | defaultConfigurationIsVisible = 0; 739 | defaultConfigurationName = Release; 740 | }; 741 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 742 | isa = XCConfigurationList; 743 | buildConfigurations = ( 744 | 552D02D5BA751AC2E8790D2811D496CA /* Debug */, 745 | 10DE1947DAC0ED28F6C0A9F9BD75D546 /* Release */, 746 | ); 747 | defaultConfigurationIsVisible = 0; 748 | defaultConfigurationName = Release; 749 | }; 750 | 315CC7F5333967B01639EE25F7140A90 /* Build configuration list for PBXNativeTarget "IMTreeView-IMTreeView" */ = { 751 | isa = XCConfigurationList; 752 | buildConfigurations = ( 753 | 5EDB5DF862D1FF91EBAE977A6022B4EB /* Debug */, 754 | DD74791BAB08E6B2505F3C450FFBE5B8 /* Release */, 755 | ); 756 | defaultConfigurationIsVisible = 0; 757 | defaultConfigurationName = Release; 758 | }; 759 | 65363039423A48C3227BF0B05DD37F86 /* Build configuration list for PBXNativeTarget "Pods-IMTreeView_Example" */ = { 760 | isa = XCConfigurationList; 761 | buildConfigurations = ( 762 | 17E530133DBEFBB768CC10B1EF964C36 /* Debug */, 763 | F8D60AA3626EEDB918857657B9FABC7D /* Release */, 764 | ); 765 | defaultConfigurationIsVisible = 0; 766 | defaultConfigurationName = Release; 767 | }; 768 | D96A18EFF2F3AD4C7FD49CDB298AEEA9 /* Build configuration list for PBXNativeTarget "IMTreeView" */ = { 769 | isa = XCConfigurationList; 770 | buildConfigurations = ( 771 | C160F3B166B919876C4A7706E5B83ECD /* Debug */, 772 | 42DB58311A71AD1B6E46256A27042150 /* Release */, 773 | ); 774 | defaultConfigurationIsVisible = 0; 775 | defaultConfigurationName = Release; 776 | }; 777 | /* End XCConfigurationList section */ 778 | }; 779 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 780 | } 781 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/IMTreeView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IMTreeView/IMTreeView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_IMTreeView : NSObject 3 | @end 4 | @implementation PodsDummy_IMTreeView 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IMTreeView/IMTreeView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IMTreeView/IMTreeView-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double IMTreeViewVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char IMTreeViewVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IMTreeView/IMTreeView.modulemap: -------------------------------------------------------------------------------- 1 | framework module IMTreeView { 2 | umbrella header "IMTreeView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IMTreeView/IMTreeView.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/IMTreeView" "${PODS_ROOT}/Headers/Public" 3 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IMTreeView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## IMTreeView 5 | 6 | Copyright (c) 2016 Ian McDowell 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - http://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2016 Ian McDowell <ian@ianmcdowell.net> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | IMTreeView 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - http://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_IMTreeView_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_IMTreeView_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | 86 | if [[ "$CONFIGURATION" == "Debug" ]]; then 87 | install_framework "Pods-IMTreeView_Example/IMTreeView.framework" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_framework "Pods-IMTreeView_Example/IMTreeView.framework" 91 | fi 92 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | realpath() { 12 | DIRECTORY="$(cd "${1%/*}" && pwd)" 13 | FILENAME="${1##*/}" 14 | echo "$DIRECTORY/$FILENAME" 15 | } 16 | 17 | install_resource() 18 | { 19 | case $1 in 20 | *.storyboard) 21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 23 | ;; 24 | *.xib) 25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 27 | ;; 28 | *.framework) 29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 33 | ;; 34 | *.xcdatamodel) 35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 37 | ;; 38 | *.xcdatamodeld) 39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 41 | ;; 42 | *.xcmappingmodel) 43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 45 | ;; 46 | *.xcassets) 47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") 48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 49 | ;; 50 | /*) 51 | echo "$1" 52 | echo "$1" >> "$RESOURCES_TO_COPY" 53 | ;; 54 | *) 55 | echo "${PODS_ROOT}/$1" 56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 57 | ;; 58 | esac 59 | } 60 | 61 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 62 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 63 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 64 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 65 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 66 | fi 67 | rm -f "$RESOURCES_TO_COPY" 68 | 69 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 70 | then 71 | case "${TARGETED_DEVICE_FAMILY}" in 72 | 1,2) 73 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 74 | ;; 75 | 1) 76 | TARGET_DEVICE_ARGS="--target-device iphone" 77 | ;; 78 | 2) 79 | TARGET_DEVICE_ARGS="--target-device ipad" 80 | ;; 81 | *) 82 | TARGET_DEVICE_ARGS="--target-device mac" 83 | ;; 84 | esac 85 | 86 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 87 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 88 | while read line; do 89 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 90 | XCASSET_FILES+=("$line") 91 | fi 92 | done <<<"$OTHER_XCASSETS" 93 | 94 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 95 | fi 96 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_IMTreeView_ExampleVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_IMTreeView_ExampleVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/IMTreeView.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "IMTreeView" 6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-IMTreeView_Example 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_IMTreeView_Example { 2 | umbrella header "Pods-IMTreeView_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Example/Pods-IMTreeView_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/IMTreeView.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "IMTreeView" 6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-IMTreeView_Example 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## IMTreeView 5 | 6 | Copyright (c) 2016 Ian McDowell 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - http://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2016 Ian McDowell <ian@ianmcdowell.net> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | IMTreeView 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - http://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_IMTreeView_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_IMTreeView_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | 86 | if [[ "$CONFIGURATION" == "Debug" ]]; then 87 | install_framework "Pods-IMTreeView_Tests/IMTreeView.framework" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_framework "Pods-IMTreeView_Tests/IMTreeView.framework" 91 | fi 92 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | realpath() { 12 | DIRECTORY="$(cd "${1%/*}" && pwd)" 13 | FILENAME="${1##*/}" 14 | echo "$DIRECTORY/$FILENAME" 15 | } 16 | 17 | install_resource() 18 | { 19 | case $1 in 20 | *.storyboard) 21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 23 | ;; 24 | *.xib) 25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 27 | ;; 28 | *.framework) 29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 33 | ;; 34 | *.xcdatamodel) 35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 37 | ;; 38 | *.xcdatamodeld) 39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 41 | ;; 42 | *.xcmappingmodel) 43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 45 | ;; 46 | *.xcassets) 47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") 48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 49 | ;; 50 | /*) 51 | echo "$1" 52 | echo "$1" >> "$RESOURCES_TO_COPY" 53 | ;; 54 | *) 55 | echo "${PODS_ROOT}/$1" 56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 57 | ;; 58 | esac 59 | } 60 | 61 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 62 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 63 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 64 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 65 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 66 | fi 67 | rm -f "$RESOURCES_TO_COPY" 68 | 69 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 70 | then 71 | case "${TARGETED_DEVICE_FAMILY}" in 72 | 1,2) 73 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 74 | ;; 75 | 1) 76 | TARGET_DEVICE_ARGS="--target-device iphone" 77 | ;; 78 | 2) 79 | TARGET_DEVICE_ARGS="--target-device ipad" 80 | ;; 81 | *) 82 | TARGET_DEVICE_ARGS="--target-device mac" 83 | ;; 84 | esac 85 | 86 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 87 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 88 | while read line; do 89 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 90 | XCASSET_FILES+=("$line") 91 | fi 92 | done <<<"$OTHER_XCASSETS" 93 | 94 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 95 | fi 96 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_IMTreeView_TestsVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_IMTreeView_TestsVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/IMTreeView.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "IMTreeView" 6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-IMTreeView_Tests 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_IMTreeView_Tests { 2 | umbrella header "Pods-IMTreeView_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-IMTreeView_Tests/Pods-IMTreeView_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/IMTreeView.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "IMTreeView" 6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-IMTreeView_Tests 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /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/Tests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | import IMTreeView 4 | 5 | class Tests: XCTestCase { 6 | 7 | override func setUp() { 8 | super.setUp() 9 | // Put setup code here. This method is called before the invocation of each test method in the class. 10 | } 11 | 12 | override func tearDown() { 13 | // Put teardown code here. This method is called after the invocation of each test method in the class. 14 | super.tearDown() 15 | } 16 | 17 | func testExample() { 18 | // This is an example of a functional test case. 19 | XCTAssert(true, "Pass") 20 | } 21 | 22 | func testPerformanceExample() { 23 | // This is an example of a performance test case. 24 | self.measureBlock() { 25 | // Put the code you want to measure the time of here. 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /IMTreeView.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint IMTreeView.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 = "IMTreeView" 11 | s.version = "1.0.0" 12 | s.summary = "Display tree structures with a UITableView." 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | s.description = <<-DESC 20 | IMTreeView is an extension to UITableView that allows you to display any number of rows within rows. It allows you to expand and collapse rows, and perform any actions you would with a UITableView. 21 | DESC 22 | 23 | s.homepage = "https://github.com/IMcD23/IMTreeView" 24 | # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2" 25 | s.license = 'MIT' 26 | s.author = { "Ian McDowell" => "mcdow.ian@gmail.com" } 27 | s.source = { :git => "https://github.com/IMcD23/IMTreeView.git", :tag => s.version.to_s } 28 | s.social_media_url = 'https://twitter.com/ian_mcdowell' 29 | 30 | s.platform = :ios, '8.0' 31 | s.requires_arc = true 32 | 33 | s.source_files = 'Pod/Classes/**/*' 34 | s.resource_bundles = { 35 | 'IMTreeView' => ['Pod/Assets/*.png'] 36 | } 37 | 38 | # s.public_header_files = 'Pod/Classes/**/*.h' 39 | # s.frameworks = 'UIKit', 'MapKit' 40 | # s.dependency 'AFNetworking', '~> 2.3' 41 | end 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Ian McDowell 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 | -------------------------------------------------------------------------------- /Pod/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ian-mcdowell/IMTreeView/afeeea1690943c60293a08842a1513cd2767ab6c/Pod/Assets/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ian-mcdowell/IMTreeView/afeeea1690943c60293a08842a1513cd2767ab6c/Pod/Classes/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/IMTreeView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IMTreeView.swift 3 | // rslash 4 | // 5 | // Created by Ian McDowell on 3/7/16. 6 | // Copyright © 2016 Ian McDowell. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// This class contains variables useful to the extended UITableView. Since you can't define variables 12 | /// in an extension, they are static variables here. 13 | public class IMTreeView { 14 | 15 | /// Static dictionary containing all tree views used by the application. 16 | private static var treeViews = [Int: IMTreeView]() 17 | 18 | /// Returns the IMTreeView object for a tableView, and if it doesn't exist, it creates one. 19 | public static func get(treeView: UITableView) -> IMTreeView { 20 | let hash = treeView.hashValue // a hash value reference to the tableView, in case it gets deallocated later 21 | 22 | //let wtv = WeakTableView(treeView) 23 | if let tv = IMTreeView.treeViews[hash] { 24 | return tv 25 | } 26 | let tv = IMTreeView() 27 | IMTreeView.treeViews[hash] = tv 28 | return tv 29 | } 30 | 31 | /// Private internal storage for the library. Maps `NSIndexPath`s to the number of children they have. 32 | private var model = [NSIndexPath: Int]() 33 | 34 | /// Private internal storage for the library. Maps `NSIndexPath`s to the number of children they have. 35 | private var directModel = [NSIndexPath: Int]() 36 | 37 | /// The animation to use when expanding 38 | public var expandingAnimation: UITableViewRowAnimation = .Automatic 39 | 40 | /// The animation to use when collapsing 41 | public var collapsingAnimation: UITableViewRowAnimation = .Automatic 42 | } 43 | 44 | 45 | /// The protocol that is a data source for a n-deep tree view. This _MUST_ be applied to the same datasource as the `UITableViewDataSource`! 46 | /// All methods are optional. 47 | public protocol IMTreeViewDataSource { 48 | func tableView(tableView: UITableView, numberOfChildrenForIndexPath indexPath: NSIndexPath) -> Int 49 | func tableView(tableView: UITableView, isCellExpandedAtIndexPath indexPath: NSIndexPath) -> Bool 50 | } 51 | 52 | 53 | /// This extension on the IMTreeViewDataSource defines the default implementations of the data source methods. 54 | public extension IMTreeViewDataSource { 55 | func tableView(tableView: UITableView, numberOfChildrenForIndexPath indexPath: NSIndexPath) -> Int { 56 | return 0 57 | } 58 | func tableView(tableView: UITableView, isCellExpandedAtIndexPath indexPath: NSIndexPath) -> Bool { 59 | return true 60 | } 61 | } 62 | 63 | 64 | /// The core of this library is an extension of UITableView. This was decided for a number of reasons. 65 | /// 66 | /// - 1: You can use the set of APIs you are already familiar with 67 | /// - 2: All obscure and future APIs added to UITableView will automatically be usable. 68 | /// - 3: This allows a developer to migrate their code to use a tree structure from a 2D structure relatively easily. 69 | /// 70 | /// There are a number of limitations and drawbacks to going by this approach. 71 | /// 72 | /// - 1: The UITableView still requires a UITableViewDataSource, meaning you must implement the basic 3 methods. 73 | /// `tableView:numberOfRowsInSection(_)` may be confusing to developers, since a section contains rows, with rows 74 | /// within them, which may be hard to count. Fortunately, the developer doesn't have to count these themself. It is 75 | /// recommended to use the `numberOfItemsInSection(section)` method (part of the extension), which uses the 76 | /// IMTreeViewDataSource methods to count this information. 77 | /// - 2: In order to switch a UITableView into a tree-based tableview, you must also implement a separate datasource: 78 | /// `IMTreeViewDataSource`. This contains tree-specific methods. 79 | /// - 3: All UITableViews in the application will be extended, since that is how extending a class works. This library has been 80 | /// designed not to mess with the default implementation of a UITableView, and will not mess with UITableViews whose dataSources 81 | /// are not also `IMTreeViewDataSource`s. 82 | public extension UITableView { 83 | 84 | 85 | // MARK: Public 86 | 87 | 88 | /// Returns the number if items in the given section of the tree 89 | /// 90 | /// - Parameter section: The section of the table view 91 | /// - Returns: The number of items (and sub-items) in the section 92 | public func numberOfItemsInSection(section: Int) -> Int { 93 | var rows = 0 94 | if let ds = self.dataSource as? IMTreeViewDataSource { 95 | rows = ds.tableView(self, numberOfChildrenForIndexPath: NSIndexPath(index: section)) 96 | } 97 | var totalRowsCount = rows 98 | 99 | let ip = NSIndexPath(index: section) 100 | IMTreeView.get(self).directModel[ip] = rows 101 | 102 | for i in 0.. Bool { 134 | return IMTreeView.get(self).directModel[indexPath] != nil 135 | } 136 | 137 | 138 | /// Collapses the row at the given index path 139 | /// 140 | /// - Parameter indexPath: The index path to collapse 141 | public func collapse(indexPath: NSIndexPath) { 142 | if !self.isExpanded(indexPath) { 143 | return 144 | } 145 | 146 | let dismissRows = self.getRowsToCollapse(indexPath) 147 | 148 | self.deleteRowsAtIndexPaths(dismissRows, withRowAnimation: IMTreeView.get(self).collapsingAnimation) 149 | } 150 | 151 | 152 | /// Returns the sibling index paths to the given one. (rows at the same level, with the same parent) 153 | /// 154 | /// - Parameter indexPath: The index path to find siblings of 155 | /// - Returns: An array of index paths containing the siblings. Does not include the given indexPath 156 | public func siblings(indexPath: NSIndexPath) -> [NSIndexPath] { 157 | let parent = self.parent(indexPath) 158 | var arr = [NSIndexPath]() 159 | 160 | for i in 0 ..< self.numberOfSections { 161 | var ip: NSIndexPath 162 | if parent != nil { 163 | ip = parent!.indexPathByAddingIndex(i) 164 | } else { 165 | ip = NSIndexPath(index: i) 166 | } 167 | 168 | if ip.compare(indexPath) != .OrderedSame { 169 | arr.append(ip) 170 | } 171 | } 172 | return arr 173 | } 174 | 175 | 176 | /// Gets the parent of a given index path (n-dimensional). If there is no parent, it will return nil. 177 | /// 178 | /// - Returns: An optional index path that represents the parent. 179 | public func parent(indexPath: NSIndexPath) -> NSIndexPath? { 180 | if indexPath.length > 1 { 181 | return indexPath.indexPathByRemovingLastIndex() 182 | } 183 | return nil 184 | } 185 | 186 | 187 | /// Convenience method to return the `UITableViewCell` for the given tree index path (n-dimensional) 188 | public func cellForRowAtTreeIndexPath(indexPath: NSIndexPath) -> UITableViewCell { 189 | return self.cellForRowAtIndexPath(self.tableIndexPathFromTreePath(indexPath))! 190 | } 191 | 192 | 193 | /// Convenience method to get the tree index path of a cell (n-dimensional) 194 | public func treeIndexPathForCell(cell: UITableViewCell) -> NSIndexPath { 195 | return self.treeIndexPathFromTablePath(self.indexPathForCell(cell)!) 196 | } 197 | 198 | 199 | /// Coverts multidimensional indexPath into 2d UITableView-like indexPath. 200 | /// 201 | /// This method is required to prepare indexPath parameter when calling original UITableView's methods. 202 | public func tableIndexPathFromTreePath(indexPath: NSIndexPath) -> NSIndexPath { 203 | let row = self.rowOffsetForIndexPath(indexPath) 204 | return NSIndexPath(forRow: row, inSection: 0) 205 | } 206 | 207 | 208 | /// Converts UITableTable 2d indexPath into multidimentional indexPath. 209 | /// 210 | /// - Parameter indexPath: 2d UITableView-like index path 211 | /// - Returns: multidimantional TreeView-like indexPath. 212 | public func treeIndexPathFromTablePath(indexPath: NSIndexPath) -> NSIndexPath { 213 | var count = 0 214 | 215 | let section = indexPath.section 216 | let row = indexPath.row 217 | 218 | let ip = NSIndexPath(index: section) 219 | guard let rowsCount = IMTreeView.get(self).directModel[ip] else { 220 | return NSIndexPath() 221 | } 222 | 223 | for i in 0 ..< rowsCount { 224 | let ip = NSIndexPath(forRow: i, inSection: section) 225 | 226 | if row == count { 227 | return ip 228 | } 229 | 230 | let numValue = IMTreeView.get(self).model[ip]! 231 | 232 | count += 1 233 | 234 | if row < numValue + count { 235 | return self.treeIndexOfRow(row - count, root: ip, offset: count) 236 | } 237 | 238 | count += numValue 239 | } 240 | 241 | return NSIndexPath() 242 | } 243 | 244 | 245 | 246 | 247 | // MARK: Private 248 | 249 | 250 | /// Similar to `getRowsToCollapse(_)` 251 | /// Used when calling `expand(_)`, and returns all children that need to be added to the tableView. 252 | /// This method is recursive 253 | /// 254 | /// - Returns: An array of index paths which need to be added 255 | private func getRowsToExpand(indexPath: NSIndexPath) -> [NSIndexPath] { 256 | var rows = [NSIndexPath]() 257 | 258 | let section = indexPath.section 259 | let count = IMTreeView.get(self).directModel[indexPath] 260 | 261 | if count > 0 { 262 | for var i = 0; i < count; i += 1 { 263 | rows.appendContentsOf(self.getRowsToExpand(indexPath.indexPathByAddingIndex(i))) 264 | } 265 | 266 | for var i = 0; i < count; i += 1 { 267 | rows.append(NSIndexPath(forRow: self.rowOffsetForIndexPath(indexPath.indexPathByAddingIndex(i)), inSection: section)) 268 | } 269 | } 270 | 271 | return rows 272 | } 273 | 274 | 275 | /// Similar to `getRowsToExpand(_)` 276 | /// Used when calling `collapse(_)`, and returns all children that need to be remvoed from the tableView. 277 | /// This method is recursive 278 | /// 279 | /// - Returns: An array of index paths which need to be removed 280 | private func getRowsToCollapse(indexPath: NSIndexPath) -> [NSIndexPath] { 281 | var rows = [NSIndexPath]() 282 | 283 | let section = indexPath.section 284 | let count = IMTreeView.get(self).directModel[indexPath] 285 | 286 | if count > 0 { 287 | for i in 0 ..< count! { 288 | rows.append(NSIndexPath(forRow: self.rowOffsetForIndexPath(indexPath.indexPathByAddingIndex(i)), inSection: section)) 289 | } 290 | 291 | for var i = count! - 1; i >= 0; i -= 1 { 292 | rows.appendContentsOf(self.getRowsToCollapse(indexPath.indexPathByAddingIndex(i))) 293 | } 294 | } 295 | 296 | IMTreeView.get(self).model.removeValueForKey(indexPath) 297 | IMTreeView.get(self).directModel.removeValueForKey(indexPath) 298 | 299 | return rows 300 | } 301 | 302 | 303 | /// Calls the recursive method `rowOffsetForIndexPath(_,_)`, which is defined below. 304 | /// Begins with the given index path, and the root being an index path with an index of the first index of the given index path. 305 | private func rowOffsetForIndexPath(indexPath: NSIndexPath) -> Int { 306 | let section = indexPath.indexAtPosition(0) 307 | let ip = NSIndexPath(index: section) 308 | 309 | return self.rowOffsetForIndexPath(indexPath, root: ip) 310 | } 311 | 312 | 313 | /// Determines the offset of a given index path, beginning at a given root. 314 | /// This will represent the location of the n-dimensional index path within the 2D space of the tableView. 315 | /// 316 | /// Traverses the indexPath up _recursively_, tallying up all the rows. 317 | /// 318 | /// - Parameter indexPath: The index path we are trying to find the offset of 319 | /// - Parameter root: The root index path that we are finding the distance to 320 | /// - Returns: An offset (int), which is the distance between the two. 321 | private func rowOffsetForIndexPath(indexPath: NSIndexPath, root: NSIndexPath) -> Int { 322 | if indexPath.compare(root) == .OrderedSame { 323 | return 0 324 | } 325 | 326 | var totalCount = 0 327 | if root.length > 1 { 328 | totalCount += 1 329 | } 330 | 331 | var subitemsCount = 0 332 | if let num = IMTreeView.get(self).directModel[root] { 333 | subitemsCount = num 334 | } else if let ds = self.dataSource as? IMTreeViewDataSource { 335 | if ds.tableView(self, isCellExpandedAtIndexPath: root) { 336 | subitemsCount = ds.tableView(self, numberOfChildrenForIndexPath: root) 337 | } 338 | } 339 | 340 | for i in 0 ..< subitemsCount { 341 | let ip = root.indexPathByAddingIndex(i) 342 | 343 | if ip.compare(indexPath) != .OrderedAscending { 344 | break 345 | } 346 | 347 | totalCount += self.rowOffsetForIndexPath(indexPath, root: ip) 348 | } 349 | 350 | return totalCount 351 | } 352 | 353 | 354 | /// Determines the indexPath in the tree of a row in the tableView. This is the opposite of `rowOffsetForIndexPath(_,_)`. 355 | /// This method is called by `treeIndexPathFromTablePath(_)`, and is recursive. 356 | /// 357 | /// - Parameter row: 358 | /// - Parameter root: The root index path to base it off of 359 | /// - Parameter offset: 360 | /// - Returns: An n-dimensional index path that represents the location in the tree. 361 | private func treeIndexOfRow(row: Int, root: NSIndexPath, offset: Int) -> NSIndexPath { 362 | var count = 0 363 | 364 | var ip: NSIndexPath! = nil 365 | let num = IMTreeView.get(self).model[root]! 366 | 367 | if num == 0 { 368 | return root 369 | } 370 | 371 | for i in 0 ..< num { 372 | ip = root.indexPathByAddingIndex(i) 373 | 374 | if row == count { 375 | return ip 376 | } 377 | 378 | let numValue = IMTreeView.get(self).model[ip]! 379 | 380 | count += 1 381 | if row < numValue + count { 382 | return self.treeIndexOfRow(row - count, root: ip, offset: count) 383 | } 384 | 385 | count += numValue 386 | } 387 | 388 | return ip 389 | } 390 | 391 | 392 | /// Calculates the number of children, by asking the datasource. 393 | /// 394 | /// - Returns the count of the children of the item at the indexpath 395 | private func numberOfChildren(indexPath: NSIndexPath) -> Int { 396 | if self.dataSource == nil { 397 | return 0 398 | } 399 | 400 | var count = 0 401 | 402 | var isExpanded = false 403 | if indexPath.length == 1 { 404 | isExpanded = true 405 | } else if let ds = self.dataSource as? IMTreeViewDataSource { 406 | isExpanded = ds.tableView(self, isCellExpandedAtIndexPath: indexPath) 407 | } 408 | 409 | if isExpanded { 410 | var subitemsCount = 0 411 | if let ds = self.dataSource as? IMTreeViewDataSource { 412 | subitemsCount = ds.tableView(self, numberOfChildrenForIndexPath: indexPath) 413 | } 414 | 415 | for i in 0.. Int { 48 | return 1 // or however many you would like to 49 | } 50 | 51 | func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 52 | 53 | // this allows the tableView to function as a tree 54 | return tableView.numberOfItemsInSection(section) 55 | 56 | } 57 | 58 | func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 59 | 60 | // convert the tableView indexPath to a tree-based indexPath 61 | let treeIndexPath = tableView.treeIndexPathFromTablePath(indexPath) 62 | 63 | // retrieve the data to display 64 | let node = self.nodeAtIndexPath(treeIndexPath) 65 | 66 | // to determine indentation 67 | let level = treeIndexPath.length - 2 68 | 69 | // get a cell 70 | let cell = tableView.dequeueReusableCellWithIdentifier("identifier", forIndexPath: indexPath) 71 | 72 | // configure cell 73 | cell.textLabel?.text = node.title 74 | cell.indentationLevel = level 75 | 76 | return cell 77 | } 78 | 79 | 80 | // MARK: IMTreeViewDataSource 81 | 82 | func tableView(tableView: UITableView, numberOfChildrenForIndexPath indexPath: NSIndexPath) -> Int { 83 | if indexPath.length == 1 { 84 | // return the number of root nodes 85 | return self.nodes.count 86 | } else { 87 | // return the number of children of this node 88 | let node = self.nodeAtIndexPath(indexPath) 89 | return node.children.count 90 | } 91 | } 92 | 93 | func tableView(tableView: UITableView, isCellExpandedAtIndexPath indexPath: NSIndexPath) -> Bool { 94 | return true // if supporting collapsing, you should return whether this indexPath is expanded. 95 | } 96 | 97 | 98 | // MARK: Helpers 99 | 100 | func nodeAtIndexPath(indexPath: NSIndexPath) -> Node { 101 | // see example project for implementation 102 | } 103 | 104 | ``` 105 | 106 | ## Author 107 | 108 | Ian McDowell, mcdow.ian@gmail.com 109 | 110 | ## License 111 | 112 | IMTreeView is available under the MIT license. See the LICENSE file for more info. 113 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ian-mcdowell/IMTreeView/afeeea1690943c60293a08842a1513cd2767ab6c/screenshot.png --------------------------------------------------------------------------------