{"id":2444,"url":"https://github.com/CooperRS/RMPickerViewController","last_synced_at":"2025-08-02T23:33:41.871Z","repository":{"id":13560952,"uuid":"16253190","full_name":"CooperRS/RMPickerViewController","owner":"CooperRS","description":"This is an iOS control for selecting something using UIPickerView in an UIAlertController like manner","archived":false,"fork":false,"pushed_at":"2019-07-21T11:07:50.000Z","size":1231,"stargazers_count":381,"open_issues_count":3,"forks_count":51,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-12-06T10:35:04.070Z","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/CooperRS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-01-26T13:06:29.000Z","updated_at":"2023-12-24T04:20:44.000Z","dependencies_parsed_at":"2022-08-31T08:40:59.987Z","dependency_job_id":null,"html_url":"https://github.com/CooperRS/RMPickerViewController","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CooperRS%2FRMPickerViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CooperRS%2FRMPickerViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CooperRS%2FRMPickerViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CooperRS%2FRMPickerViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CooperRS","download_url":"https://codeload.github.com/CooperRS/RMPickerViewController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503223,"owners_count":17930543,"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-01-05T20:16:13.924Z","updated_at":"2024-12-06T17:31:07.247Z","avatar_url":"https://github.com/CooperRS.png","language":"Objective-C","funding_links":[],"categories":["UI"],"sub_categories":["Alert \u0026 Action Sheet","Other free courses"],"readme":"RMPickerViewController [![Build Status](https://travis-ci.org/CooperRS/RMPickerViewController.svg?branch=master)](https://travis-ci.org/CooperRS/RMPickerViewController/) [![Pod Version](https://img.shields.io/cocoapods/v/RMPickerViewController.svg)](https://cocoapods.org/pods/RMPickerViewController) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n=============================\n\nThis framework allows you to pick something with a picker presented as an action sheet. In addition, it allows you to add actions arround the presented picker which behave like a button and can be tapped by the user. The result looks very much like an `UIActionSheet` or `UIAlertController` with a `UIPickerView` and some `UIActions` attached.\n\nBesides being a fully-usable project, `RMPickerViewController` also is an example for an use case of [RMActionController](https://github.com/CooperRS/RMActionController). You can use it to learn how to present a picker other than `UIPickerView`.\n\n## Screenshots\n\n### Portrait\n\n| White | Black | Sheet White | Sheet Black |\n|:-----:|:-----:|:---:|:---:|\n| ![White Version](https://raw.githubusercontent.com/CooperRS/RMPickerViewController/gh-pages/images/Blur-Portrait.png) | ![Black version](https://raw.githubusercontent.com/CooperRS/RMPickerViewController/gh-pages/images/Blur-Portrait-Black.png) | ![Sheet](https://raw.githubusercontent.com/CooperRS/RMPickerViewController/gh-pages/images/Blur-Portrait-Sheet.png) | ![Black Sheet](https://raw.githubusercontent.com/CooperRS/RMPickerViewController/gh-pages/images/Blur-Portrait-Sheet-Black.png) |\n\n## Demo Project\nIf you want to run the demo project do not forget to initialize submodules.\n\n## Installation (CocoaPods)\n```ruby\nplatform :ios, '8.0'\npod \"RMPickerViewController\", \"~\u003e 2.3.1\"\n```\n\n## Usage\n\nFor a detailed description on how to use `RMPickerViewController` take a look at the [Wiki Pages](https://github.com/CooperRS/RMPickerViewController/wiki). The following four steps are a very short intro:\n\n* Import `RMPickerViewController`:\n\n```objc\n#import \u003cRMPickerViewController/RMPickerViewController.h\u003e\n```\n\n* Create select and cancel actions:\n\n```objc\nRMAction\u003cUIPickerView *\u003e *selectAction = [RMAction\u003cUIPickerView *\u003e actionWithTitle:@\"Select\" style:RMActionStyleDone andHandler:^(RMActionController\u003cUIPickerView *\u003e *controller) {\n    NSMutableArray *selectedRows = [NSMutableArray array];\n    \n    for(NSInteger i=0 ; i\u003c[controller.contentView numberOfComponents] ; i++) {\n        [selectedRows addObject:@([controller.contentView selectedRowInComponent:i])];\n    }\n    \n    NSLog(@\"Successfully selected rows: %@\", selectedRows);\n}];\n\nRMAction\u003cUIPickerView *\u003e *cancelAction = [RMAction\u003cUIPickerView *\u003e actionWithTitle:@\"Cancel\" style:RMActionStyleCancel andHandler:^(RMActionController\u003cUIPickerView *\u003e *controller) {\n    NSLog(@\"Row selection was canceled\");\n}];\n```\n\n* Create and instance of `RMPickerViewController` and present it:\n\n```objc\nRMPickerViewController *pickerController = [RMPickerViewController actionControllerWithStyle:style title:@\"Test\" message:@\"This is a test message.\\nPlease choose a row and press 'Select' or 'Cancel'.\" selectAction:selectAction andCancelAction:cancelAction];\npickerController.picker.dataSource = self;\npickerController.picker.delegate = self;\n\n[self presentViewController:pickerController animated:YES completion:nil];\n```\n\n* The following code block shows you a complete method:\n\n```objc\n- (IBAction)openPickerController:(id)sender {\n    RMAction\u003cUIPickerView *\u003e *selectAction = [RMAction\u003cUIPickerView *\u003e actionWithTitle:@\"Select\" style:RMActionStyleDone andHandler:^(RMActionController\u003cUIPickerView *\u003e *controller) {\n        NSMutableArray *selectedRows = [NSMutableArray array];\n    \n        for(NSInteger i=0 ; i\u003c[controller.contentView numberOfComponents] ; i++) {\n            [selectedRows addObject:@([controller.contentView selectedRowInComponent:i])];\n        }\n        \n        NSLog(@\"Successfully selected rows: %@\", selectedRows);\n    }];\n    \n    RMAction\u003cUIPickerView *\u003e *cancelAction = [RMAction\u003cUIPickerView *\u003e actionWithTitle:@\"Cancel\" style:RMActionStyleCancel andHandler:^(RMActionController\u003cUIPickerView *\u003e *controller) {\n        NSLog(@\"Row selection was canceled\");\n    }];\n    \n    RMPickerViewController *pickerController = [RMPickerViewController actionControllerWithStyle:style title:@\"Test\" message:@\"This is a test message.\\nPlease choose a row and press 'Select' or 'Cancel'.\" selectAction:selectAction andCancelAction:cancelAction];\n    pickerController.picker.dataSource = self;\n    pickerController.picker.delegate = self;\n    \n    [self presentViewController:pickerController animated:YES completion:nil];\n}\n```\n\n## Migration\n\nSee [Migration](https://github.com/CooperRS/RMPickerViewController/wiki/Migration) on how to migrate to the latest version of `RMPickerViewController`.\n\n## Documentation\nThere is an additional documentation available provided by the CocoaPods team. Take a look at [cocoadocs.org](http://cocoadocs.org/docsets/RMPickerViewController/).\n\n## Requirements\n\n| Compile Time  | Runtime       |\n| :------------ | :------------ |\n| Xcode 7       | iOS 8         |\n| iOS 9 SDK     |               |\n| ARC           |               |\n\nNote: ARC can be turned on and off on a per file basis.\n\nVersion 1.4.0 and above of `RMPickerViewController` use custom transitions for presenting the picker view controller. Custom transitions are a new feature introduced by Apple in iOS 7. Unfortunately, custom transitions are totally broken in landscape mode on iOS 7. This issue has been fixed with iOS 8. So if your application supports landscape mode (even on iPad), version 1.4.0 and above of this control require iOS 8. Otherwise, iOS 7 should be fine. In particular, iOS 7 is fine for version 1.3.3 and below.\n\n## Further Info\nIf you want to show an `UIDatePicker` instead of an `UIPickerView`, you may take a look at my other control called [RMDateSelectionViewController](https://github.com/CooperRS/RMDateSelectionViewController).\n\nIf you want to show any other control you may want to take a look at [RMActionController](https://github.com/CooperRS/RMActionController).\n\n## Credits\nCode contributions:\n* Denis Andrasec\n\t* Bugfixes\n* steveoleary\n\t* Bugfixes\n\nI want to thank everyone who has contributed code and/or time to this project!\n\n## License (MIT License)\n\n```\nCopyright (c) 2013-2017 Roland Moers\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCooperRS%2FRMPickerViewController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCooperRS%2FRMPickerViewController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCooperRS%2FRMPickerViewController/lists"}