{"id":2920,"url":"https://github.com/paulrolfe/PARTagPicker","last_synced_at":"2025-08-03T12:31:42.675Z","repository":{"id":35688612,"uuid":"39965302","full_name":"paulrolfe/PARTagPicker","owner":"paulrolfe","description":"This pod provides a view controller for choosing and creating tags in the style of wordpress or tumblr.","archived":false,"fork":false,"pushed_at":"2019-06-28T14:24:20.000Z","size":75,"stargazers_count":370,"open_issues_count":9,"forks_count":48,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-11-30T23:03:10.926Z","etag":null,"topics":[],"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/paulrolfe.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-07-30T18:11:14.000Z","updated_at":"2024-11-19T00:55:43.000Z","dependencies_parsed_at":"2022-09-23T01:11:24.581Z","dependency_job_id":null,"html_url":"https://github.com/paulrolfe/PARTagPicker","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulrolfe%2FPARTagPicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulrolfe%2FPARTagPicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulrolfe%2FPARTagPicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulrolfe%2FPARTagPicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulrolfe","download_url":"https://codeload.github.com/paulrolfe/PARTagPicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228543193,"owners_count":17934444,"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:26.337Z","updated_at":"2024-12-07T00:31:06.219Z","avatar_url":"https://github.com/paulrolfe.png","language":"Objective-C","funding_links":[],"categories":["UI","Tags"],"sub_categories":["Tag","Layout","Other free courses"],"readme":"# PARTagPicker\n\nThis pod provides a view controller for choosing and creating tags in the style of wordpress or tumblr. This tag picker was originally used in the [Intrepid Pursuits](http://intrepid.io) app, Slate.\n\n## DEMO\n\nAs used in Slate:\n\n![DEMO IN SLATE](https://s3.amazonaws.com/Paul.Image.Bucket/PRTagPicker/tag_record1.gif)\n![DEMO IN SLATE](https://s3.amazonaws.com/Paul.Image.Bucket/PRTagPicker/tag_record4.gif)\n\nFrom example project:\n\n![DEMO IN EXAMPLE](https://s3.amazonaws.com/Paul.Image.Bucket/PRTagPicker/tag_record2.gif)\n![DEMO IN EXAMPLE](https://s3.amazonaws.com/Paul.Image.Bucket/PRTagPicker/tag_record3.gif)\n\n## Installation\n\nPARTagPicker is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'PARTagPicker'\n```\n\n## Usage\n\nTo run the example project, clone the repo, and run `pod install` from the PRTagPicker directory first.\n\nInclude `#import \u003cPARTagPicker/PARTagPickerViewController.h\u003e`.\n\nThe basic setup is to create an instance of `PARTagPickerViewController`, add it's view, and then add the controller as a child view controller.\n\nThe tags are passed in as `NSString` objects in an array. Anytime you change the `allTags` array, any existing `chosenTags` are updated to use references to the new strings if they contain a match in the updated array. Otherwise they continue to point to the old strings.\n\n### Swift\n```swift\noverride func viewDidLoad() {\n    super.viewDidLoad()\n    // Add the controller and view.\n    let tagController = PARTagPickerViewController()\n    addChildViewController(tagController)\n    tagController.view.frame = CGRect(x: 0, y: 64, width: view.bounds.width, height: COLLECTION_VIEW_HEIGHT)\n    view.addSubview(tagController.view)\n    tagController.didMove(toParentViewController: self)\n\n    // Customize appearance and data.\n    tagController.delegate = self\n    tagController.allTags = [\"one fish\",\"two fish\",\" red fish\", \"blue fish\"]\n    tagController.chosenTags = [\"with a fox\", \"in a box\", \"anywhere\"]\n    tagController.allowsNewTags = true\n    tagController.view.backgroundColor = .orange\n    let colors = PARTagColorReference()\n    colors.highlightedTagTextColor = .white\n    colors.highlightedTagBackgroundColor = .blue\n    tagController.tagColorRef = colors\n}\n\nfunc tagPicker(_ tagPicker: PARTagPickerViewController!, visibilityChangedTo state: PARTagPickerVisibilityState) {\n    var newHeight: CGFloat = 0\n    if state == .topAndBottom {\n        newHeight = 2 * COLLECTION_VIEW_HEIGHT\n    } else if state == .topOnly {\n        newHeight = COLLECTION_VIEW_HEIGHT\n    }\n\n    var frame = tagPicker.view.frame\n    frame.size.height = newHeight\n\n    UIView.animate(withDuration: 0.3) {\n        tagPicker.view.frame = frame\n    }\n}\n```\n\n### Obj-C\nSee example with `pod try PARTagPicker` or check the example view controller here: https://github.com/paulrolfe/PARTagPicker/blob/master/PARTagPicker/ViewController.m\n\n## Options\n* You can customize colors using a PARTagColorReference object.\n* You can allow new tags with `allowsNewTags` boolean property on the controller.\n* You can set the `chosenTags` directly.\n* Delegate methods for when the chosenTags change and the tag picker changes size.\n* `- (void)tagPicker:(PARTagPickerViewController *)tagPicker visibilityChangedToState:(PARTagPickerVisibilityState)state `\n* `- (void)chosenTagsWereUpdatedInTagPicker:(PARTagPickerViewController *)tagPicker`\n* `tapToEraseTags` Defaults to YES. If set to NO, tapping a cell will just select it (not delete it).\n* `placeholderText` - The default text to have as placeholder text in each tag cell. Default value is @\"Add a tag\".\n\n## Notes\n\nThis is still a work in progress. If you have suggestions or run into issues, please create an issue on git or tweet me [@ThePaulRolfe](http://twitter.com/thepaulrolfe).\n\n## Updates\n* v1.4.0 - Swift example, expose cleaner PARTagColorReference init.\n* v1.1.0 - Added properties for `placeholderText` and `tapToEraseTags`.\n* v1.0.4 - Enabled for use in swift pods.\n* v1.0.2 - Including `.xib`s in the pod now. Oops!\n* v1.0.0 - Added documentation and fixed bug with deselecting chosenTags. Added ability to use custom fonts in the tag cells.\n* v0.0.5 - Added expected functionality of chosenTags being removed when pressed.\n\n\n## Author\n\nPaul Rolfe, paul.a.rolfe@gmail.com, [@ThePaulRolfe](http://twitter.com/thepaulrolfe)\n\n## License\n\nPARTagPicker 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%2Fpaulrolfe%2FPARTagPicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulrolfe%2FPARTagPicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulrolfe%2FPARTagPicker/lists"}