{"id":13452911,"url":"https://github.com/DeveloperLx/LxGridView-swift","last_synced_at":"2025-03-23T21:35:20.163Z","repository":{"id":89022747,"uuid":"38318949","full_name":"DeveloperLx/LxGridView-swift","owner":"DeveloperLx","description":"Imitation iOS system desktop icon arrangement and interaction by UICollectionView!","archived":false,"fork":false,"pushed_at":"2015-08-02T02:16:46.000Z","size":10023,"stargazers_count":162,"open_issues_count":1,"forks_count":14,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-01T08:06:53.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeveloperLx.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":"2015-06-30T15:59:38.000Z","updated_at":"2024-06-13T09:51:04.000Z","dependencies_parsed_at":"2023-03-10T22:45:20.784Z","dependency_job_id":null,"html_url":"https://github.com/DeveloperLx/LxGridView-swift","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/DeveloperLx%2FLxGridView-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperLx%2FLxGridView-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperLx%2FLxGridView-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperLx%2FLxGridView-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeveloperLx","download_url":"https://codeload.github.com/DeveloperLx/LxGridView-swift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221918548,"owners_count":16901644,"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-07-31T08:00:27.223Z","updated_at":"2024-10-28T19:31:04.687Z","avatar_url":"https://github.com/DeveloperLx.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# LxGridView-swift\nImitate Apple iOS system Desktop icons arrangement and interaction by inheriting UICollectionView!\n\n*\t![demo](demo.gif)\n---\n###\tInstallation\n\tYou only need drag directory LxGridView to your project.\n###\tSupport\t\n\tMinimum support iOS version: iOS 6.0\n###\tUsage\n\n`You can use LxGridView as convenient as UICollectionView.`\n\n\tlet _gridViewFlowLayout = LxGridViewFlowLayout()\n\t//\t... config _gridViewFlowLayout\n\t\n\t_gridView = LxGridView(frame: GRIDVIEW_FRAME, collectionViewLayout: _gridViewFlowLayout)\n\t//\t...\tcongif _gridView\n\t\n\t_gridView.registerClass(LxGridViewCell.classForCoder(), forCellWithReuseIdentifier: GRIDVIEW_CELL_REUSE_IDENTIFIER)\n\n\t//\timplement delegate method\n\tfunc collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -\u003e Int {\n    \n        return dataArray.count\n    }\n    \n    func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -\u003e UICollectionViewCell {\n    \n        let cell = collectionView.dequeueReusableCellWithReuseIdentifier(LxGridViewCellReuseIdentifier, forIndexPath: indexPath) as! LxGridViewCell\n        \n        cell.delegate = self\n        cell.editing = _gridView.editing\n        \n        //\t...\tconfig cell\n        \n        return cell\n    }\n\n    func collectionView(collectionView: LxGridView, itemAtIndexPath sourceIndexPath: NSIndexPath, willMoveToIndexPath destinationIndexPath: NSIndexPath) {\n        \n        let dataDict = dataArray[sourceIndexPath.item]\n        dataArray.removeAtIndex(sourceIndexPath.item)\n        dataArray.insert(dataDict, atIndex: destinationIndexPath.item)\n    }\n    \n    func deleteButtonClickedInGridViewCell(gridViewCell: LxGridViewCell) {\n\n        if let gridViewCellIndexPath = _gridView!.indexPathForCell(gridViewCell) {\n        \n            dataArray.removeAtIndex(gridViewCellIndexPath.item)\n            _gridView.performBatchUpdates({ [unowned self] () -\u003e Void in\n                self._gridView.deleteItemsAtIndexPaths([gridViewCellIndexPath])\n            }, completion: nil)\n        }\n    }\n\n---\n###\tLicense\nLxGridView is available under the Apache License 2.0. See the LICENSE file for more info.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDeveloperLx%2FLxGridView-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDeveloperLx%2FLxGridView-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDeveloperLx%2FLxGridView-swift/lists"}