{"id":25646222,"url":"https://github.com/azizuysal/aupickercell","last_synced_at":"2025-04-15T13:40:42.131Z","repository":{"id":56901219,"uuid":"92979581","full_name":"azizuysal/AUPickerCell","owner":"azizuysal","description":"Embedded picker view for table cells.","archived":false,"fork":false,"pushed_at":"2019-04-23T21:21:50.000Z","size":3957,"stargazers_count":19,"open_issues_count":4,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T18:45:47.016Z","etag":null,"topics":["ios","swift","uidatepicker","uipickerview","uitableview","uitableviewcell"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/azizuysal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-31T19:07:53.000Z","updated_at":"2022-11-17T14:15:56.000Z","dependencies_parsed_at":"2022-08-20T18:50:34.203Z","dependency_job_id":null,"html_url":"https://github.com/azizuysal/AUPickerCell","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azizuysal%2FAUPickerCell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azizuysal%2FAUPickerCell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azizuysal%2FAUPickerCell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azizuysal%2FAUPickerCell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azizuysal","download_url":"https://codeload.github.com/azizuysal/AUPickerCell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249081517,"owners_count":21209712,"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":["ios","swift","uidatepicker","uipickerview","uitableview","uitableviewcell"],"created_at":"2025-02-23T10:19:19.034Z","updated_at":"2025-04-15T13:40:42.114Z","avatar_url":"https://github.com/azizuysal.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Language](https://img.shields.io/badge/Swift-5.0-orange.svg)](http://swift.org)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-brightgreen.svg)](https://cocoapods.org)\n[![Build Status](https://travis-ci.org/azizuysal/AUPickerCell.svg?branch=master)](https://travis-ci.org/azizuysal/AUPickerCell)\n\n# AUPickerCell\n\nEmbedded picker view for table cells.\n\n\u003cimg src=\"./AUPickerCell.gif\" height=\"412\" alt=\"AUPickerCell animated GIF\"\u003e\n\n## Requirements\n\nAUPickerCell requires Swift 5.0 and Xcode 10.2.\n\n## Installation\n\n### CocoaPods\n\nYou can use [CocoaPods](https://cocoapods.org) to integrate AUPickerCell with your project.\n\nSimply add the following line to your `Podfile`:\n\n```ruby\npod \"AUPickerCell\"\n```\n\nAnd run `pod update` in your project directory.\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\nbrew update\nbrew install carthage\n```\n\nTo integrate AUPickerCell into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```yaml\ngithub \"azizuysal/AUPickerCell\"\n```\n\nRun `carthage update` to build the framework and drag the built `AUPickerCell.framework` into your Xcode project.\n\n### Manually\n\nYou can integrate AUPickerCell manually into your project simply by dragging `AUPickerCell.framework` onto Linked Frameworks and Libraries section in Xcode, or by copying `AUPickerCell.swift` source file in to your project.\n\n## Usage\n\nYou can use AUPickerCell in your UITableView like any other UITableViewCell subclass:\n\n```swift\noverride func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -\u003e UITableViewCell {\n  let cell = AUPickerCell(type: .default, reuseIdentifier: \"TableCell\")\n  cell.values = [\"One\", \"Two\", \"Three\"]\n  cell.selectedRow = 1\n  cell.leftLabel.text = \"Options\"\n  return cell\n}\n```\n\nAfterwards, implement the following boilerplate in your `UITableViewDelegate` to support automatic cell expansion to display the picker:\n\n```swift\noverride func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -\u003e CGFloat {\n  if let cell = tableView.cellForRow(at: indexPath) as? AUPickerCell {\n    return cell.height\n  }\n  return super.tableView(tableView, heightForRowAt: indexPath)\n}\n\noverride func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {\n  tableView.deselectRow(at: indexPath, animated: true)\n  if let cell = tableView.cellForRow(at: indexPath) as? AUPickerCell {\n    cell.selectedInTableView(tableView)\n  }\n}\n```\n\nThe above example produces a cell with an embedded `UIPickerView` but you can just as easily create a cell with an embedded `UIDatePicker` by setting the picker `type` to `.date`, as below:\n\n```swift\nlet cell = AUPickerCell(type: .date, reuseIdentifier: \"PickerDateCell\")\n```\n\nUpon user interaction, cell will auto update the right label text to reflect user's choice. You can also implement a delegate method to be notified of user's selection:\n\n```swift\nclass MyViewController: UITableViewController, AUPickerCellDelegate {\n  override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -\u003e UITableViewCell {\n    let cell = AUPickerCell(type: .default, reuseIdentifier: \"PickerDefaultCell\")\n    cell.delegate = self\n    ...\n  }\n}\n\nfunc auPickerCell(_ cell: AUPickerCell, didPick row: Int, value: Any) {\n  self.pickedValue = value as! String\n  ...\n}\n```\n\nor, in the case of a date picker:\n\n```swift\nfunc auPickerCell(_ cell: AUPickerCell, didPick row: Int, value: Any) {\n  self.pickedDate = value as! Date\n  ...\n}\n```\n\n## License\n\nThe MIT License (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazizuysal%2Faupickercell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazizuysal%2Faupickercell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazizuysal%2Faupickercell/lists"}