{"id":16597368,"url":"https://github.com/cbess/cbeditlistviewcontroller","last_synced_at":"2026-04-18T22:03:32.330Z","repository":{"id":141697438,"uuid":"37637118","full_name":"cbess/CBEditListViewController","owner":"cbess","description":"A simple, but potentially powerful UITableViewController that handles CRUD operations and iPhone popover presentation.","archived":false,"fork":false,"pushed_at":"2018-08-25T23:17:47.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T04:45:19.540Z","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":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbess.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-18T04:27:47.000Z","updated_at":"2018-08-25T23:31:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"d35aa66e-0f7e-4421-b226-0d0239829343","html_url":"https://github.com/cbess/CBEditListViewController","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2FCBEditListViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2FCBEditListViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2FCBEditListViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbess%2FCBEditListViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbess","download_url":"https://codeload.github.com/cbess/CBEditListViewController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242276886,"owners_count":20101528,"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-10-11T23:55:37.849Z","updated_at":"2026-04-18T22:03:27.291Z","avatar_url":"https://github.com/cbess.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CBEditListViewController\n\nA simple, but powerful (probably) UITableViewController that handles CRUD operations.\n\n## Notes\n\nThis sample provides a complete create/insert, list, update/change, and delete UITableViewController.\nThe actions for the CRUD operations can be customized.\n\n## Usage\n\nSwift example with [Realm](http://realm.io) *v0.94.0* database storage.\n\n```swift\nimport UIKit\nimport RealmSwift\n\nclass GroupsViewController: CBEditListViewController {\n    var groups: Results\u003cGroup\u003e!\n    let realm = Realm()\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        addListItemViewCell = UITableViewCell(style: .Default, reuseIdentifier: \"add\")\n        addListItemViewCell.textLabel?.text = NSLocalizedString(\"Add Group\", comment: \"\")\n        \n        navigationItem.rightBarButtonItem = editButtonItem()\n        reloadItems()\n    }\n    \n    override func cellIdentifierAtIndexPath(indexPath: NSIndexPath!) -\u003e String! {\n        return \"itemcell\"\n    }\n    \n    override func configureCell(cell: UITableViewCell!, indexPath: NSIndexPath!) {\n        let theCell = cell as! CBEditListViewCell\n        theCell.textField?.text = groups[indexPath.row].name\n    }\n    \n    // MARK: - Misc\n    \n    func reloadItems() {\n        groups = realm.objects(Group)\n        items = NSMutableArray(array: Array(groups.generate()))\n    }\n    \n    // MARK: - List Actions\n    \n    override func willRemoveListItem(item: AnyObject!) {\n        let group = item as! Group\n        \n        items.removeObject(group)\n        realm.write {\n            self.realm.delete(group)\n        }\n    }\n    \n    override func didInsertListItemWithName(name: String!) {\n        let group = Group()\n        group.name = name\n        \n        items.addObject(group)\n        realm.write {\n            self.realm.add(group, update: false)\n        }\n    }\n    \n    override func didChangeListItem(item: AnyObject!, toName name: String!) {\n        let group = item as! Group\n        \n        realm.write {\n            group.name = name\n        }\n    }\n    \n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbess%2Fcbeditlistviewcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbess%2Fcbeditlistviewcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbess%2Fcbeditlistviewcontroller/lists"}