{"id":13611644,"url":"https://github.com/lxcid/LXReorderableCollectionViewFlowLayout","last_synced_at":"2025-04-13T05:33:07.614Z","repository":{"id":4892023,"uuid":"6047546","full_name":"lxcid/LXReorderableCollectionViewFlowLayout","owner":"lxcid","description":"Extends `UICollectionViewFlowLayout` to support reordering of cells. Similar to long press and pan on books in iBook.","archived":false,"fork":false,"pushed_at":"2019-03-08T13:01:46.000Z","size":222,"stargazers_count":1861,"open_issues_count":56,"forks_count":325,"subscribers_count":75,"default_branch":"master","last_synced_at":"2025-03-24T02:12:41.033Z","etag":null,"topics":["drag-and-drop","ibooks","objective-c","reordering","uicollectionview","uicollectionviewlayout"],"latest_commit_sha":null,"homepage":"http://lxcid.com/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"raisoblast/bottle-pgsql","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lxcid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-02T16:09:14.000Z","updated_at":"2025-01-01T22:34:49.000Z","dependencies_parsed_at":"2022-08-06T18:00:42.282Z","dependency_job_id":null,"html_url":"https://github.com/lxcid/LXReorderableCollectionViewFlowLayout","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxcid%2FLXReorderableCollectionViewFlowLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxcid%2FLXReorderableCollectionViewFlowLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxcid%2FLXReorderableCollectionViewFlowLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lxcid%2FLXReorderableCollectionViewFlowLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lxcid","download_url":"https://codeload.github.com/lxcid/LXReorderableCollectionViewFlowLayout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246207492,"owners_count":20740723,"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":["drag-and-drop","ibooks","objective-c","reordering","uicollectionview","uicollectionviewlayout"],"created_at":"2024-08-01T19:01:59.536Z","updated_at":"2025-04-13T05:33:06.321Z","avatar_url":"https://github.com/lxcid.png","language":"Objective-C","funding_links":[],"categories":["Objective-C","Objective-C  Stars 1000以内排名整理"],"sub_categories":[],"readme":"LXReorderableCollectionViewFlowLayout\n=====================================\n\nExtends `UICollectionViewFlowLayout` to support reordering of cells. Similar to long press and pan on books in iBook.\n\nFeatures\n========\n\nThe goal of LXReorderableCollectionViewFlowLayout is to provides capability for reordering of cell, similar to iBook.\n\n - Long press on cell to invoke reordering capability.\n - When reordering capability is invoked, fade the selected cell from highlighted to normal state.\n - Drag around the selected cell to move it to the desired location, the other cells adjust accordingly. Callback in the form of delegate methods are invoked.\n - Drag selected cell to the edges, depending on scroll direction, scroll in the desired direction.\n - Release to stop reordering.\n\nGetting Started\n===============\n\n\u003cimg src=\"https://raw.github.com/lxcid/LXReorderableCollectionViewFlowLayout/master/Content/Screenshots/screenshot1.png\" alt=\"Screenshot\" title=\"Screenshot\" style=\"display:block; margin: 10px auto 30px auto; width: 300px; height: 400px;\" class=\"center\"\u003e\n\n 1. Install using *CocoaPods* or drag the `LXReorderableCollectionViewFlowLayout` folder into your project.\n 2. Initialize/Setup your collection view to use `LXReorderableCollectionViewFlowLayout`.\n\n 3. The collection view controller that is to support reordering capability must conforms to `LXReorderableCollectionViewDataSource` protocol. For example,\n\n        - (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)fromIndexPath willMoveToIndexPath:(NSIndexPath *)toIndexPath {\n            id object = [mutableArray objectAtIndex:fromIndexPath.item];\n            [mutableArray removeObjectAtIndex:fromIndexPath.item];\n            [mutableArray insertObject:object atIndex:toIndexPath.item];\n        }\n\n 4. You can listen to some dragging events through comforming to `LXReorderableCollectionViewDelegateFlowLayout` methods.\n 5. Setup your collection view accordingly to your need, run and see it in action! :D\n\nChanges\n============\n\n### Feb 24 2013 (Luke Scott)\n\n- Removed setUpGestureRecognizersOnCollectionView\n- Removed layout from delegate methods (can be accessed from collectionView)\n- Renamed delegate methods and split between dataSource and delegate\n- Added dataSource and delegate examples to sample project\n\n### Feb 23 2013 (Luke Scott)\n\n- Refactored everything to be more readable / maintainable\n- Deprecated setUpGestureRecognizersOnCollectionView - no longer necessary\n\nRequirements\n============\n\n - ARC\n - iOS 6 and above preferred\n - Xcode 4.5 and above\n\nCredits\n=======\n\n- Originally created by Stan Chang Khin Boon ([Github: @lxcid](http://github.com/lxcid), [Twitter: @lxcid](https://twitter.com/lxcid), [Google+: +Stan Chang Khin Boon](https://plus.google.com/118232095174296729296?rel=author)) for [buUuk](http://www.buuuk.com/), with reference to [MaximilianL's implementation on Apple Developer Forums](https://devforums.apple.com/message/682764).\n- Refactored by [Luke Scott](https://github.com/lukescott), with some help from [mulle-nat's fork](https://github.com/mulle-nat/LXReorderableCollectionViewFlowLayout).\n- Playing cards in the demo are downloaded from [http://www.jfitz.com/cards/](http://www.jfitz.com/cards/).\n\nAlternatives\n============\n\n- [DraggableCollectionView](https://github.com/lukescott/DraggableCollectionView) by [Luke Scott](https://github.com/lukescott).\n\nLicense\n=======\n\nLXReorderableCollectionViewFlowLayout is available under [the MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxcid%2FLXReorderableCollectionViewFlowLayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flxcid%2FLXReorderableCollectionViewFlowLayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flxcid%2FLXReorderableCollectionViewFlowLayout/lists"}