{"id":13685280,"url":"https://github.com/jamztang/JTGestureBasedTableViewDemo","last_synced_at":"2025-05-01T01:31:22.596Z","repository":{"id":2474429,"uuid":"3447219","full_name":"jamztang/JTGestureBasedTableViewDemo","owner":"jamztang","description":"(demo) Recreating the buttonless interaction pattern found in Clear for iPhone app","archived":false,"fork":false,"pushed_at":"2019-11-26T18:15:43.000Z","size":716,"stargazers_count":1332,"open_issues_count":13,"forks_count":201,"subscribers_count":91,"default_branch":"master","last_synced_at":"2024-10-29T19:58:19.192Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://jamztang.com","language":"Objective-C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamztang.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":"2012-02-15T06:34:59.000Z","updated_at":"2024-06-12T08:33:35.000Z","dependencies_parsed_at":"2022-08-30T20:21:12.269Z","dependency_job_id":null,"html_url":"https://github.com/jamztang/JTGestureBasedTableViewDemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamztang%2FJTGestureBasedTableViewDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamztang%2FJTGestureBasedTableViewDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamztang%2FJTGestureBasedTableViewDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamztang%2FJTGestureBasedTableViewDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamztang","download_url":"https://codeload.github.com/jamztang/JTGestureBasedTableViewDemo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224230795,"owners_count":17277373,"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-02T14:00:48.114Z","updated_at":"2024-11-12T06:31:45.105Z","avatar_url":"https://github.com/jamztang.png","language":"Objective-C","funding_links":[],"categories":["Objective-C","etc"],"sub_categories":[],"readme":"JTGestureBasedTableView\n=======================\n\nAn iOS objective-c library template to recreate the gesture based interaction found from Clear for iPhone app.\n\nThis project is aimed to be a truely flexible solution, but currently it's still in development stage and missing a few features.\n\nThe library now requires iOS 5.0 with ARC, please use -fobjc-arc compiler flag to add support for non-ARC projects.\n\nKnown Issues\n------------\n\nIt has been developed under iOS 4.3 and 5.0 devices, sample code has been built using ARC (not quite properly). I am still studying to have a proper refactor on my code for a real ARC adoption. \nThere's currently one known issues related to running on non-arc enviornment (e.g. refs #4). Please use `-fobjc-arc` per source file complier flag for compiling on non-ARC enviroment.\n\n\nAbstract\n--------\n\nClear for iPhone app has showed us so much we can do with a buttonless interface, and I am trying to reveal the technique behind the gesture based interaction, hopefully can heavy-lifted all of us whom trying to achieve the same.\n\n\nDemo\n----\n\n\u003cimg src=https://github.com/mystcolor/JTGestureBasedTableViewDemo/raw/master/demo1.png width=174 style=\"border: 1px solid white;\"\u003e\u003c/img\u003e\n\u003cimg src=https://github.com/mystcolor/JTGestureBasedTableViewDemo/raw/master/demo2.png width=174 style=\"border: 1px solid white;\"\u003e\u003c/img\u003e\n\u003cimg src=https://github.com/mystcolor/JTGestureBasedTableViewDemo/raw/master/demo3.png width=174 style=\"border: 1px solid white;\"\u003e\u003c/img\u003e\n\u003cimg src=https://github.com/mystcolor/JTGestureBasedTableViewDemo/raw/master/demo4.png width=174 style=\"border: 1px solid white;\"\u003e\u003c/img\u003e\n\u003cimg src=https://github.com/mystcolor/JTGestureBasedTableViewDemo/raw/master/demo5.png width=174 style=\"border: 1px solid white;\"\u003e\u003c/img\u003e\n\n\nFeatures\n--------\n\nIt only supports few features at the moment.\n\n- Pull down to add cell\n- Pinch to create cell\n- Panning on cell gesture\n- Long hold to reorder cell\n- Pull to return to List (Thanks [SungDong Kim][] for making this happen)\n\n10 Jan 2013 Update:\n- Better pinch animation and iPhone 5 screen support (Big thanks for [Lukas Foldyna][] for refactor and polishing!)\n\n\nHow To Use It\n-------------\n\n\n### Installation\n\nInclude all header and implementation files in JTGestureBasedTabeView/ into your project, and also links the QuartzCore framework to your target.\n\n\n### Setting up your UITableView for your viewController\n\n    #import \"JTTableViewGestureRecognizer.h\"\n    \n    @interface ViewController () \u003cJTTableViewGestureAddingRowDelegate, JTTableViewGestureEditingRowDelegate\u003e\n    @property (nonatomic, strong) NSMutableArray *rows;\n    @property (nonatomic, strong) JTTableViewGestureRecognizer *tableViewRecognizer;\n    @end\n    \n    @implementation ViewController\n    @synthesize tableViewRecognizer;\n    \n    - (void)viewDidload {\n        /*\n        :\n        */\n    \n        // In our examples, we setup self.rows as datasource\n        self.rows = ...;\n        \n        // Setup your tableView.delegate and tableView.datasource,\n        // then enable gesture recognition in one line.\n        self.tableViewRecognizer = [self.tableView enableGestureTableViewWithDelegate:self];\n    }\n\n\n### Enabling adding cell gestures\n\n    // Conform to JTTableViewGestureAddingRowDelegate to enable features\n    // - drag down to add cell\n    // - pinch to add cell\n    @protocol JTTableViewGestureAddingRowDelegate \u003cNSObject\u003e\n\n    - (void)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer needsAddRowAtIndexPath:(NSIndexPath *)indexPath;\n    - (void)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer needsCommitRowAtIndexPath:(NSIndexPath *)indexPath;\n    - (void)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer needsDiscardRowAtIndexPath:(NSIndexPath *)indexPath;\n\n    @optional\n\n    - (NSIndexPath *)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer willCreateCellAtIndexPath:(NSIndexPath *)indexPath;\n    - (CGFloat)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer heightForCommittingRowAtIndexPath:(NSIndexPath *)indexPath;\n\n    @end\n\n\n### Enabling editing cell gestures\n\n    // Conform to JTTableViewGestureEditingRowDelegate to enable features\n    // - swipe to edit cell\n    @protocol JTTableViewGestureEditingRowDelegate \u003cNSObject\u003e\n\n    // Panning (required)\n    - (BOOL)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer canEditRowAtIndexPath:(NSIndexPath *)indexPath;\n    - (void)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer didEnterEditingState:(JTTableViewCellEditingState)state forRowAtIndexPath:(NSIndexPath *)indexPath;\n    - (void)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer commitEditingState:(JTTableViewCellEditingState)state forRowAtIndexPath:(NSIndexPath *)indexPath;\n\n    @optional\n\n    - (CGFloat)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer lengthForCommitEditingRowAtIndexPath:(NSIndexPath *)indexPath;\n    - (void)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer didChangeContentViewTranslation:(CGPoint)translation forRowAtIndexPath:(NSIndexPath *)indexPath;\n\n    @end\n\n\n### Enabling reorder cell gestures\n\n    // Conform to JTTableViewGestureMoveRowDelegate to enable features\n    // - long press to reorder cell\n    @protocol JTTableViewGestureMoveRowDelegate \u003cNSObject\u003e\n\n    - (BOOL)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer canMoveRowAtIndexPath:(NSIndexPath *)indexPath;\n    - (void)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer needsCreatePlaceholderForRowAtIndexPath:(NSIndexPath *)indexPath;\n    - (void)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer needsMoveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath;\n    - (void)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer needsReplacePlaceholderForRowAtIndexPath:(NSIndexPath *)indexPath;\n\n    @end\n\n\n### You choose what to enable\n\nYou can pick what gestures to be enabled by conforming to the appropriate protocols.\nDon't forget to look at JTGestureBasedTableViewDemo/ViewController.m for a complete working usage.\n\n\nLicense\n-------\n\nThis project is under MIT License, please feel free to contribute and use it.\n\nJames\n\n[SungDong Kim]:https://github.com/acroedit\n[Lukas Foldyna]:https://github.com/augard\n\n\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/jamztang/jtgesturebasedtableviewdemo/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamztang%2FJTGestureBasedTableViewDemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamztang%2FJTGestureBasedTableViewDemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamztang%2FJTGestureBasedTableViewDemo/lists"}