{"id":13771548,"url":"https://github.com/Augustyniak/RATreeView","last_synced_at":"2025-05-11T04:30:48.433Z","repository":{"id":10380020,"uuid":"12526570","full_name":"Augustyniak/RATreeView","owner":"Augustyniak","description":"Library providing easy-to-use interface for displaying tree structures on iOS and tvOS.","archived":false,"fork":false,"pushed_at":"2019-12-10T14:38:27.000Z","size":5428,"stargazers_count":2494,"open_issues_count":106,"forks_count":465,"subscribers_count":75,"default_branch":"master","last_synced_at":"2025-04-28T04:26:30.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"alta3/openstack-labs","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Augustyniak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-01T20:46:42.000Z","updated_at":"2025-04-27T14:32:50.000Z","dependencies_parsed_at":"2022-08-31T13:10:53.260Z","dependency_job_id":null,"html_url":"https://github.com/Augustyniak/RATreeView","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Augustyniak%2FRATreeView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Augustyniak%2FRATreeView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Augustyniak%2FRATreeView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Augustyniak%2FRATreeView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Augustyniak","download_url":"https://codeload.github.com/Augustyniak/RATreeView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253518941,"owners_count":21921074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T17:00:52.652Z","updated_at":"2025-05-11T04:30:46.159Z","avatar_url":"https://github.com/Augustyniak.png","language":"Objective-C","readme":"RATreeView (iOS 7.0+, tvOS 9.0+) \n==============\n\n👷 Project created and maintained by [Rafał Augustyniak](http://augustyniak.me). You can find me on twitter ([@RaAugustyniak](https://twitter.com/RaAugustyniak)).\n\n\nIntroduction\n-----------------\n\n[![Twitter: @raaugustyniak](https://img.shields.io/badge/contact-@raaugustyniak-blue.svg?style=flat)](https://twitter.com/raaugustyniak)\n[![Build Status](https://img.shields.io/travis/Augustyniak/RATreeView/master.svg?style=flat)](https://travis-ci.org/Augustyniak/RATreeView)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![CocoaPods](https://img.shields.io/cocoapods/v/RATreeView.svg?style=flat)](https://github.com/Augustyniak/RATreeView)\n[![Platform](https://img.shields.io/cocoapods/p/RATreeView.svg?style=flat)](http://cocoadocs.org/docsets/RATreeView)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/Augustyniak/RATreeView/blob/master/LICENCE.md)\n\niOS             |  tvOS\n:-------------------------:|:-------------------------:\n[![](https://raw.github.com/Augustyniak/RATreeView/master/Screens/animation.gif)](https://raw.github.com/Augustyniak/RATreeView/master/Screens/animation.gif)  | [![](https://raw.github.com/Augustyniak/RATreeView/master/Screens/tvos_animation.gif)](https://raw.github.com/Augustyniak/RATreeView/master/Screens/tvos_animation.gif)\n\n\n\n\n\nRATreeView is a class designed to provide easy and pleasant way to work with tree views on iOS and tvOS. It works as a wrapper for the UITableView, defining its own delegate and data source methods which make working with tree data structures really easy.\n\nRATreeView is highly customizable and has a lot of features. \n\n\nInstallation\n-----------------\n\n### CocoaPods\n\n[CocoaPods](http://www.cocoapods.org) is the recommended way to add RATreeView to your project.\n\n1. Add additional entry to your Podfile.\n\n  ```ruby\n  pod \"RATreeView\", \"~\u003e 2.1.2\"\n  ```\n\n2. Install Pod(s) running `pod install` command.\n3. Include RATreeView using `#import \u003cRATreeView.h\u003e`.\n\n###Source files\n\n1. Downloaded the latest version of the library using [link](https://github.com/Augustyniak/RATreeView/archive/master.zip).\n2. Copy content of the downloaded (and unzipped) zip file into your project by dragging it into Project's navigator files structure. \n\n\n\nRequirements\n-----------------\n\n\n* Xcode 5\n* iOS 7 or newer/tvOS 9 or newer\n\n\nUsage\n-----------------\n\n\nCheck out the demo for example usage of library. Make sure you read the [RATreeView documentation on Cocoa Docs](http://cocoadocs.org/docsets/RATreeView/2.1.2).\n\n\n### Basics\n\n1. Add following import in file of your project when you want to use RATreeView:\n \n   ```objc\n   // In case you are using RATreeView with CocoaPods\n   #import \u003cRATreeView.h\u003e\n   ```\n      \n   ```objc\n   // In case you are using RATreeView by simply copying \n   // source files of the RATreeView into your project\n   #import \"RATreeView.h\"\n   ``` \n \n2. Simplest way to initialize and configure RATreeView:\n\n   ```objc\n   RATreeView *treeView = [[RATreeView alloc] initWithFrame:self.view.bounds];\n   treeView.delegate = self;\n   treeView.dataSource = self;       \n   [self.view addSubview:treeView];\n   [treeView reloadData];\n   ```\n         \n3. Implement required methods of the RATreeView's data source:\n \n   ```objc\n   - (NSInteger)treeView:(RATreeView *)treeView numberOfChildrenOfItem:(id)item\n   {\n       return item ? 3 : 0;\n   }\n   ```\n\n   ```objc\n   - (UITableViewCell *)treeView:(RATreeView *)treeView cellForItem:(id)item treeNodeInfo:(RATreeNodeInfo *)treeNodeInfo\n   {\n      // create and configure cell for *item*\n      return cell\n   }\n   ```\n\n   ```objc\n   - (id)treeView:(RATreeView *)treeView child:(NSInteger)index ofItem:(id)item\n   {\n      return @(index);\n   }\n   ```\n\n### Adding Pull to Refresh control\n\nAdding pull to refresh gesture is really easy using `RATreeView` and standard `UIRefreshControl` control.\n\n[![](https://raw.github.com/Augustyniak/RATreeView/master/Screens/PullToRefresh.png)](https://raw.github.com/Augustyniak/RATreeView/master/Screens/PullToRefresh.png)\n\n   ```objc\nUIRefreshControl *refreshControl = [UIRefreshControl new];\n[refreshControl addTarget:self action:@selector(refreshControlChanged:) forControlEvents:UIControlEventValueChanged];\n[treeView.scrollView addSubview:refreshControl];\n   ```\n\nDocumentation\n-----------------\n\nDocumentation is available on [CocoaPods](http://cocoadocs.org/docsets/RATreeView/2.1.2).\n\nTODO\n-----------------\n\n- Better delegate callbacks in case of recursive collapse and expand operations.\n- Improved documentation.\n- Unit tests.\n- Re-order rows feature.\n  \nAuthor\n-----------------\n\nRATreeView was created by Rafał Augustyniak. You can find me on twitter ([@RaAugustyniak](https://twitter.com/RaAugustyniak)).\n\n\nRelease Notes \n-----------------\n\nInformation about newer versions of the library can be found in the [releases section](https://github.com/Augustyniak/RATreeView/releases) of the repository.\n\nVersion 1.0.2\n- Fixed bug in select and deselect operations.\n- Fixed bug in recursive expand operation (via @Arrnas).\n\nVersion 1.0.1\n- Fixed bug in recursive expand operation.\n\nVersion 1.0.0\n\n- Improved performance.\n- Added recursive expand operation. It can be performed by using `expandRowForItem: expandChildren:withRowAnimation:` method. Default behavior is non recursive expand.\n- Added recursive collapse operation. It can be performed by using `collapseRowForItem: expandChildren:withRowAnimation:` method. Default behavior is non recursive collapse.\n- Fixed bug in `itemForRowAtPoint:` method when passed point isn't inside any cell.\n\nVersion 0.9.2\n\n- Fixed bug in `endUpdates` method.\n\nVersion 0.9.1\n\n- Fixed behaviour of treeView:willSelectRowForItem: delegate method.\n\nVersion 0.9.0\n\n- Added possiblity to change content of the RATreeView dynamically. Possible row operations:\n\t- additions \n\t- deletions \n    - repositions\n- Added additional 'cell accessing' methods.\n- Removed `RATreeNodeInfo` class.\n- Added additional instance methods in RATreeView which substitute functionality provided by `RATreeNodeInfo` class.\n- Bug fixes.\n\nLicense\n-----------------\n\nMIT licensed, Copyright (c) 2014 Rafał Augustyniak, [@RaAugustyniak](http://twitter.com/RaAugustyniak)\n\n","funding_links":[],"categories":["TreeView","etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAugustyniak%2FRATreeView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAugustyniak%2FRATreeView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAugustyniak%2FRATreeView/lists"}