├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── custom-issue.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── Examples ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── TreeView.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── Pods-TreeViewExample │ │ ├── Info.plist │ │ ├── Pods-TreeViewExample-acknowledgements.markdown │ │ ├── Pods-TreeViewExample-acknowledgements.plist │ │ ├── Pods-TreeViewExample-dummy.m │ │ ├── Pods-TreeViewExample-frameworks.sh │ │ ├── Pods-TreeViewExample-resources.sh │ │ ├── Pods-TreeViewExample-umbrella.h │ │ ├── Pods-TreeViewExample.debug.xcconfig │ │ ├── Pods-TreeViewExample.modulemap │ │ └── Pods-TreeViewExample.release.xcconfig │ │ └── TreeView │ │ ├── Info.plist │ │ ├── TreeView-dummy.m │ │ ├── TreeView-prefix.pch │ │ ├── TreeView-umbrella.h │ │ ├── TreeView.modulemap │ │ └── TreeView.xcconfig ├── Res │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ └── Info.plist ├── Src │ ├── AppDelegate.swift │ ├── Bridge.h │ └── UI │ │ ├── LaunchScreen.storyboard │ │ ├── Main.storyboard │ │ ├── Modules │ │ ├── TreeModule.swift │ │ ├── fileSystem-asTree │ │ │ ├── FileFinderExample.h │ │ │ └── FileFinderExample.m │ │ ├── inSwift-4.2 │ │ │ └── SwiftExample.swift │ │ └── plist-allExpanded-byDefault │ │ │ ├── Easy.plist │ │ │ ├── PListExample.h │ │ │ └── PListExample.m │ │ ├── SelectViewController.swift │ │ └── TableViewController.swift ├── TreeViewExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── TreeViewExample.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── WorkspaceSettings.xcsettings ├── LICENSE ├── README.md ├── TreeTable ├── TreeTable.h └── TreeTable.m ├── TreeView.podspec └── concept.jpg /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at kernel@reimplement.mobi. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | **Thanks for landing on _Contributing_ page!** 4 | 5 | TreeView is very tiny library such that you probably could read its source code in under a few minutes.
6 | If you did and found a place for improvement, fix or new feature - feel free to send Pull Request. 7 | 8 | There are no strict rules on how to organize new submissions.
9 | Use your best judgment when creating your requests. 10 | 11 | In addition if you encounter a problem when trying to use this library in personal project feel free to ask for suggestions by creating new Issue. 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **Version (how did you install this library):** 11 | - Version: [e.g. "1.1.2" via CocoaPods] 12 | - Version: [e.g. Files drop-in using latest version from master branch] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue 3 | about: Describe this issue template's purpose here. 4 | 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ** List request details below. 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | !default.xcworkspace 13 | xcuserdata 14 | profile 15 | *.moved-aside 16 | DerivedData 17 | .idea/ 18 | -------------------------------------------------------------------------------- /Examples/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '10.0' 2 | 3 | target 'TreeViewExample' do 4 | use_frameworks! 5 | 6 | pod 'TreeView', :path => '../' 7 | end 8 | -------------------------------------------------------------------------------- /Examples/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - TreeView (1.1.3) 3 | 4 | DEPENDENCIES: 5 | - TreeView (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | TreeView: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | TreeView: c76ffa95d0d9267cb78cd926d7cd6eeda6657216 13 | 14 | PODFILE CHECKSUM: d28dc412c1892263aec1c60ba4ffe521c0a42020 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Examples/Pods/Local Podspecs/TreeView.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TreeView", 3 | "version": "1.1.3", 4 | "platforms": { 5 | "ios": "8.0" 6 | }, 7 | "requires_arc": true, 8 | "summary": "Sub-cells simplified. ©", 9 | "description": "TreeView is a \"proxy\" object that sits between UITableView and UIViewController, \nproxies all calls to data source and converts 2d-like indexPaths (0-0, 0-1, ...) into N-depth indexPaths (0-0, 0-0-1, 0-0-2, 0-1-0-1, ...)\nso you can have nested subcells within native UITableView.", 10 | "homepage": "https://github.com/genkernel/TreeView", 11 | "license": { 12 | "type": "MIT", 13 | "file": "LICENSE" 14 | }, 15 | "authors": { 16 | "kernel": "kernel@reimplement.mobi" 17 | }, 18 | "source": { 19 | "git": "https://github.com/genkernel/TreeView.git", 20 | "tag": "1.1.3" 21 | }, 22 | "source_files": "TreeTable/*.{h,m}" 23 | } 24 | -------------------------------------------------------------------------------- /Examples/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - TreeView (1.1.3) 3 | 4 | DEPENDENCIES: 5 | - TreeView (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | TreeView: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | TreeView: c76ffa95d0d9267cb78cd926d7cd6eeda6657216 13 | 14 | PODFILE CHECKSUM: d28dc412c1892263aec1c60ba4ffe521c0a42020 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Examples/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 | 072EF36DB2742C2CF37278C2FD9E4F74 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 11 | 0C70D401497C7621D5EEC1EC262B0676 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 12 | 16760DB4562890A9B49BA0E2CBEF47F5 /* TreeView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E17E24BB2CE25836232FBED15FF1ADBE /* TreeView-dummy.m */; }; 13 | 39A304EF1331B69E0AF33849D3361E01 /* Pods-TreeViewExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DCB9159D54B6F216E819CA10CB16C2B8 /* Pods-TreeViewExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | 4CCA04EDF0EE339E0208CCBB13C41EDC /* TreeTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D1858CA0EEDFF81D8301393790BA4F1 /* TreeTable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | 9123E8F22C7CFFFDFE914EF5F730CE3A /* TreeView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B97F99DE9A64B06AB5F29C07BF5D4DA /* TreeView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | B2DC0F4202DB37DFFB844953617E09F2 /* Pods-TreeViewExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A7F3475832E6FE54FBEA0FF46AA822E /* Pods-TreeViewExample-dummy.m */; }; 17 | E0759927F8752FEC84FD62C1A7431ACF /* TreeTable.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D108499FC5B6AFDF60054E7DF750353 /* TreeTable.m */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 3F6830174E9027B49415128A3C49AB46 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 5727B0D3A6CAD0A91D0693ACE4B7B077; 26 | remoteInfo = TreeView; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 058888F63A728D197461EB6EB2FC6D66 /* Pods-TreeViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TreeViewExample.release.xcconfig"; sourceTree = ""; }; 32 | 074ACF24239F759793D9B3FF2FBF3B67 /* Pods-TreeViewExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TreeViewExample-frameworks.sh"; sourceTree = ""; }; 33 | 1009A808960695DFC9AAFDD5C13FE409 /* TreeView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = TreeView.xcconfig; sourceTree = ""; }; 34 | 1A1BE8A4C474722696B81104D3C79051 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; 35 | 21B577F68CB6B5E34EF60DDF7E30EB58 /* TreeView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = TreeView.modulemap; sourceTree = ""; }; 36 | 23AAD80C991BB889E6BCF5160E4C367E /* Pods-TreeViewExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-TreeViewExample.modulemap"; sourceTree = ""; }; 37 | 2A7F3475832E6FE54FBEA0FF46AA822E /* Pods-TreeViewExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-TreeViewExample-dummy.m"; sourceTree = ""; }; 38 | 2D1858CA0EEDFF81D8301393790BA4F1 /* TreeTable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TreeTable.h; path = TreeTable/TreeTable.h; sourceTree = ""; }; 39 | 31D2EA0A0590AED8651A91A5F1B8871B /* TreeView.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = TreeView.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 40 | 39D64BD8E985C4ABA0E8C3B7C3E0867D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 42 | 70092A4E66C35D6792F50D948E79F0A8 /* TreeView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TreeView-prefix.pch"; sourceTree = ""; }; 43 | 8859EE5350A700DE0E2C629ECE51DC6E /* Pods-TreeViewExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TreeViewExample-acknowledgements.plist"; sourceTree = ""; }; 44 | 917B9DADBC5745B6ABFA1B46A5BA5713 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; 45 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 46 | 9B97F99DE9A64B06AB5F29C07BF5D4DA /* TreeView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TreeView-umbrella.h"; sourceTree = ""; }; 47 | 9D108499FC5B6AFDF60054E7DF750353 /* TreeTable.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = TreeTable.m; path = TreeTable/TreeTable.m; sourceTree = ""; }; 48 | 9EE6139292902D9DF189D38EA4DC3A8A /* Pods_TreeViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_TreeViewExample.framework; path = "Pods-TreeViewExample.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | A1F769E86534ADED8DCE1E22A2E50B96 /* TreeView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = TreeView.framework; path = TreeView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | D51F0A7B2A20168EF7DE3E8C0A2ECA1F /* Pods-TreeViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TreeViewExample.debug.xcconfig"; sourceTree = ""; }; 51 | DCB9159D54B6F216E819CA10CB16C2B8 /* Pods-TreeViewExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-TreeViewExample-umbrella.h"; sourceTree = ""; }; 52 | E17E24BB2CE25836232FBED15FF1ADBE /* TreeView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "TreeView-dummy.m"; sourceTree = ""; }; 53 | E83C13D08CD3510B077A6F916E953C2E /* Pods-TreeViewExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-TreeViewExample-acknowledgements.markdown"; sourceTree = ""; }; 54 | F70B9C156D6E4EA29A8AB503C89CF9FA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | F74F8B82E77A1D928F918FC49E1E674B /* Pods-TreeViewExample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TreeViewExample-resources.sh"; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 816FA2747EE86C58FEB4C799B35C5B7C /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 072EF36DB2742C2CF37278C2FD9E4F74 /* Foundation.framework in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | EFFFBE14ED588EDD52C6BBCEB4574F78 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | 0C70D401497C7621D5EEC1EC262B0676 /* Foundation.framework in Frameworks */, 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | 7BF92C3973C6C9FB6921A4B2F40E4B03 /* TreeView */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 2D1858CA0EEDFF81D8301393790BA4F1 /* TreeTable.h */, 82 | 9D108499FC5B6AFDF60054E7DF750353 /* TreeTable.m */, 83 | 86F54BF492533AC7AB03E54D281CEA7A /* Pod */, 84 | 9464FAD7C5DCD72D007184A8FE93564A /* Support Files */, 85 | ); 86 | name = TreeView; 87 | path = ../..; 88 | sourceTree = ""; 89 | }; 90 | 7DB346D0F39D3F0E887471402A8071AB = { 91 | isa = PBXGroup; 92 | children = ( 93 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 94 | B27D5B47E7D32734827109C11F6966EB /* Development Pods */, 95 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 96 | 8D68F78DC76BF4FE3C871DDD5BD4BC03 /* Products */, 97 | CD32D5AF6C3D25BC578874C1060D42D4 /* Targets Support Files */, 98 | ); 99 | sourceTree = ""; 100 | }; 101 | 86F54BF492533AC7AB03E54D281CEA7A /* Pod */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 1A1BE8A4C474722696B81104D3C79051 /* LICENSE */, 105 | 917B9DADBC5745B6ABFA1B46A5BA5713 /* README.md */, 106 | 31D2EA0A0590AED8651A91A5F1B8871B /* TreeView.podspec */, 107 | ); 108 | name = Pod; 109 | sourceTree = ""; 110 | }; 111 | 8D68F78DC76BF4FE3C871DDD5BD4BC03 /* Products */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 9EE6139292902D9DF189D38EA4DC3A8A /* Pods_TreeViewExample.framework */, 115 | A1F769E86534ADED8DCE1E22A2E50B96 /* TreeView.framework */, 116 | ); 117 | name = Products; 118 | sourceTree = ""; 119 | }; 120 | 9464FAD7C5DCD72D007184A8FE93564A /* Support Files */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 39D64BD8E985C4ABA0E8C3B7C3E0867D /* Info.plist */, 124 | 21B577F68CB6B5E34EF60DDF7E30EB58 /* TreeView.modulemap */, 125 | 1009A808960695DFC9AAFDD5C13FE409 /* TreeView.xcconfig */, 126 | E17E24BB2CE25836232FBED15FF1ADBE /* TreeView-dummy.m */, 127 | 70092A4E66C35D6792F50D948E79F0A8 /* TreeView-prefix.pch */, 128 | 9B97F99DE9A64B06AB5F29C07BF5D4DA /* TreeView-umbrella.h */, 129 | ); 130 | name = "Support Files"; 131 | path = "Examples/Pods/Target Support Files/TreeView"; 132 | sourceTree = ""; 133 | }; 134 | 9C77D32C46E7A864AE2EEA6CBBF13FF8 /* Pods-TreeViewExample */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | F70B9C156D6E4EA29A8AB503C89CF9FA /* Info.plist */, 138 | 23AAD80C991BB889E6BCF5160E4C367E /* Pods-TreeViewExample.modulemap */, 139 | E83C13D08CD3510B077A6F916E953C2E /* Pods-TreeViewExample-acknowledgements.markdown */, 140 | 8859EE5350A700DE0E2C629ECE51DC6E /* Pods-TreeViewExample-acknowledgements.plist */, 141 | 2A7F3475832E6FE54FBEA0FF46AA822E /* Pods-TreeViewExample-dummy.m */, 142 | 074ACF24239F759793D9B3FF2FBF3B67 /* Pods-TreeViewExample-frameworks.sh */, 143 | F74F8B82E77A1D928F918FC49E1E674B /* Pods-TreeViewExample-resources.sh */, 144 | DCB9159D54B6F216E819CA10CB16C2B8 /* Pods-TreeViewExample-umbrella.h */, 145 | D51F0A7B2A20168EF7DE3E8C0A2ECA1F /* Pods-TreeViewExample.debug.xcconfig */, 146 | 058888F63A728D197461EB6EB2FC6D66 /* Pods-TreeViewExample.release.xcconfig */, 147 | ); 148 | name = "Pods-TreeViewExample"; 149 | path = "Target Support Files/Pods-TreeViewExample"; 150 | sourceTree = ""; 151 | }; 152 | B27D5B47E7D32734827109C11F6966EB /* Development Pods */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 7BF92C3973C6C9FB6921A4B2F40E4B03 /* TreeView */, 156 | ); 157 | name = "Development Pods"; 158 | sourceTree = ""; 159 | }; 160 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | D35AF013A5F0BAD4F32504907A52519E /* iOS */, 164 | ); 165 | name = Frameworks; 166 | sourceTree = ""; 167 | }; 168 | CD32D5AF6C3D25BC578874C1060D42D4 /* Targets Support Files */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 9C77D32C46E7A864AE2EEA6CBBF13FF8 /* Pods-TreeViewExample */, 172 | ); 173 | name = "Targets Support Files"; 174 | sourceTree = ""; 175 | }; 176 | D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, 180 | ); 181 | name = iOS; 182 | sourceTree = ""; 183 | }; 184 | /* End PBXGroup section */ 185 | 186 | /* Begin PBXHeadersBuildPhase section */ 187 | 935AB5C271D9C886709E8033D8AF7DB3 /* Headers */ = { 188 | isa = PBXHeadersBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | 39A304EF1331B69E0AF33849D3361E01 /* Pods-TreeViewExample-umbrella.h in Headers */, 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | }; 195 | A5556C1696E3436A0F7BE368DFC9A4AF /* Headers */ = { 196 | isa = PBXHeadersBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | 4CCA04EDF0EE339E0208CCBB13C41EDC /* TreeTable.h in Headers */, 200 | 9123E8F22C7CFFFDFE914EF5F730CE3A /* TreeView-umbrella.h in Headers */, 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | }; 204 | /* End PBXHeadersBuildPhase section */ 205 | 206 | /* Begin PBXNativeTarget section */ 207 | 5727B0D3A6CAD0A91D0693ACE4B7B077 /* TreeView */ = { 208 | isa = PBXNativeTarget; 209 | buildConfigurationList = A2601596370C2AF3F7B6834172B6CEB2 /* Build configuration list for PBXNativeTarget "TreeView" */; 210 | buildPhases = ( 211 | 110738B1C44BF1D4A6EC36F65FE84E76 /* Sources */, 212 | EFFFBE14ED588EDD52C6BBCEB4574F78 /* Frameworks */, 213 | A5556C1696E3436A0F7BE368DFC9A4AF /* Headers */, 214 | ); 215 | buildRules = ( 216 | ); 217 | dependencies = ( 218 | ); 219 | name = TreeView; 220 | productName = TreeView; 221 | productReference = A1F769E86534ADED8DCE1E22A2E50B96 /* TreeView.framework */; 222 | productType = "com.apple.product-type.framework"; 223 | }; 224 | D993E914F3AE141F1F69A99D09F1F9C2 /* Pods-TreeViewExample */ = { 225 | isa = PBXNativeTarget; 226 | buildConfigurationList = 29811ABA1B77477B5809DD72BE51588D /* Build configuration list for PBXNativeTarget "Pods-TreeViewExample" */; 227 | buildPhases = ( 228 | 8A9CCA40FE411BFC212CC11B4C2007A0 /* Sources */, 229 | 816FA2747EE86C58FEB4C799B35C5B7C /* Frameworks */, 230 | 935AB5C271D9C886709E8033D8AF7DB3 /* Headers */, 231 | ); 232 | buildRules = ( 233 | ); 234 | dependencies = ( 235 | 7BC858E0D20556B65B030B7544220B97 /* PBXTargetDependency */, 236 | ); 237 | name = "Pods-TreeViewExample"; 238 | productName = "Pods-TreeViewExample"; 239 | productReference = 9EE6139292902D9DF189D38EA4DC3A8A /* Pods_TreeViewExample.framework */; 240 | productType = "com.apple.product-type.framework"; 241 | }; 242 | /* End PBXNativeTarget section */ 243 | 244 | /* Begin PBXProject section */ 245 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 246 | isa = PBXProject; 247 | attributes = { 248 | LastSwiftUpdateCheck = 0930; 249 | LastUpgradeCheck = 0930; 250 | }; 251 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 252 | compatibilityVersion = "Xcode 3.2"; 253 | developmentRegion = English; 254 | hasScannedForEncodings = 0; 255 | knownRegions = ( 256 | en, 257 | ); 258 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 259 | productRefGroup = 8D68F78DC76BF4FE3C871DDD5BD4BC03 /* Products */; 260 | projectDirPath = ""; 261 | projectRoot = ""; 262 | targets = ( 263 | D993E914F3AE141F1F69A99D09F1F9C2 /* Pods-TreeViewExample */, 264 | 5727B0D3A6CAD0A91D0693ACE4B7B077 /* TreeView */, 265 | ); 266 | }; 267 | /* End PBXProject section */ 268 | 269 | /* Begin PBXSourcesBuildPhase section */ 270 | 110738B1C44BF1D4A6EC36F65FE84E76 /* Sources */ = { 271 | isa = PBXSourcesBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | E0759927F8752FEC84FD62C1A7431ACF /* TreeTable.m in Sources */, 275 | 16760DB4562890A9B49BA0E2CBEF47F5 /* TreeView-dummy.m in Sources */, 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | 8A9CCA40FE411BFC212CC11B4C2007A0 /* Sources */ = { 280 | isa = PBXSourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | B2DC0F4202DB37DFFB844953617E09F2 /* Pods-TreeViewExample-dummy.m in Sources */, 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | }; 287 | /* End PBXSourcesBuildPhase section */ 288 | 289 | /* Begin PBXTargetDependency section */ 290 | 7BC858E0D20556B65B030B7544220B97 /* PBXTargetDependency */ = { 291 | isa = PBXTargetDependency; 292 | name = TreeView; 293 | target = 5727B0D3A6CAD0A91D0693ACE4B7B077 /* TreeView */; 294 | targetProxy = 3F6830174E9027B49415128A3C49AB46 /* PBXContainerItemProxy */; 295 | }; 296 | /* End PBXTargetDependency section */ 297 | 298 | /* Begin XCBuildConfiguration section */ 299 | 1EE19F5DD95931924296F637BF18BD8F /* Debug */ = { 300 | isa = XCBuildConfiguration; 301 | buildSettings = { 302 | ALWAYS_SEARCH_USER_PATHS = NO; 303 | CLANG_ANALYZER_NONNULL = YES; 304 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 305 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 306 | CLANG_CXX_LIBRARY = "libc++"; 307 | CLANG_ENABLE_MODULES = YES; 308 | CLANG_ENABLE_OBJC_ARC = YES; 309 | CLANG_ENABLE_OBJC_WEAK = YES; 310 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 311 | CLANG_WARN_BOOL_CONVERSION = YES; 312 | CLANG_WARN_COMMA = YES; 313 | CLANG_WARN_CONSTANT_CONVERSION = YES; 314 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 315 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 316 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 329 | CLANG_WARN_UNREACHABLE_CODE = YES; 330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 331 | CODE_SIGNING_ALLOWED = NO; 332 | CODE_SIGNING_REQUIRED = NO; 333 | COPY_PHASE_STRIP = NO; 334 | DEBUG_INFORMATION_FORMAT = dwarf; 335 | ENABLE_STRICT_OBJC_MSGSEND = YES; 336 | ENABLE_TESTABILITY = YES; 337 | GCC_C_LANGUAGE_STANDARD = gnu11; 338 | GCC_DYNAMIC_NO_PIC = NO; 339 | GCC_NO_COMMON_BLOCKS = YES; 340 | GCC_OPTIMIZATION_LEVEL = 0; 341 | GCC_PREPROCESSOR_DEFINITIONS = ( 342 | "POD_CONFIGURATION_DEBUG=1", 343 | "DEBUG=1", 344 | "$(inherited)", 345 | ); 346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | GCC_WARN_UNUSED_FUNCTION = YES; 351 | GCC_WARN_UNUSED_VARIABLE = YES; 352 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 353 | MTL_ENABLE_DEBUG_INFO = YES; 354 | ONLY_ACTIVE_ARCH = YES; 355 | PRODUCT_NAME = "$(TARGET_NAME)"; 356 | STRIP_INSTALLED_PRODUCT = NO; 357 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 358 | SYMROOT = "${SRCROOT}/../build"; 359 | }; 360 | name = Debug; 361 | }; 362 | 38868AE8A75BF03A84A4D40351048A02 /* Release */ = { 363 | isa = XCBuildConfiguration; 364 | baseConfigurationReference = 058888F63A728D197461EB6EB2FC6D66 /* Pods-TreeViewExample.release.xcconfig */; 365 | buildSettings = { 366 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 367 | CODE_SIGN_IDENTITY = ""; 368 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 369 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 370 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 371 | CURRENT_PROJECT_VERSION = 1; 372 | DEFINES_MODULE = YES; 373 | DYLIB_COMPATIBILITY_VERSION = 1; 374 | DYLIB_CURRENT_VERSION = 1; 375 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 376 | INFOPLIST_FILE = "Target Support Files/Pods-TreeViewExample/Info.plist"; 377 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 378 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 379 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 380 | MACH_O_TYPE = staticlib; 381 | MODULEMAP_FILE = "Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample.modulemap"; 382 | OTHER_LDFLAGS = ""; 383 | OTHER_LIBTOOLFLAGS = ""; 384 | PODS_ROOT = "$(SRCROOT)"; 385 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 386 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 387 | SDKROOT = iphoneos; 388 | SKIP_INSTALL = YES; 389 | TARGETED_DEVICE_FAMILY = "1,2"; 390 | VALIDATE_PRODUCT = YES; 391 | VERSIONING_SYSTEM = "apple-generic"; 392 | VERSION_INFO_PREFIX = ""; 393 | }; 394 | name = Release; 395 | }; 396 | 40F23B455C5B482CF838E6F2A68E3A46 /* Release */ = { 397 | isa = XCBuildConfiguration; 398 | baseConfigurationReference = 1009A808960695DFC9AAFDD5C13FE409 /* TreeView.xcconfig */; 399 | buildSettings = { 400 | CODE_SIGN_IDENTITY = ""; 401 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 402 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 403 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 404 | CURRENT_PROJECT_VERSION = 1; 405 | DEFINES_MODULE = YES; 406 | DYLIB_COMPATIBILITY_VERSION = 1; 407 | DYLIB_CURRENT_VERSION = 1; 408 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 409 | GCC_PREFIX_HEADER = "Target Support Files/TreeView/TreeView-prefix.pch"; 410 | INFOPLIST_FILE = "Target Support Files/TreeView/Info.plist"; 411 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 412 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 413 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 414 | MODULEMAP_FILE = "Target Support Files/TreeView/TreeView.modulemap"; 415 | PRODUCT_MODULE_NAME = TreeView; 416 | PRODUCT_NAME = TreeView; 417 | SDKROOT = iphoneos; 418 | SKIP_INSTALL = YES; 419 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 420 | SWIFT_VERSION = 4.0; 421 | TARGETED_DEVICE_FAMILY = "1,2"; 422 | VALIDATE_PRODUCT = YES; 423 | VERSIONING_SYSTEM = "apple-generic"; 424 | VERSION_INFO_PREFIX = ""; 425 | }; 426 | name = Release; 427 | }; 428 | 6BD6A0997F8CD4999F96B19815B1F4A7 /* Debug */ = { 429 | isa = XCBuildConfiguration; 430 | baseConfigurationReference = 1009A808960695DFC9AAFDD5C13FE409 /* TreeView.xcconfig */; 431 | buildSettings = { 432 | CODE_SIGN_IDENTITY = ""; 433 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 434 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 435 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 436 | CURRENT_PROJECT_VERSION = 1; 437 | DEFINES_MODULE = YES; 438 | DYLIB_COMPATIBILITY_VERSION = 1; 439 | DYLIB_CURRENT_VERSION = 1; 440 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 441 | GCC_PREFIX_HEADER = "Target Support Files/TreeView/TreeView-prefix.pch"; 442 | INFOPLIST_FILE = "Target Support Files/TreeView/Info.plist"; 443 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 444 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 445 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 446 | MODULEMAP_FILE = "Target Support Files/TreeView/TreeView.modulemap"; 447 | PRODUCT_MODULE_NAME = TreeView; 448 | PRODUCT_NAME = TreeView; 449 | SDKROOT = iphoneos; 450 | SKIP_INSTALL = YES; 451 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 452 | SWIFT_VERSION = 4.0; 453 | TARGETED_DEVICE_FAMILY = "1,2"; 454 | VERSIONING_SYSTEM = "apple-generic"; 455 | VERSION_INFO_PREFIX = ""; 456 | }; 457 | name = Debug; 458 | }; 459 | F4568DEE257655D290C2B9CEAB37C934 /* Release */ = { 460 | isa = XCBuildConfiguration; 461 | buildSettings = { 462 | ALWAYS_SEARCH_USER_PATHS = NO; 463 | CLANG_ANALYZER_NONNULL = YES; 464 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 465 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 466 | CLANG_CXX_LIBRARY = "libc++"; 467 | CLANG_ENABLE_MODULES = YES; 468 | CLANG_ENABLE_OBJC_ARC = YES; 469 | CLANG_ENABLE_OBJC_WEAK = YES; 470 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 471 | CLANG_WARN_BOOL_CONVERSION = YES; 472 | CLANG_WARN_COMMA = YES; 473 | CLANG_WARN_CONSTANT_CONVERSION = YES; 474 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 475 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 476 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 477 | CLANG_WARN_EMPTY_BODY = YES; 478 | CLANG_WARN_ENUM_CONVERSION = YES; 479 | CLANG_WARN_INFINITE_RECURSION = YES; 480 | CLANG_WARN_INT_CONVERSION = YES; 481 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 482 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 483 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 484 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 485 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 486 | CLANG_WARN_STRICT_PROTOTYPES = YES; 487 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 488 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 489 | CLANG_WARN_UNREACHABLE_CODE = YES; 490 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 491 | CODE_SIGNING_ALLOWED = NO; 492 | CODE_SIGNING_REQUIRED = NO; 493 | COPY_PHASE_STRIP = NO; 494 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 495 | ENABLE_NS_ASSERTIONS = NO; 496 | ENABLE_STRICT_OBJC_MSGSEND = YES; 497 | GCC_C_LANGUAGE_STANDARD = gnu11; 498 | GCC_NO_COMMON_BLOCKS = YES; 499 | GCC_PREPROCESSOR_DEFINITIONS = ( 500 | "POD_CONFIGURATION_RELEASE=1", 501 | "$(inherited)", 502 | ); 503 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 504 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 505 | GCC_WARN_UNDECLARED_SELECTOR = YES; 506 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 507 | GCC_WARN_UNUSED_FUNCTION = YES; 508 | GCC_WARN_UNUSED_VARIABLE = YES; 509 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 510 | MTL_ENABLE_DEBUG_INFO = NO; 511 | PRODUCT_NAME = "$(TARGET_NAME)"; 512 | STRIP_INSTALLED_PRODUCT = NO; 513 | SYMROOT = "${SRCROOT}/../build"; 514 | }; 515 | name = Release; 516 | }; 517 | F7B28273E8DAAE35A928460447526E61 /* Debug */ = { 518 | isa = XCBuildConfiguration; 519 | baseConfigurationReference = D51F0A7B2A20168EF7DE3E8C0A2ECA1F /* Pods-TreeViewExample.debug.xcconfig */; 520 | buildSettings = { 521 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 522 | CODE_SIGN_IDENTITY = ""; 523 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 524 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 525 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 526 | CURRENT_PROJECT_VERSION = 1; 527 | DEFINES_MODULE = YES; 528 | DYLIB_COMPATIBILITY_VERSION = 1; 529 | DYLIB_CURRENT_VERSION = 1; 530 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 531 | INFOPLIST_FILE = "Target Support Files/Pods-TreeViewExample/Info.plist"; 532 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 533 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 534 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 535 | MACH_O_TYPE = staticlib; 536 | MODULEMAP_FILE = "Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample.modulemap"; 537 | OTHER_LDFLAGS = ""; 538 | OTHER_LIBTOOLFLAGS = ""; 539 | PODS_ROOT = "$(SRCROOT)"; 540 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 541 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 542 | SDKROOT = iphoneos; 543 | SKIP_INSTALL = YES; 544 | TARGETED_DEVICE_FAMILY = "1,2"; 545 | VERSIONING_SYSTEM = "apple-generic"; 546 | VERSION_INFO_PREFIX = ""; 547 | }; 548 | name = Debug; 549 | }; 550 | /* End XCBuildConfiguration section */ 551 | 552 | /* Begin XCConfigurationList section */ 553 | 29811ABA1B77477B5809DD72BE51588D /* Build configuration list for PBXNativeTarget "Pods-TreeViewExample" */ = { 554 | isa = XCConfigurationList; 555 | buildConfigurations = ( 556 | F7B28273E8DAAE35A928460447526E61 /* Debug */, 557 | 38868AE8A75BF03A84A4D40351048A02 /* Release */, 558 | ); 559 | defaultConfigurationIsVisible = 0; 560 | defaultConfigurationName = Release; 561 | }; 562 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 563 | isa = XCConfigurationList; 564 | buildConfigurations = ( 565 | 1EE19F5DD95931924296F637BF18BD8F /* Debug */, 566 | F4568DEE257655D290C2B9CEAB37C934 /* Release */, 567 | ); 568 | defaultConfigurationIsVisible = 0; 569 | defaultConfigurationName = Release; 570 | }; 571 | A2601596370C2AF3F7B6834172B6CEB2 /* Build configuration list for PBXNativeTarget "TreeView" */ = { 572 | isa = XCConfigurationList; 573 | buildConfigurations = ( 574 | 6BD6A0997F8CD4999F96B19815B1F4A7 /* Debug */, 575 | 40F23B455C5B482CF838E6F2A68E3A46 /* Release */, 576 | ); 577 | defaultConfigurationIsVisible = 0; 578 | defaultConfigurationName = Release; 579 | }; 580 | /* End XCConfigurationList section */ 581 | }; 582 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 583 | } 584 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/Pods-TreeViewExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## TreeView 5 | 6 | Copyright © 2018 ReImpl 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 - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample-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 © 2018 ReImpl <kernel@reimplement.mobi> 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 | License 38 | MIT 39 | Title 40 | TreeView 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TreeViewExample : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TreeViewExample 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | 145 | if [[ "$CONFIGURATION" == "Debug" ]]; then 146 | install_framework "${BUILT_PRODUCTS_DIR}/TreeView/TreeView.framework" 147 | fi 148 | if [[ "$CONFIGURATION" == "Release" ]]; then 149 | install_framework "${BUILT_PRODUCTS_DIR}/TreeView/TreeView.framework" 150 | fi 151 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 152 | wait 153 | fi 154 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_TreeViewExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_TreeViewExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/TreeView" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/TreeView/TreeView.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "TreeView" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_TreeViewExample { 2 | umbrella header "Pods-TreeViewExample-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/TreeView" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/TreeView/TreeView.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "TreeView" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/TreeView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.1.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/TreeView/TreeView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_TreeView : NSObject 3 | @end 4 | @implementation PodsDummy_TreeView 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/TreeView/TreeView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/TreeView/TreeView-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "TreeTable.h" 14 | 15 | FOUNDATION_EXPORT double TreeViewVersionNumber; 16 | FOUNDATION_EXPORT const unsigned char TreeViewVersionString[]; 17 | 18 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/TreeView/TreeView.modulemap: -------------------------------------------------------------------------------- 1 | framework module TreeView { 2 | umbrella header "TreeView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/Pods/Target Support Files/TreeView/TreeView.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/TreeView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT} 6 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | -------------------------------------------------------------------------------- /Examples/Res/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Examples/Res/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Examples/Src/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TreeViewExample 4 | // 5 | // Created by Anthony on 07.11.15. 6 | // Copyright © 2015 ReImpl. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Examples/Src/Bridge.h: -------------------------------------------------------------------------------- 1 | // 2 | // Bridging.h 3 | // TreeViewExample 4 | // 5 | // Created by Anthony on 8/22/18. 6 | // Copyright © 2018 ReImpl. All rights reserved. 7 | // 8 | 9 | #ifndef Bridging_h 10 | #define Bridging_h 11 | 12 | #import "PListExample.h" 13 | #import "FileFinderExample.h" 14 | 15 | #endif /* Bridging_h */ 16 | -------------------------------------------------------------------------------- /Examples/Src/UI/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Examples/Src/UI/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /Examples/Src/UI/Modules/TreeModule.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TreeModule.swift 3 | // TreeViewExample 4 | // 5 | // Created by Anthony on 8/21/18. 6 | // Copyright © 2018 ReImpl. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import TreeView 11 | 12 | @objc 13 | protocol TreeModule: TreeTableDataSource, UITableViewDelegate { 14 | var name: String { get } 15 | 16 | func registerCustomCells(with tableView: UITableView) 17 | } 18 | -------------------------------------------------------------------------------- /Examples/Src/UI/Modules/fileSystem-asTree/FileFinderExample.h: -------------------------------------------------------------------------------- 1 | // 2 | // DAViewController.h 3 | // TreeViewExample 4 | // 5 | // Created by kernel on 13/03/13. 6 | // Copyright (c) 2013 kernel@realm. All rights reserved. 7 | // 8 | 9 | @import Foundation; 10 | 11 | @protocol TreeModule; 12 | 13 | @interface FileFinderExample: NSObject 14 | @end 15 | -------------------------------------------------------------------------------- /Examples/Src/UI/Modules/fileSystem-asTree/FileFinderExample.m: -------------------------------------------------------------------------------- 1 | // 2 | // DAViewController.m 3 | // TreeViewExample 4 | // 5 | // Created by kernel on 13/03/13. 6 | // Copyright (c) 2013 kernel@realm. All rights reserved. 7 | // 8 | 9 | #import "FileFinderExample.h" 10 | #import "TreeViewExample-Swift.h" 11 | 12 | static NSString *Subitems = @"Subitems"; 13 | static NSString *Title = @"Title"; 14 | 15 | @interface FileFinderExample () 16 | // => @(YES) or nil. 17 | @property (strong, nonatomic, readonly) NSMutableDictionary *expandedItems; 18 | 19 | @property (strong, nonatomic, readonly) NSFileManager *fm; 20 | @property (strong, nonatomic, readonly) NSString *rootPath; 21 | @property (strong, nonatomic, readonly) NSArray *rootItems; 22 | @end 23 | 24 | @implementation FileFinderExample 25 | @synthesize name = _name; 26 | 27 | - (instancetype)init { 28 | self = [super init]; 29 | if (self) { 30 | _name = @"FileFinder (file system as a tree)"; 31 | 32 | _expandedItems = @{}.mutableCopy; 33 | _fm = NSFileManager.defaultManager; 34 | 35 | _rootPath = NSBundle.mainBundle.bundlePath; 36 | _rootItems = [self.fm contentsOfDirectoryAtPath:self.rootPath error:nil]; 37 | } 38 | return self; 39 | } 40 | 41 | - (void)registerCustomCellsWith:(UITableView *)tableView { 42 | Class cls = UITableViewCell.class; 43 | NSString *identifier = NSStringFromClass(cls); 44 | 45 | [tableView registerClass:cls forCellReuseIdentifier:identifier]; 46 | } 47 | 48 | - (NSString *)filePathForIndexPath:(NSIndexPath *)ip { 49 | NSString *path = self.rootPath.copy; 50 | 51 | for (int i = 1; i < ip.length; i++) { 52 | NSUInteger idx = [ip indexAtPosition:i]; 53 | 54 | NSArray *items = [self.fm contentsOfDirectoryAtPath:path error:nil]; 55 | 56 | path = [path stringByAppendingPathComponent:items[idx]]; 57 | } 58 | 59 | return path; 60 | } 61 | 62 | #pragma mark TreeTableDataSource 63 | 64 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 65 | return self.rootItems.count; 66 | } 67 | 68 | - (BOOL)tableView:(UITableView *)tableView isCellExpanded:(NSIndexPath *)indexPath { 69 | return [self.expandedItems[indexPath] boolValue]; 70 | } 71 | 72 | - (NSUInteger)tableView:(UITableView *)tableView numberOfSubCellsForCellAtIndexPath:(NSIndexPath *)indexPath { 73 | NSString *filePath = [self filePathForIndexPath:indexPath]; 74 | 75 | NSArray *paths = [self.fm contentsOfDirectoryAtPath:filePath error:nil]; 76 | 77 | return paths.count; 78 | } 79 | 80 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 81 | NSString *filePath = [self filePathForIndexPath:indexPath]; 82 | 83 | NSString *identifier = NSStringFromClass(UITableViewCell.class); 84 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; 85 | 86 | cell.indentationLevel = indexPath.length - 1; 87 | 88 | 89 | BOOL isDirectory = NO; 90 | [self.fm fileExistsAtPath:filePath isDirectory:&isDirectory]; 91 | 92 | cell.accessoryType = isDirectory ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone; 93 | 94 | cell.textLabel.text = filePath.lastPathComponent; 95 | 96 | // NSLog(@"%@ -> %@", indexPath, filePath); 97 | return cell; 98 | } 99 | 100 | #pragma mark UITableViewDelegate 101 | 102 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)tableIndexPath { 103 | [tableView deselectRowAtIndexPath:tableIndexPath animated:YES]; 104 | 105 | NSIndexPath *treeIndexPath = [tableView treeIndexPathFromTablePath:tableIndexPath]; 106 | 107 | BOOL isExpanded = [tableView isExpanded:treeIndexPath]; 108 | if (isExpanded) { 109 | [self.expandedItems removeObjectForKey:treeIndexPath]; 110 | 111 | [tableView collapse:treeIndexPath]; 112 | 113 | } else { 114 | NSString *filePath = [self filePathForIndexPath:treeIndexPath]; 115 | 116 | BOOL isDirectory = NO; 117 | [self.fm fileExistsAtPath:filePath isDirectory:&isDirectory]; 118 | 119 | if (!isDirectory) { 120 | return; 121 | } 122 | 123 | self.expandedItems[treeIndexPath] = @(YES); 124 | [tableView expand:treeIndexPath]; 125 | } 126 | } 127 | 128 | @end 129 | -------------------------------------------------------------------------------- /Examples/Src/UI/Modules/inSwift-4.2/SwiftExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // TreeViewExample 4 | // 5 | // Created by Anthony on 07.11.15. 6 | // Copyright © 2015 ReImpl. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | final class SwiftExample: NSObject, TreeModule { 13 | let name: String = "inSwift-4.2" 14 | 15 | override init() { 16 | expandedItems = [:] 17 | rootItems = try! fm.contentsOfDirectory(atPath: rootPath) 18 | 19 | super.init() 20 | } 21 | 22 | func registerCustomCells(with tableView: UITableView) { 23 | let identifier = NSStringFromClass(UITableViewCell.self) 24 | 25 | tableView.register(UITableViewCell.self, forCellReuseIdentifier: identifier) 26 | } 27 | 28 | // MARK: - TreeTableDataSource 29 | 30 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 31 | return rootItems.count 32 | } 33 | 34 | func tableView(_ tableView: UITableView, isCellExpanded indexPath: IndexPath) -> Bool { 35 | if let expanded = expandedItems[indexPath] { 36 | return expanded 37 | } else { 38 | return false 39 | } 40 | } 41 | 42 | func tableView(_ tableView: UITableView, numberOfSubCellsForCellAt treeIndexPath: IndexPath) -> UInt { 43 | let filePath = self.filePath(fromTreeIndexPath: treeIndexPath) 44 | 45 | return UInt((try! fm.contentsOfDirectory(atPath: filePath)).count) 46 | } 47 | 48 | func tableView(_ tableView: UITableView, cellForRowAt treeIndexPath: IndexPath) -> UITableViewCell { 49 | let tableIndexPath = tableView.tableIndexPath(fromTreePath: treeIndexPath) 50 | 51 | let identifier = NSStringFromClass(UITableViewCell.self) 52 | let cell = tableView.dequeueReusableCell(withIdentifier: identifier, for: tableIndexPath) 53 | 54 | cell.indentationLevel = treeIndexPath.count - 1 55 | 56 | let filePath = self.filePath(fromTreeIndexPath: treeIndexPath) 57 | 58 | var isDirectory = ObjCBool(false) 59 | fm.fileExists(atPath: filePath, isDirectory: &isDirectory) 60 | 61 | cell.accessoryType = isDirectory.boolValue ? .disclosureIndicator : .none 62 | cell.textLabel?.text = (filePath as NSString).lastPathComponent 63 | 64 | return cell; 65 | } 66 | 67 | // MARK: - UITableViewDelegate 68 | 69 | func tableView(_ tableView: UITableView, didSelectRowAt tableIndexPath: IndexPath) { 70 | tableView.deselectRow(at: tableIndexPath, animated: true) 71 | 72 | let treeIndexPath = tableView.treeIndexPath(fromTablePath: tableIndexPath) 73 | 74 | if tableView.isExpanded(treeIndexPath) { 75 | let index = expandedItems.index(forKey: treeIndexPath)! 76 | expandedItems.remove(at: index) 77 | 78 | tableView.collapse(treeIndexPath) 79 | } else { 80 | let filePath = self.filePath(fromTreeIndexPath: treeIndexPath) 81 | 82 | var isDirectory = ObjCBool(false) 83 | fm.fileExists(atPath: filePath, isDirectory: &isDirectory) 84 | 85 | if isDirectory.boolValue { 86 | expandedItems[treeIndexPath] = true 87 | 88 | tableView.expand(treeIndexPath) 89 | } 90 | } 91 | } 92 | 93 | // MARK: - Internal 94 | 95 | private let fm = FileManager.default 96 | private var rootPath = Bundle.main.bundlePath 97 | 98 | private var rootItems: [String]! 99 | private var expandedItems: [IndexPath: Bool] = [:] 100 | 101 | private func filePath(fromTreeIndexPath ip: IndexPath) -> String { 102 | var path = rootPath 103 | 104 | for i in 1 ..< ip.count { 105 | let items = try! fm.contentsOfDirectory(atPath: path) 106 | 107 | path = (path as NSString).appendingPathComponent(items[ip[i]]) 108 | } 109 | 110 | return path 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /Examples/Src/UI/Modules/plist-allExpanded-byDefault/Easy.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Subitems 7 | 8 | 9 | Subitems 10 | 11 | 12 | Subitems 13 | 14 | Apple HQ 15 | Cupertino Effect 16 | 17 | Title 18 | Cupertino 19 | 20 | San Jose 21 | 22 | Title 23 | CA 24 | 25 | 26 | Title 27 | NY 28 | Subitems 29 | 30 | Brooklyn 31 | Manhattan 32 | 33 | 34 | 35 | Title 36 | USA 37 | 38 | 39 | Subitems 40 | 41 | 42 | Subitems 43 | 44 | Kiyv 45 | Lviv 46 | Odessa 47 | 48 | Title 49 | Ukraine 50 | 51 | 52 | Subitems 53 | 54 | Berlin 55 | Stuttgart 56 | Frankfurt 57 | 58 | Title 59 | Germany 60 | 61 | Portugal 62 | 63 | Title 64 | Europe 65 | 66 | 67 | Subitems 68 | 69 | Bangkok 70 | Chiang Mai 71 | 72 | Subitems 73 | 74 | Rawaii 75 | Phuket town 76 | 77 | Title 78 | Koh Phuket 79 | 80 | Pattaya 81 | 82 | Title 83 | Thailand 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Examples/Src/UI/Modules/plist-allExpanded-byDefault/PListExample.h: -------------------------------------------------------------------------------- 1 | // 2 | // DAViewController.h 3 | // TreeViewExample 4 | // 5 | // Created by kernel on 13/03/13. 6 | // Copyright (c) 2013 kernel@realm. All rights reserved. 7 | // 8 | 9 | @import Foundation; 10 | 11 | @protocol TreeModule; 12 | 13 | @interface PListExample: NSObject 14 | @end 15 | -------------------------------------------------------------------------------- /Examples/Src/UI/Modules/plist-allExpanded-byDefault/PListExample.m: -------------------------------------------------------------------------------- 1 | // 2 | // DAViewController.m 3 | // TreeViewExample 4 | // 5 | // Created by kernel on 13/03/13. 6 | // Copyright (c) 2013 kernel@realm. All rights reserved. 7 | // 8 | 9 | #import "PListExample.h" 10 | #import "TreeViewExample-Swift.h" 11 | 12 | static NSString *Subitems = @"Subitems"; 13 | static NSString *Title = @"Title"; 14 | 15 | @interface PListExample () 16 | // => @(YES) or nil. 17 | @property (strong, nonatomic, readonly) NSMutableDictionary *expandedItems; 18 | @property (strong, nonatomic, readonly) NSArray *easy; 19 | @end 20 | 21 | @implementation PListExample 22 | @synthesize name = _name; 23 | 24 | - (instancetype)init { 25 | self = [super init]; 26 | if (self) { 27 | _name = @"PList example (all cells expanded by default)"; 28 | 29 | _expandedItems = NSMutableDictionary.dictionary; 30 | 31 | NSString *path = [NSBundle.mainBundle pathForResource:@"Easy" ofType:@"plist"]; 32 | _easy = [NSArray arrayWithContentsOfFile:path]; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)registerCustomCellsWith:(UITableView *)tableView { 38 | Class cls = UITableViewCell.class; 39 | NSString *identifier = NSStringFromClass(cls); 40 | 41 | [tableView registerClass:cls forCellReuseIdentifier:identifier]; 42 | } 43 | 44 | - (NSDictionary *)itemForIndexPath:(NSIndexPath *)indexPath { 45 | NSArray *items = self.easy; 46 | NSDictionary *item = self.easy[[indexPath indexAtPosition:0]]; 47 | 48 | for (int i = 0; i < indexPath.length; i++) { 49 | NSUInteger idx = [indexPath indexAtPosition:i]; 50 | 51 | item = items[idx]; 52 | 53 | if (i == indexPath.length - 1) { 54 | return item; 55 | } 56 | 57 | items = item[Subitems]; 58 | } 59 | 60 | return item; 61 | } 62 | 63 | #pragma mark TreeTableDataSource 64 | 65 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 66 | return self.easy.count; 67 | } 68 | 69 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 70 | NSDictionary *item = self.easy[section]; 71 | 72 | return item[Title]; 73 | } 74 | 75 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 76 | NSDictionary *item = self.easy[section]; 77 | return [item[Subitems] count]; 78 | } 79 | 80 | - (BOOL)tableView:(UITableView *)tableView isCellExpanded:(NSIndexPath *)indexPath { 81 | NSDictionary *item = [self itemForIndexPath:indexPath]; 82 | 83 | NSNumber *initialState = self.expandedItems[indexPath]; 84 | BOOL isInitialStateUndefined = !initialState; 85 | 86 | if (isInitialStateUndefined && [item isKindOfClass:NSDictionary.class]) { 87 | self.expandedItems[indexPath] = @(YES); 88 | return [item[Subitems] count] > 0; 89 | } 90 | 91 | return initialState.boolValue; 92 | } 93 | 94 | - (NSUInteger)tableView:(UITableView *)tableView numberOfSubCellsForCellAtIndexPath:(NSIndexPath *)indexPath { 95 | NSDictionary *item = [self itemForIndexPath:indexPath]; 96 | return [item[Subitems] count]; 97 | } 98 | 99 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 100 | NSDictionary *item = [self itemForIndexPath:indexPath]; 101 | 102 | NSString *identifier = NSStringFromClass(UITableViewCell.class); 103 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; 104 | 105 | cell.indentationLevel = indexPath.length - 1; 106 | 107 | NSString *title = nil; 108 | if ([item isKindOfClass:NSDictionary.class]) { 109 | title = item[Title]; 110 | 111 | cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 112 | } else { 113 | title = (NSString *)item; 114 | 115 | cell.accessoryType = UITableViewCellAccessoryNone; 116 | } 117 | cell.textLabel.text = title; 118 | 119 | // NSLog(@"%@ -> %@", indexPath, title); 120 | return cell; 121 | } 122 | 123 | #pragma mark UITableViewDelegate 124 | 125 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)tableIndexPath { 126 | [tableView deselectRowAtIndexPath:tableIndexPath animated:YES]; 127 | 128 | NSIndexPath *treeIndexPath = [tableView treeIndexPathFromTablePath:tableIndexPath]; 129 | 130 | BOOL isExpanded = [tableView isExpanded:treeIndexPath]; 131 | if (isExpanded) { 132 | self.expandedItems[treeIndexPath] = @(NO); 133 | 134 | [tableView collapse:treeIndexPath]; 135 | } else { 136 | NSDictionary *item = [self itemForIndexPath:treeIndexPath]; 137 | if ([item isKindOfClass:NSString.class]) { 138 | return; 139 | } 140 | 141 | self.expandedItems[treeIndexPath] = @(YES); 142 | [tableView expand:treeIndexPath]; 143 | } 144 | } 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /Examples/Src/UI/SelectViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SelectViewController.swift 3 | // TreeViewExample 4 | // 5 | // Created by Anthony on 8/21/18. 6 | // Copyright © 2018 ReImpl. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class SelectViewController: UITableViewController { 12 | 13 | let modules: [TreeModule] = [ 14 | SwiftExample(), 15 | PListExample(), 16 | FileFinderExample() 17 | ] 18 | 19 | // Names correspond to constants in Storyboard. 20 | enum Segue: String { 21 | case showModuleScreen = "ShowModuleScreen" 22 | } 23 | 24 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 25 | guard let id = segue.identifier, 26 | let s = Segue(rawValue: id) else { 27 | super.prepare(for: segue, sender: sender) 28 | 29 | return 30 | } 31 | 32 | switch s { 33 | case .showModuleScreen: 34 | let ctrl = segue.destination as! TableViewController 35 | 36 | ctrl.treeModule = sender as? TreeModule 37 | } 38 | } 39 | 40 | override func viewDidLoad() { 41 | super.viewDidLoad() 42 | 43 | title = "Examples" 44 | } 45 | 46 | // MARK: - UITableViewDataSource 47 | 48 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 49 | return modules.count 50 | } 51 | 52 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 53 | let cell = tableView.dequeueReusableCell(withIdentifier: "default", for: indexPath) 54 | 55 | cell.textLabel?.text = modules[indexPath.row].name 56 | 57 | return cell 58 | } 59 | 60 | // MARK: - UITableViewDelegate 61 | 62 | override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 63 | let module = modules[indexPath.row] 64 | let id = Segue.showModuleScreen.rawValue 65 | 66 | performSegue(withIdentifier: id, sender: module) 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /Examples/Src/UI/TableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // TreeViewExample 4 | // 5 | // Created by Anthony on 07.11.15. 6 | // Copyright © 2015 ReImpl. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import TreeView 11 | 12 | final class TableViewController: UIViewController { 13 | 14 | var treeModule: TreeModule! 15 | 16 | @IBOutlet weak var treeTable: TreeTable! 17 | @IBOutlet weak var tableView: UITableView! 18 | 19 | override func viewDidLoad() { 20 | super.viewDidLoad() 21 | 22 | assert(treeModule != nil, "'treeModule' must be set by presenting view controller.") 23 | 24 | title = treeModule.name 25 | 26 | // 1. TableView.dataSource -> TreeTable | TreeTable.dataSource -> TreeModule 27 | treeTable.dataSource = treeModule 28 | tableView.dataSource = treeTable 29 | 30 | // 2. TableView.delegate is directly treeModule. 31 | tableView.delegate = treeModule 32 | 33 | treeModule.registerCustomCells(with: tableView) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Examples/TreeViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1E0DDD68212CF73400F4A708 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0DDD53212CF73400F4A708 /* TableViewController.swift */; }; 11 | 1E0DDD69212CF73400F4A708 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1E0DDD54212CF73400F4A708 /* LaunchScreen.storyboard */; }; 12 | 1E0DDD6A212CF73400F4A708 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1E0DDD55212CF73400F4A708 /* Main.storyboard */; }; 13 | 1E0DDD6B212CF73400F4A708 /* SwiftExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0DDD59212CF73400F4A708 /* SwiftExample.swift */; }; 14 | 1E0DDD71212CF73400F4A708 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0DDD66212CF73400F4A708 /* AppDelegate.swift */; }; 15 | 1E0DDD73212CF85300F4A708 /* SelectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0DDD72212CF85300F4A708 /* SelectViewController.swift */; }; 16 | 1E0DDD77212CFFFC00F4A708 /* TreeModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0DDD76212CFFFC00F4A708 /* TreeModule.swift */; }; 17 | 1EACDC3D212DC07B00CE2C13 /* FileFinderExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E0DDD61212CF73400F4A708 /* FileFinderExample.m */; }; 18 | 1EB7B6741BED5F6F00B8A333 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1EB7B6731BED5F6F00B8A333 /* Assets.xcassets */; }; 19 | 1EE147FE212DB36F0061E572 /* Easy.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1E0DDD63212CF73400F4A708 /* Easy.plist */; }; 20 | 1EE147FF212DB39C0061E572 /* PListExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E0DDD5E212CF73400F4A708 /* PListExample.m */; }; 21 | 82AD016D237C44A41E88D879 /* Pods_TreeViewExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F60B7ED6E3F562DA954D17F4 /* Pods_TreeViewExample.framework */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXFileReference section */ 25 | 1E0DDD53212CF73400F4A708 /* TableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = ""; }; 26 | 1E0DDD54212CF73400F4A708 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; 27 | 1E0DDD55212CF73400F4A708 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 28 | 1E0DDD59212CF73400F4A708 /* SwiftExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftExample.swift; sourceTree = ""; }; 29 | 1E0DDD5D212CF73400F4A708 /* PListExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PListExample.h; sourceTree = ""; }; 30 | 1E0DDD5E212CF73400F4A708 /* PListExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PListExample.m; sourceTree = ""; }; 31 | 1E0DDD60212CF73400F4A708 /* FileFinderExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileFinderExample.h; sourceTree = ""; }; 32 | 1E0DDD61212CF73400F4A708 /* FileFinderExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileFinderExample.m; sourceTree = ""; }; 33 | 1E0DDD63212CF73400F4A708 /* Easy.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Easy.plist; sourceTree = ""; }; 34 | 1E0DDD66212CF73400F4A708 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 35 | 1E0DDD72212CF85300F4A708 /* SelectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectViewController.swift; sourceTree = ""; }; 36 | 1E0DDD76212CFFFC00F4A708 /* TreeModule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TreeModule.swift; sourceTree = ""; }; 37 | 1EB7B6691BED5F6F00B8A333 /* TreeViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TreeViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 1EB7B6731BED5F6F00B8A333 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 39 | 1EB7B6781BED5F6F00B8A333 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 40 | 1EE14800212DB5BA0061E572 /* Bridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Bridge.h; sourceTree = ""; }; 41 | 928253F9BFF2B4DC2CC9D7AA /* Pods-TreeViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TreeViewExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample.release.xcconfig"; sourceTree = ""; }; 42 | D02CA5F3586DF942CB947331 /* Pods-TreeViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TreeViewExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample.debug.xcconfig"; sourceTree = ""; }; 43 | F60B7ED6E3F562DA954D17F4 /* Pods_TreeViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TreeViewExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | /* End PBXFileReference section */ 45 | 46 | /* Begin PBXFrameworksBuildPhase section */ 47 | 1EB7B6661BED5F6F00B8A333 /* Frameworks */ = { 48 | isa = PBXFrameworksBuildPhase; 49 | buildActionMask = 2147483647; 50 | files = ( 51 | 82AD016D237C44A41E88D879 /* Pods_TreeViewExample.framework in Frameworks */, 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 1E0DDD4C212CF44A00F4A708 /* Res */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 1EB7B6781BED5F6F00B8A333 /* Info.plist */, 62 | 1EB7B6731BED5F6F00B8A333 /* Assets.xcassets */, 63 | ); 64 | path = Res; 65 | sourceTree = ""; 66 | }; 67 | 1E0DDD51212CF73400F4A708 /* Src */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | 1E0DDD66212CF73400F4A708 /* AppDelegate.swift */, 71 | 1EE14800212DB5BA0061E572 /* Bridge.h */, 72 | 1E0DDD52212CF73400F4A708 /* UI */, 73 | ); 74 | path = Src; 75 | sourceTree = ""; 76 | }; 77 | 1E0DDD52212CF73400F4A708 /* UI */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 1E0DDD55212CF73400F4A708 /* Main.storyboard */, 81 | 1E0DDD72212CF85300F4A708 /* SelectViewController.swift */, 82 | 1E0DDD53212CF73400F4A708 /* TableViewController.swift */, 83 | 1E0DDD56212CF73400F4A708 /* Modules */, 84 | 1E0DDD54212CF73400F4A708 /* LaunchScreen.storyboard */, 85 | ); 86 | path = UI; 87 | sourceTree = ""; 88 | }; 89 | 1E0DDD56212CF73400F4A708 /* Modules */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 1E0DDD76212CFFFC00F4A708 /* TreeModule.swift */, 93 | 1E0DDD58212CF73400F4A708 /* inSwift-4.2 */, 94 | 1E0DDD5B212CF73400F4A708 /* plist-allExpanded-byDefault */, 95 | 1E0DDD5F212CF73400F4A708 /* fileSystem-asTree */, 96 | ); 97 | path = Modules; 98 | sourceTree = ""; 99 | }; 100 | 1E0DDD58212CF73400F4A708 /* inSwift-4.2 */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 1E0DDD59212CF73400F4A708 /* SwiftExample.swift */, 104 | ); 105 | path = "inSwift-4.2"; 106 | sourceTree = ""; 107 | }; 108 | 1E0DDD5B212CF73400F4A708 /* plist-allExpanded-byDefault */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 1E0DDD63212CF73400F4A708 /* Easy.plist */, 112 | 1E0DDD5D212CF73400F4A708 /* PListExample.h */, 113 | 1E0DDD5E212CF73400F4A708 /* PListExample.m */, 114 | ); 115 | path = "plist-allExpanded-byDefault"; 116 | sourceTree = ""; 117 | }; 118 | 1E0DDD5F212CF73400F4A708 /* fileSystem-asTree */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 1E0DDD60212CF73400F4A708 /* FileFinderExample.h */, 122 | 1E0DDD61212CF73400F4A708 /* FileFinderExample.m */, 123 | ); 124 | path = "fileSystem-asTree"; 125 | sourceTree = ""; 126 | }; 127 | 1EB7B6601BED5F6F00B8A333 = { 128 | isa = PBXGroup; 129 | children = ( 130 | 1E0DDD51212CF73400F4A708 /* Src */, 131 | 1E0DDD4C212CF44A00F4A708 /* Res */, 132 | 1EB7B66A1BED5F6F00B8A333 /* Products */, 133 | 77DF80E7F348BA494D95645A /* Pods */, 134 | 875EBD14329795376D5AE7D9 /* Frameworks */, 135 | ); 136 | sourceTree = ""; 137 | }; 138 | 1EB7B66A1BED5F6F00B8A333 /* Products */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 1EB7B6691BED5F6F00B8A333 /* TreeViewExample.app */, 142 | ); 143 | name = Products; 144 | sourceTree = ""; 145 | }; 146 | 77DF80E7F348BA494D95645A /* Pods */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | D02CA5F3586DF942CB947331 /* Pods-TreeViewExample.debug.xcconfig */, 150 | 928253F9BFF2B4DC2CC9D7AA /* Pods-TreeViewExample.release.xcconfig */, 151 | ); 152 | name = Pods; 153 | sourceTree = ""; 154 | }; 155 | 875EBD14329795376D5AE7D9 /* Frameworks */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | F60B7ED6E3F562DA954D17F4 /* Pods_TreeViewExample.framework */, 159 | ); 160 | name = Frameworks; 161 | sourceTree = ""; 162 | }; 163 | /* End PBXGroup section */ 164 | 165 | /* Begin PBXNativeTarget section */ 166 | 1EB7B6681BED5F6F00B8A333 /* TreeViewExample */ = { 167 | isa = PBXNativeTarget; 168 | buildConfigurationList = 1EB7B67B1BED5F6F00B8A333 /* Build configuration list for PBXNativeTarget "TreeViewExample" */; 169 | buildPhases = ( 170 | E657473BC531E669C9A8445B /* [CP] Check Pods Manifest.lock */, 171 | 1EB7B6651BED5F6F00B8A333 /* Sources */, 172 | 1EB7B6661BED5F6F00B8A333 /* Frameworks */, 173 | 1EB7B6671BED5F6F00B8A333 /* Resources */, 174 | 5D93DE11D13DF38CD28F8F41 /* [CP] Embed Pods Frameworks */, 175 | ); 176 | buildRules = ( 177 | ); 178 | dependencies = ( 179 | ); 180 | name = TreeViewExample; 181 | productName = TreeViewExample; 182 | productReference = 1EB7B6691BED5F6F00B8A333 /* TreeViewExample.app */; 183 | productType = "com.apple.product-type.application"; 184 | }; 185 | /* End PBXNativeTarget section */ 186 | 187 | /* Begin PBXProject section */ 188 | 1EB7B6611BED5F6F00B8A333 /* Project object */ = { 189 | isa = PBXProject; 190 | attributes = { 191 | LastSwiftUpdateCheck = 0720; 192 | LastUpgradeCheck = 1000; 193 | ORGANIZATIONNAME = ReImpl; 194 | TargetAttributes = { 195 | 1EB7B6681BED5F6F00B8A333 = { 196 | CreatedOnToolsVersion = 7.2; 197 | DevelopmentTeam = 79Q5K765J7; 198 | }; 199 | }; 200 | }; 201 | buildConfigurationList = 1EB7B6641BED5F6F00B8A333 /* Build configuration list for PBXProject "TreeViewExample" */; 202 | compatibilityVersion = "Xcode 9.3"; 203 | developmentRegion = English; 204 | hasScannedForEncodings = 0; 205 | knownRegions = ( 206 | en, 207 | Base, 208 | ); 209 | mainGroup = 1EB7B6601BED5F6F00B8A333; 210 | productRefGroup = 1EB7B66A1BED5F6F00B8A333 /* Products */; 211 | projectDirPath = ""; 212 | projectRoot = ""; 213 | targets = ( 214 | 1EB7B6681BED5F6F00B8A333 /* TreeViewExample */, 215 | ); 216 | }; 217 | /* End PBXProject section */ 218 | 219 | /* Begin PBXResourcesBuildPhase section */ 220 | 1EB7B6671BED5F6F00B8A333 /* Resources */ = { 221 | isa = PBXResourcesBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | 1E0DDD6A212CF73400F4A708 /* Main.storyboard in Resources */, 225 | 1E0DDD69212CF73400F4A708 /* LaunchScreen.storyboard in Resources */, 226 | 1EE147FE212DB36F0061E572 /* Easy.plist in Resources */, 227 | 1EB7B6741BED5F6F00B8A333 /* Assets.xcassets in Resources */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | /* End PBXResourcesBuildPhase section */ 232 | 233 | /* Begin PBXShellScriptBuildPhase section */ 234 | 5D93DE11D13DF38CD28F8F41 /* [CP] Embed Pods Frameworks */ = { 235 | isa = PBXShellScriptBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | inputPaths = ( 240 | "${SRCROOT}/Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample-frameworks.sh", 241 | "${BUILT_PRODUCTS_DIR}/TreeView/TreeView.framework", 242 | ); 243 | name = "[CP] Embed Pods Frameworks"; 244 | outputPaths = ( 245 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TreeView.framework", 246 | ); 247 | runOnlyForDeploymentPostprocessing = 0; 248 | shellPath = /bin/sh; 249 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-TreeViewExample/Pods-TreeViewExample-frameworks.sh\"\n"; 250 | showEnvVarsInLog = 0; 251 | }; 252 | E657473BC531E669C9A8445B /* [CP] Check Pods Manifest.lock */ = { 253 | isa = PBXShellScriptBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | ); 257 | inputPaths = ( 258 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 259 | "${PODS_ROOT}/Manifest.lock", 260 | ); 261 | name = "[CP] Check Pods Manifest.lock"; 262 | outputPaths = ( 263 | "$(DERIVED_FILE_DIR)/Pods-TreeViewExample-checkManifestLockResult.txt", 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | shellPath = /bin/sh; 267 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 268 | showEnvVarsInLog = 0; 269 | }; 270 | /* End PBXShellScriptBuildPhase section */ 271 | 272 | /* Begin PBXSourcesBuildPhase section */ 273 | 1EB7B6651BED5F6F00B8A333 /* Sources */ = { 274 | isa = PBXSourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | 1E0DDD71212CF73400F4A708 /* AppDelegate.swift in Sources */, 278 | 1EE147FF212DB39C0061E572 /* PListExample.m in Sources */, 279 | 1E0DDD77212CFFFC00F4A708 /* TreeModule.swift in Sources */, 280 | 1E0DDD68212CF73400F4A708 /* TableViewController.swift in Sources */, 281 | 1E0DDD73212CF85300F4A708 /* SelectViewController.swift in Sources */, 282 | 1E0DDD6B212CF73400F4A708 /* SwiftExample.swift in Sources */, 283 | 1EACDC3D212DC07B00CE2C13 /* FileFinderExample.m in Sources */, 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | }; 287 | /* End PBXSourcesBuildPhase section */ 288 | 289 | /* Begin XCBuildConfiguration section */ 290 | 1EB7B6791BED5F6F00B8A333 /* Debug */ = { 291 | isa = XCBuildConfiguration; 292 | buildSettings = { 293 | ALWAYS_SEARCH_USER_PATHS = NO; 294 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 295 | CLANG_CXX_LIBRARY = "libc++"; 296 | CLANG_ENABLE_MODULES = YES; 297 | CLANG_ENABLE_OBJC_ARC = YES; 298 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 299 | CLANG_WARN_BOOL_CONVERSION = YES; 300 | CLANG_WARN_COMMA = YES; 301 | CLANG_WARN_CONSTANT_CONVERSION = YES; 302 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 303 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 304 | CLANG_WARN_EMPTY_BODY = YES; 305 | CLANG_WARN_ENUM_CONVERSION = YES; 306 | CLANG_WARN_INFINITE_RECURSION = YES; 307 | CLANG_WARN_INT_CONVERSION = YES; 308 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 309 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 310 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 311 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 312 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 313 | CLANG_WARN_STRICT_PROTOTYPES = YES; 314 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 315 | CLANG_WARN_UNREACHABLE_CODE = YES; 316 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 317 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 318 | COPY_PHASE_STRIP = NO; 319 | DEBUG_INFORMATION_FORMAT = dwarf; 320 | ENABLE_STRICT_OBJC_MSGSEND = YES; 321 | ENABLE_TESTABILITY = YES; 322 | GCC_C_LANGUAGE_STANDARD = gnu99; 323 | GCC_DYNAMIC_NO_PIC = NO; 324 | GCC_NO_COMMON_BLOCKS = YES; 325 | GCC_OPTIMIZATION_LEVEL = 0; 326 | GCC_PREPROCESSOR_DEFINITIONS = ( 327 | "DEBUG=1", 328 | "$(inherited)", 329 | ); 330 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 331 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 332 | GCC_WARN_UNDECLARED_SELECTOR = YES; 333 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 334 | GCC_WARN_UNUSED_FUNCTION = YES; 335 | GCC_WARN_UNUSED_VARIABLE = YES; 336 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 337 | MTL_ENABLE_DEBUG_INFO = YES; 338 | ONLY_ACTIVE_ARCH = YES; 339 | SDKROOT = iphoneos; 340 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 341 | SWIFT_PRECOMPILE_BRIDGING_HEADER = NO; 342 | SWIFT_VERSION = 4.2; 343 | TARGETED_DEVICE_FAMILY = "1,2"; 344 | VALID_ARCHS = arm64; 345 | }; 346 | name = Debug; 347 | }; 348 | 1EB7B67A1BED5F6F00B8A333 /* Release */ = { 349 | isa = XCBuildConfiguration; 350 | buildSettings = { 351 | ALWAYS_SEARCH_USER_PATHS = NO; 352 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 353 | CLANG_CXX_LIBRARY = "libc++"; 354 | CLANG_ENABLE_MODULES = YES; 355 | CLANG_ENABLE_OBJC_ARC = YES; 356 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 357 | CLANG_WARN_BOOL_CONVERSION = YES; 358 | CLANG_WARN_COMMA = YES; 359 | CLANG_WARN_CONSTANT_CONVERSION = YES; 360 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 361 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 362 | CLANG_WARN_EMPTY_BODY = YES; 363 | CLANG_WARN_ENUM_CONVERSION = YES; 364 | CLANG_WARN_INFINITE_RECURSION = YES; 365 | CLANG_WARN_INT_CONVERSION = YES; 366 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 367 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 368 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 369 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 370 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 371 | CLANG_WARN_STRICT_PROTOTYPES = YES; 372 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 373 | CLANG_WARN_UNREACHABLE_CODE = YES; 374 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 375 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 376 | COPY_PHASE_STRIP = NO; 377 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 378 | ENABLE_NS_ASSERTIONS = NO; 379 | ENABLE_STRICT_OBJC_MSGSEND = YES; 380 | GCC_C_LANGUAGE_STANDARD = gnu99; 381 | GCC_NO_COMMON_BLOCKS = YES; 382 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 383 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 384 | GCC_WARN_UNDECLARED_SELECTOR = YES; 385 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 386 | GCC_WARN_UNUSED_FUNCTION = YES; 387 | GCC_WARN_UNUSED_VARIABLE = YES; 388 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 389 | MTL_ENABLE_DEBUG_INFO = NO; 390 | SDKROOT = iphoneos; 391 | SWIFT_COMPILATION_MODE = wholemodule; 392 | SWIFT_PRECOMPILE_BRIDGING_HEADER = NO; 393 | SWIFT_VERSION = 4.2; 394 | TARGETED_DEVICE_FAMILY = "1,2"; 395 | VALIDATE_PRODUCT = YES; 396 | VALID_ARCHS = arm64; 397 | }; 398 | name = Release; 399 | }; 400 | 1EB7B67C1BED5F6F00B8A333 /* Debug */ = { 401 | isa = XCBuildConfiguration; 402 | baseConfigurationReference = D02CA5F3586DF942CB947331 /* Pods-TreeViewExample.debug.xcconfig */; 403 | buildSettings = { 404 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 405 | CLANG_ENABLE_MODULES = YES; 406 | DEVELOPMENT_TEAM = 79Q5K765J7; 407 | GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; 408 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 409 | INFOPLIST_FILE = Res/Info.plist; 410 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 411 | LD_RUNPATH_SEARCH_PATHS = ( 412 | "$(inherited)", 413 | "@executable_path/Frameworks", 414 | ); 415 | PRODUCT_BUNDLE_IDENTIFIER = mobi.reimplement.treeview.example; 416 | PRODUCT_NAME = "$(TARGET_NAME)"; 417 | SWIFT_OBJC_BRIDGING_HEADER = Src/Bridge.h; 418 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 419 | SWIFT_PRECOMPILE_BRIDGING_HEADER = YES; 420 | SWIFT_VERSION = 4.0; 421 | VALID_ARCHS = arm64; 422 | }; 423 | name = Debug; 424 | }; 425 | 1EB7B67D1BED5F6F00B8A333 /* Release */ = { 426 | isa = XCBuildConfiguration; 427 | baseConfigurationReference = 928253F9BFF2B4DC2CC9D7AA /* Pods-TreeViewExample.release.xcconfig */; 428 | buildSettings = { 429 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 430 | CLANG_ENABLE_MODULES = YES; 431 | DEVELOPMENT_TEAM = 79Q5K765J7; 432 | GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; 433 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 434 | INFOPLIST_FILE = Res/Info.plist; 435 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 436 | LD_RUNPATH_SEARCH_PATHS = ( 437 | "$(inherited)", 438 | "@executable_path/Frameworks", 439 | ); 440 | PRODUCT_BUNDLE_IDENTIFIER = mobi.reimplement.treeview.example; 441 | PRODUCT_NAME = "$(TARGET_NAME)"; 442 | SWIFT_OBJC_BRIDGING_HEADER = Src/Bridge.h; 443 | SWIFT_PRECOMPILE_BRIDGING_HEADER = YES; 444 | SWIFT_VERSION = 4.0; 445 | VALID_ARCHS = arm64; 446 | }; 447 | name = Release; 448 | }; 449 | /* End XCBuildConfiguration section */ 450 | 451 | /* Begin XCConfigurationList section */ 452 | 1EB7B6641BED5F6F00B8A333 /* Build configuration list for PBXProject "TreeViewExample" */ = { 453 | isa = XCConfigurationList; 454 | buildConfigurations = ( 455 | 1EB7B6791BED5F6F00B8A333 /* Debug */, 456 | 1EB7B67A1BED5F6F00B8A333 /* Release */, 457 | ); 458 | defaultConfigurationIsVisible = 0; 459 | defaultConfigurationName = Release; 460 | }; 461 | 1EB7B67B1BED5F6F00B8A333 /* Build configuration list for PBXNativeTarget "TreeViewExample" */ = { 462 | isa = XCConfigurationList; 463 | buildConfigurations = ( 464 | 1EB7B67C1BED5F6F00B8A333 /* Debug */, 465 | 1EB7B67D1BED5F6F00B8A333 /* Release */, 466 | ); 467 | defaultConfigurationIsVisible = 0; 468 | defaultConfigurationName = Release; 469 | }; 470 | /* End XCConfigurationList section */ 471 | }; 472 | rootObject = 1EB7B6611BED5F6F00B8A333 /* Project object */; 473 | } 474 | -------------------------------------------------------------------------------- /Examples/TreeViewExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/TreeViewExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/TreeViewExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/TreeViewExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/TreeViewExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2018 ReImpl 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | **TreeView is iOS single-class component written in ObjC that enables cell + subcells support for UITableView-s.** 3 | 4 | - Project status 5 | - Examples 6 | - Documentation 7 | 8 | 9 | Current status 10 | --- 11 | TreeView was initially written in 2012 and has been used in multiple projects since then. 12 | Development is finalized, component and its public API is considered stable. 13 | 14 | The most convenient way to use it is via CocoaPods: 15 | ```ruby 16 | pod 'TreeView' 17 | ``` 18 | Aletrnativelly you may simply drop **TreeView/TreeTable.h,m** into your project. 19 | 20 | Examples 21 | --- 22 | Preview on Youtube: http://youtu.be/zS3gQ4pnmBs 23 | 24 | You may find demo iOS app with 3 working modules in _'Examples'_ directory: 25 | - inSwift-4.2 26 | - fileSystem-asTree 27 | - plist-allExpanded-byDefault 28 | 29 | 30 | Documentation 31 | --- 32 | 33 | In basic MVC scenario ViewController is set as DataSource of UITableView. 34 | 35 | TreeView package introduces single new class: TreeTable. 36 | It is designed to sit in between ViewController and UITableView as a DataSource object that knows how to work with subcells via deeper "nested" indexPaths. 37 | 38 | TreeTable implements UITableViewDataSource protocol and represents inner subcells with indexPaths of deeper levels. For instance cell at 0-0 indexPath may contain 3 subcells: 0-0-0, 0-0-1, 0-0-2. 39 | 40 | In plan MVC example: TreeTable is a "proxy" object that sits between tableView and a viewController, proxies all calls to data source and converts 2d-like indexPaths (0-0, 0-1, ...) into N-depth indexPaths (0-0, 0-0-1, 0-0-2, 0-1-0-1, ...) to represent subcells. 41 | 42 | You usually decide to use TreeTable component when your UITableViewCell wants to contain its own subcells that can be easily expanded or collapsed.
43 | 44 | Implementation details 45 | --- 46 | 47 | TreeTable adds 2 logical states to every cell: expanded and collapsed. 48 | 49 | You should expand a cell to reveal its subcells.
50 | 51 | Keeping this in mind helper methods(as UITableView category) were implemented:
52 | ```swift 53 | func expand(treeIndexPath: IndexPath) 54 | func isExpanded(treeIndexPath: IndexPath) -> Bool 55 | func collapse(treeIndexPath: IndexPath) 56 | ``` 57 | 58 | Instead of implementing UITableViewDataSource in your controller - implement TreeTableDataSource. TreeTableDataSource protocol extends UITableViewDataSource by introducing 2 new required methods:
59 | ```swift 60 | func tableView(_ tableView: UITableView, isCellExpandedAt treeIndexPath: IndexPath) -> Bool 61 | func tableView(_ tableView: UITableView, numberOfSubCellsForCellAt treeIndexPath: IndexPath) -> Int 62 | ``` 63 | 64 | Notice all required dataSource methods are invoked with indexPath of N-depth that uniquely identify cell or subcell.
65 | Hence you should change behaviour of the following methods: 66 | ```swift 67 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int 68 | func tableView(tableView: UITableView, cellForRowAt treeIndexPath: IndexPath) -> UITableViewCell 69 | ``` 70 | 71 | and use 72 | ```swift 73 | func tableIndexPathFromTreePath(treeIndexPath: IndexPath) -> IndexPath 74 | ``` 75 | if you need to convert N-depth index path into 2d index path. 76 | 77 | On the other hand all optional methods are transparently forwarded to your implementations (if you provide any) and indexPath parameter is not changed - it is 2d indexPath. 78 | You can convert it into N-depth treeIndexPath with: 79 | ```swift 80 | func treeIndexPathFromTablePath(indexPath: NSIndexPath) -> NSIndexPath 81 | ``` 82 | method. 83 | 84 | 85 | Concept image 86 | --- 87 | 88 | ![Concept](https://github.com/genkernel/TreeView/raw/master/concept.jpg) 89 | -------------------------------------------------------------------------------- /TreeTable/TreeTable.h: -------------------------------------------------------------------------------- 1 | // 2 | // TreeTable.h 3 | // 4 | // Author: kernel@realm 5 | // 6 | 7 | #import 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | 12 | @protocol TreeTableDataSource 13 | 14 | @required 15 | - (BOOL)tableView:(UITableView *)tableView isCellExpanded:(NSIndexPath *)indexPath; 16 | - (NSUInteger)tableView:(UITableView *)tableView numberOfSubCellsForCellAtIndexPath:(NSIndexPath *)indexPath; 17 | 18 | @end 19 | 20 | 21 | @class TreeTable; 22 | 23 | @interface UITableView (TreeTable) 24 | 25 | @property (weak, nonatomic, readonly) TreeTable *treeProxy; 26 | 27 | - (void)expand:(NSIndexPath *)indexPath; 28 | - (BOOL)isExpanded:(NSIndexPath *)indexPath; 29 | - (void)collapse:(NSIndexPath *)indexPath; 30 | - (NSArray *)siblings:(NSIndexPath *)indexPath; 31 | - (NSIndexPath *)parent:(NSIndexPath *)indexPath; 32 | 33 | - (nullable UITableViewCell *)rowForTreeIndexPath:(NSIndexPath *)indexPath; 34 | - (NSIndexPath *)treeIndexPathForCell:(UITableViewCell *)item; 35 | 36 | /** 37 | Coverts multidimensional indexPath into 2d UITableView-like indexPath. 38 | 39 | This method is required to prepare indexPath parameter when calling original UITableView's methods. 40 | */ 41 | - (NSIndexPath *)tableIndexPathFromTreePath:(NSIndexPath *)indexPath; 42 | 43 | /** 44 | Converts UITableTable 2d indexPath into multidimentional indexPath. 45 | 46 | @param indexPath 2d UITableView-like index path 47 | 48 | @return multidimantional TreeView-like indexPath. 49 | */ 50 | - (NSIndexPath *)treeIndexPathFromTablePath:(NSIndexPath *)indexPath; 51 | 52 | @end 53 | 54 | 55 | @interface TreeTable : NSObject 56 | 57 | @property (weak, nonatomic, readonly) UITableView *tableView; 58 | @property (weak, nonatomic) IBOutlet id dataSource; 59 | @property (nonatomic) UITableViewRowAnimation expandingAnimation, closingAnimation; 60 | 61 | @end 62 | 63 | NS_ASSUME_NONNULL_END 64 | -------------------------------------------------------------------------------- /TreeTable/TreeTable.m: -------------------------------------------------------------------------------- 1 | // 2 | // TreeView.m 3 | // 4 | // Author: kernel@realm 5 | // 6 | 7 | #import "TreeTable.h" 8 | 9 | @interface UITableView (Internal) 10 | - (NSUInteger)numberOfSubitems:(NSIndexPath *)indexPath; 11 | @end 12 | 13 | @interface TreeTable() 14 | @property (strong, nonatomic, readonly) NSMutableDictionary *model, *directModel; 15 | @property (nonatomic) NSUInteger rootItemsCount; 16 | @end 17 | 18 | @implementation TreeTable 19 | 20 | - (id)init { 21 | self = [super init]; 22 | if (self) { 23 | _model = @{}.mutableCopy; 24 | _directModel = @{}.mutableCopy; 25 | 26 | self.closingAnimation = UITableViewRowAnimationAutomatic; 27 | self.expandingAnimation = UITableViewRowAnimationAutomatic; 28 | } 29 | return self; 30 | } 31 | 32 | #pragma mark Forwarding to Original DataSource 33 | 34 | - (id)forwardingTargetForSelector:(SEL)selector { 35 | if ([self.dataSource respondsToSelector:selector]) { 36 | return self.dataSource; 37 | } 38 | return nil; 39 | } 40 | 41 | - (BOOL)respondsToSelector:(SEL)selector { 42 | BOOL responds = [super respondsToSelector:selector]; 43 | if (responds) { 44 | return responds; 45 | } 46 | return [self.dataSource respondsToSelector:selector]; 47 | } 48 | 49 | #pragma mark UITableViewDataSource 50 | 51 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 52 | if ([self.dataSource respondsToSelector:@selector(numberOfSectionsInTableView:)]) { 53 | return [self.dataSource numberOfSectionsInTableView:tableView]; 54 | } 55 | 56 | return 1; 57 | } 58 | 59 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 60 | _tableView = tableView; 61 | 62 | NSUInteger rows = [self.dataSource tableView:tableView numberOfRowsInSection:section]; 63 | NSUInteger totalRowsCount = rows; 64 | 65 | NSIndexPath *ip = [NSIndexPath indexPathWithIndex:section]; 66 | self.directModel[ip] = @(rows); 67 | 68 | for (int i = 0; i < rows; i++) { 69 | NSIndexPath *ip = [NSIndexPath indexPathForRow:i inSection:section]; 70 | totalRowsCount += [self.tableView numberOfSubitems:ip]; 71 | } 72 | 73 | self.model[ip] = @(totalRowsCount); 74 | 75 | return totalRowsCount; 76 | } 77 | 78 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 79 | NSIndexPath * itemPath = [self.tableView treeIndexPathFromTablePath:indexPath]; 80 | 81 | if (!itemPath) { 82 | NSLog(@"ERR. nil indexPath specified. %s", __PRETTY_FUNCTION__); 83 | return nil; 84 | } 85 | return [self.dataSource tableView:self.tableView cellForRowAtIndexPath:itemPath]; 86 | } 87 | 88 | @end 89 | 90 | 91 | @implementation UITableView (TreeTable) 92 | @dynamic treeProxy; 93 | 94 | - (TreeTable *)treeProxy { 95 | return (TreeTable *)self.dataSource; 96 | } 97 | 98 | - (NSIndexPath *)tableIndexPathFromTreePath:(NSIndexPath *)indexPath { 99 | NSUInteger row = [self rowOffsetForIndexPath:indexPath]; 100 | return [NSIndexPath indexPathForRow:row inSection:indexPath.section]; 101 | } 102 | 103 | /** 104 | Converts TreeTable indexPath to TableView row index. 105 | */ 106 | - (NSUInteger)rowOffsetForIndexPath:(NSIndexPath *)indexPath { 107 | NSUInteger section = [indexPath indexAtPosition:0]; 108 | NSIndexPath *ip = [NSIndexPath indexPathWithIndex:section]; 109 | 110 | return [self rowOffsetForIndexPath:indexPath root:ip]; 111 | } 112 | 113 | - (NSUInteger)rowOffsetForIndexPath:(NSIndexPath *)indexPath root:(NSIndexPath *)root { 114 | if (NSOrderedSame == [indexPath compare:root]) { 115 | return 0; 116 | } 117 | 118 | NSUInteger totalCount = 0; 119 | if (root.length > 1) { 120 | totalCount++; 121 | } 122 | 123 | NSUInteger subitemsCount = 0; 124 | NSNumber *num = self.treeProxy.directModel[root]; 125 | if (num) { 126 | subitemsCount = num.intValue; 127 | } else { 128 | if ([self.treeProxy.dataSource tableView:self isCellExpanded:root]) { 129 | subitemsCount = [self.treeProxy.dataSource tableView:self numberOfSubCellsForCellAtIndexPath:root]; 130 | } 131 | } 132 | 133 | for (int i = 0; i < subitemsCount; i++) { 134 | NSIndexPath *ip = [root indexPathByAddingIndex:i]; 135 | 136 | if (NSOrderedAscending != [ip compare:indexPath]) { 137 | break; 138 | } 139 | 140 | if (ip.length < indexPath.length) { 141 | // cell@indexPath is inner comparing to cell@ip. 142 | NSUInteger count = [self rowOffsetForIndexPath:indexPath root:ip]; 143 | totalCount += count; 144 | } else { 145 | NSUInteger count = [self rowOffsetForIndexPath:indexPath root:ip]; 146 | totalCount += count; 147 | } 148 | } 149 | 150 | return totalCount; 151 | } 152 | 153 | - (NSUInteger)numberOfSubitems:(NSIndexPath *)indexPath { 154 | NSUInteger count = 0; 155 | 156 | BOOL isExpanded = NO; 157 | if (1 == indexPath.length) { 158 | // Sections are always expanded. 159 | isExpanded = YES; 160 | } else { 161 | isExpanded = [self.treeProxy.dataSource tableView:self isCellExpanded:indexPath]; 162 | } 163 | 164 | if (isExpanded) { 165 | NSUInteger subitemsCount = [self.treeProxy.dataSource tableView:self numberOfSubCellsForCellAtIndexPath:indexPath]; 166 | 167 | for (int i=0; i 0) { 274 | for (int i = 0; i < count; i++) { 275 | NSIndexPath *ip = [indexPath indexPathByAddingIndex:i]; 276 | [self expand:ip array:rows]; 277 | } 278 | 279 | NSMutableArray *insertRows = [NSMutableArray arrayWithCapacity:count]; 280 | for (NSUInteger i = 0; i < count; i++) { 281 | NSIndexPath *ip = [indexPath indexPathByAddingIndex:i]; 282 | NSUInteger row = [self rowOffsetForIndexPath:ip]; 283 | 284 | [insertRows addObject:[NSIndexPath indexPathForRow:row inSection:section]]; 285 | } 286 | [rows addObjectsFromArray:insertRows]; 287 | } 288 | } 289 | 290 | - (NSArray *)siblings:(NSIndexPath *)indexPath { 291 | NSIndexPath * parent = [self parent:indexPath]; 292 | NSMutableArray *arr = [NSMutableArray arrayWithCapacity:20]; 293 | 294 | // TODO: dont use "numberOfSections" as it triggers dataSource methods. 295 | for (int i = 0; i < self.numberOfSections; i++) { 296 | NSIndexPath *ip = nil; 297 | if (parent) { 298 | ip = [parent indexPathByAddingIndex:i]; 299 | } else { 300 | ip = [NSIndexPath indexPathWithIndex:i]; 301 | } 302 | if (NSOrderedSame == [ip compare:indexPath]) { 303 | continue; 304 | } 305 | [arr addObject:ip]; 306 | } 307 | return arr; 308 | } 309 | 310 | - (NSIndexPath *)parent:(NSIndexPath *)indexPath { 311 | if ([indexPath length]>1) { 312 | return [indexPath indexPathByRemovingLastIndex]; 313 | } else { 314 | return nil; 315 | } 316 | } 317 | 318 | - (void)collapse:(NSIndexPath *)indexPath { 319 | if (![self isExpanded:indexPath]) { 320 | return; 321 | } 322 | 323 | NSMutableArray * dismissRows = [NSMutableArray array]; 324 | [self collapse:indexPath array:dismissRows]; 325 | 326 | [self deleteRowsAtIndexPaths:dismissRows withRowAnimation:self.treeProxy.closingAnimation]; 327 | } 328 | 329 | - (void)collapse:(NSIndexPath *)indexPath array:(NSMutableArray *)rows { 330 | NSUInteger section = indexPath.section; 331 | int count = [self.treeProxy.directModel[indexPath] intValue]; 332 | 333 | if (count > 0) { 334 | NSUInteger row = 0; 335 | NSMutableArray *dismissRows = [NSMutableArray arrayWithCapacity:count]; 336 | for (int i = 0; i < count; i++) { 337 | NSIndexPath *ip = [indexPath indexPathByAddingIndex:i]; 338 | 339 | row = [self rowOffsetForIndexPath:ip]; 340 | [dismissRows addObject:[NSIndexPath indexPathForRow:row inSection:section]]; 341 | } 342 | [rows addObjectsFromArray:dismissRows]; 343 | 344 | for (int i = count-1; i >= 0; i--) { 345 | NSIndexPath *ip = [indexPath indexPathByAddingIndex:i]; 346 | [self collapse:ip array:rows]; 347 | } 348 | } 349 | 350 | [self.treeProxy.model removeObjectForKey:indexPath]; 351 | [self.treeProxy.directModel removeObjectForKey:indexPath]; 352 | } 353 | 354 | @end 355 | -------------------------------------------------------------------------------- /TreeView.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Any lines starting with a # are optional, but their use is encouraged 3 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 4 | # 5 | 6 | Pod::Spec.new do |s| 7 | s.name = 'TreeView' 8 | s.version = '1.1.3' 9 | 10 | s.platform = :ios, '8.0' 11 | s.ios.deployment_target = '8.0' 12 | s.requires_arc = true 13 | 14 | s.summary = 'Sub-cells simplified. ©' 15 | s.description = <<-DESC 16 | TreeView is a "proxy" object that sits between UITableView and UIViewController, 17 | proxies all calls to data source and converts 2d-like indexPaths (0-0, 0-1, ...) into N-depth indexPaths (0-0, 0-0-1, 0-0-2, 0-1-0-1, ...) 18 | so you can have nested subcells within native UITableView. 19 | DESC 20 | 21 | s.homepage = 'https://github.com/genkernel/TreeView' 22 | s.license = { :type => 'MIT', :file => 'LICENSE' } 23 | s.author = { 'kernel' => 'kernel@reimplement.mobi' } 24 | s.source = { :git => 'https://github.com/genkernel/TreeView.git', :tag => s.version.to_s } 25 | 26 | s.source_files = "TreeTable/*.{h,m}" 27 | 28 | s.requires_arc = true 29 | end 30 | -------------------------------------------------------------------------------- /concept.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/genkernel/TreeView/bb778f181bcb8b5c9a90a0bc40771fdde75f2294/concept.jpg --------------------------------------------------------------------------------