{"id":15050796,"url":"https://github.com/aozhimin/aamultiselectcontroller","last_synced_at":"2025-04-10T02:20:40.770Z","repository":{"id":56899791,"uuid":"69006842","full_name":"aozhimin/AAMultiSelectController","owner":"aozhimin","description":"provide a elegant popup view to display a multiple select dialog","archived":false,"fork":false,"pushed_at":"2017-02-20T14:02:30.000Z","size":3800,"stargazers_count":12,"open_issues_count":2,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-15T10:06:22.335Z","etag":null,"topics":["multiselect","objective-c","popup-dialog","ui-components"],"latest_commit_sha":null,"homepage":null,"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/aozhimin.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":"2016-09-23T08:46:24.000Z","updated_at":"2020-11-27T15:09:59.000Z","dependencies_parsed_at":"2022-08-21T02:20:39.038Z","dependency_job_id":null,"html_url":"https://github.com/aozhimin/AAMultiSelectController","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/aozhimin%2FAAMultiSelectController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aozhimin%2FAAMultiSelectController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aozhimin%2FAAMultiSelectController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aozhimin%2FAAMultiSelectController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aozhimin","download_url":"https://codeload.github.com/aozhimin/AAMultiSelectController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143060,"owners_count":21054697,"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":["multiselect","objective-c","popup-dialog","ui-components"],"created_at":"2024-09-24T21:29:22.580Z","updated_at":"2025-04-10T02:20:40.750Z","avatar_url":"https://github.com/aozhimin.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AAMultiSelectController\n\n![logo](images/logo.png)\n\n[![CI Status](http://img.shields.io/travis/dev-aozhimin/AAMultiSelectController.svg?style=flat)](https://travis-ci.org/dev-aozhimin/AAMultiSelectController)\n[![Version](https://img.shields.io/cocoapods/v/AAMultiSelectController.svg?style=flat)](http://cocoapods.org/pods/AAMultiSelectController)\n[![License](https://img.shields.io/cocoapods/l/AAMultiSelectController.svg?style=flat)](http://cocoapods.org/pods/AAMultiSelectController)\n[![Platform](https://img.shields.io/cocoapods/p/AAMultiSelectController.svg?style=flat)](http://cocoapods.org/pods/AAMultiSelectController)\n\n# Overview\nAAMultiSelectController provides a popup dialog which user can multi-select.it's easy to use and integrate in your project.\n\n## Sample project\nWe provided two sample projects, one is written in Objective-C, the other is written in Swift. After you clone the repo, to run the Objective-C one, select the scheme called `AAMultiSelectController-Objc` in XCode. Similarly, to run the Swift one, select the scheme called `AAMultiSelectController-Swift` in XCode\n\n![Demo](images/demo.gif)\n\n## Requirements\nAAMultiSelectController works on iOS 8.0+ and requires ARC to build.\n\n\n## Installation\n\nAAMultiSelectController is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"AAMultiSelectController\"\n```\n\nand edit pod file, install `AAMultiSelectController` into your project just excute command as follow:\n\n```ruby\npod install\n```\n\n## Using in a Swift Project\n\nInstall `AAMultiSelectController` using CocoaPods. If it's built as a dynamic framework, then add `@import AAMultiSelectController ` into the bridging header for your Swift project. \nOtherwise, `#import \u003cAAMultiSelectController/AAMultiSelectController.h\u003e` \n\n## Usage\n(see the usage which I put in the sample project)\n\n### Objective-C\n\n```objective-c\n@property (nonatomic, strong) AAMultiSelectViewController *multiSelectVC;\n\n\nself.multiSelectVC = [[AAMultiSelectViewController alloc] init];    \nself.multiSelectVC.titleText = @\"选择语言\";\nself.multiSelectVC.view.frame = CGRectMake(0, 0,\n                                               CGRectGetWidth(self.view.frame) * multiSelectViewWidthRatio,\n                                               multiSelectViewHeight);\nself.multiSelectVC.itemTitleColor = [UIColor redColor];\nself.multiSelectVC.dataArray = [self.dataArray copy];\n[self.multiSelectVC setConfirmBlock:^(NSArray *selectedObjects) {\n        NSMutableString *message = [NSMutableString stringWithString:@\"您选中了:\"];\n        [selectedObjects enumerateObjectsUsingBlock:^(AAMultiSelectModel * _Nonnull object, NSUInteger idx, BOOL * _Nonnull stop) {\n            [message appendFormat:@\"%@,\", object.title];\n        }];\n        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil\n                                                            message:[message copy]\n                                                           delegate:nil\n                                                  cancelButtonTitle:nil\n                                                  otherButtonTitles:@\"确定\", nil];\n        [alertView show];\n    }];\nself.multiSelectVC.popupShowType = indexPath.row;\nself.multiSelectVC.popupDismissType = indexPath.row;\n[self.multiSelectVC show];\n```\n\n### Swift\n\n```swift\n    private lazy var multiSelectVC: AAMultiSelectViewController = {\n        var vc = AAMultiSelectViewController.init()\n        vc.titleText = \"Please select a language\"\n        vc.view.frame = CGRectMake(0, 0,\n                                   CGRectGetWidth(self.view.frame) * kMultiSelectViewWidthRatio,\n                                   kMultiSelectViewHeight)\n        vc.itemTitleColor = UIColor.redColor()\n        vc.dataArray = self.dataArray\n        vc.confirmBlock = { selectedObjects in\n            var message = \"You chose:\"\n            for obj in selectedObjects as! [AAMultiSelectModel] {\n                message += \"\\(obj.title),\"\n            }\n            let alertView: UIAlertView = UIAlertView.init(title: \"\", message: message, delegate: nil, cancelButtonTitle: \"cancel\", otherButtonTitles: \"confirm\")\n            alertView.show()\n        }\n        return vc\n    }()\n    \n    public func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {\n        tableView.deselectRowAtIndexPath(indexPath, animated: true)\n        self.multiSelectVC.popupShowType = AAPopupViewShowType(rawValue: indexPath.row)!\n        self.multiSelectVC.popupDismissType = AAPopupViewDismissType(rawValue: indexPath.row)!\n        self.multiSelectVC.show()\n    }\n\n```\n\n\n## Author\n|Author|Gmail|Twitter|\n|:---:|:----:|:----:|\n|Alex Ao|aozhimin0811@gmail.com|[@Alex Ao](https://twitter.com/aozhimin0811)|\n\n## License\n\nAAMultiSelectController is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faozhimin%2Faamultiselectcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faozhimin%2Faamultiselectcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faozhimin%2Faamultiselectcontroller/lists"}