{"id":2022,"url":"https://github.com/szweier/SZMentions","last_synced_at":"2025-08-02T05:33:30.788Z","repository":{"id":62454824,"uuid":"48344677","full_name":"szweier/SZMentions","owner":"szweier","description":"Library to help handle mentions","archived":false,"fork":false,"pushed_at":"2016-12-01T03:21:45.000Z","size":144,"stargazers_count":11,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-30T19:38:11.655Z","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/szweier.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":"2015-12-21T01:44:36.000Z","updated_at":"2021-12-24T10:36:13.000Z","dependencies_parsed_at":"2022-11-01T22:46:34.390Z","dependency_job_id":null,"html_url":"https://github.com/szweier/SZMentions","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/szweier/SZMentions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szweier%2FSZMentions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szweier%2FSZMentions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szweier%2FSZMentions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szweier%2FSZMentions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szweier","download_url":"https://codeload.github.com/szweier/SZMentions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szweier%2FSZMentions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268339405,"owners_count":24234544,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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:01.461Z","updated_at":"2025-08-02T05:33:30.506Z","avatar_url":"https://github.com/szweier.png","language":"Objective-C","funding_links":[],"categories":["UI","Text"],"sub_categories":["Layout","Other free courses","Other Testing","Keychain"],"readme":"# SZMentions is no longer being updated, please use [SZMentionsSwift](https://github.com/szweier/SZMentionsSwift)\n\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/SZMentions.svg)](https://img.shields.io/cocoapods/v/SZMentions.svg)\n[![Platform](https://img.shields.io/cocoapods/p/SZMentions.svg?style=flat)](http://cocoadocs.org/docsets/SZMentions)\n[![Twitter](https://img.shields.io/badge/twitter-@StevenZweier-blue.svg?style=flat)](http://twitter.com/StevenZweier)\n\nSZMentions is a lightweight mentions library for iOS. This library was built to assist with the adding, removing and editing of a mention within a textview.\n\n## How To Get Started\n\n- [Download SZMentions](https://github.com/szweier/SZMentions/archive/master.zip) and try out the iOS example app. \n\n## Communication\n\n- If you **need help**, feel free to tweet @StevenZweier\n- If you **found a bug**, **have a feature request**, or **have a general question** open an issue.\n- If you **want to contribute**, submit a pull request.\n\n## Installation with CocoaPods\n\n[CocoaPods](http://cocoapods.org) \n\n#### Podfile\n\nTo integrate SZMentions into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '8.0'\n\npod 'SZMentions'\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n## Requirements\n\n| SZMentions Version | Minimum iOS Target |\n|:--------------------:|:---------------------------:||\n| 0.0.x | iOS 8.1 |\n\n## Usage\n\nBelow is a quick run through of the objects used in this library but as always the best place to get an understanding of the current implementation of the SZMentions library is in the example code.\n\n#### SZMentionsListener\n\nThis class manages the mention interaction.\n\n##### Setup\nUse one of the many initializers to setup your mentions listener.  Parameters explained below:\n\n`textView` : **required** The text view we are applying the mentions listener to. Note: it's delegate **must** be the mentions manager.\n\n`mentionsManager` : **required** The class that will be handling the mention interaction.\n\n`delegate` : **optional** If you would like to receive UITextView delegate methods set this and it will be passed through after processing view the mentions listener.\n\n`defaultTextAttributes` : Attributes (see: `SZAttribute`) to apply to the textview for all text that is not a mention.\n\n`mentionTextAttributes` : Attributes (see: `SZAttribute`) to apply to the textview for all mentions\n\n`spaceAfterMention` : **optional** Whether or not you would like a space to be added to the end of your mentions. Default is `NO`\n\n`trigger` : The string used to start a mention. Default is `@`\n\n`cooldownInterval` : **optional** The amount of time to wait between calling showMentionsList. Default is `0.5`\n\n##### Properties\n\n`mentions` : **readonly** Array of all mentions currently applied to the text view.\n\n##### Methods\n\n`- (void)addMention:(NSObject\u003cSZCreateMentionProtocol\u003e *)mention;` : Call this method while adding a mention to apply the mention to the current text.\n\n#### SZCreateMentionProtocol\n\nThis required properties for a mention being sent to the mentions listener\n\n#### SZMentionsManagerProtocol\n\nThe require methods for handling mention interaction.\n\n`- (void)showMentionsListWithString:(NSString *)mentionString;` lets the delegate know to show a mentions list as well as provides the current string typed into the textview, allowing for filtering of the mentions list.\n\n`- (void)hideMentionsList;` lets the delegate know we are no longer typing in a mention. \n\n#### SZMention\n\nThis class is returned via the `mentions` method, it includes the `range` of the mention as well as `object` containing the object sent to the mentions listener via the `addMention:(id)mention` method.\n\n#### SZAttribute\n\nThis class is used to pass attributes to apply mentions text as well as regular text.\n\nExample:\n    \n    SZAttribute *attribute = [[SZAttribute alloc] initWithAttributeName:NSForegroundColorAttributeName\n    attributeValue:[UIColor redColor]];\n    \n\n## Unit Tests\n\nSZMentions includes unit tests which can be run on the SZMentions framework\n\n## Credits\n\nSZMentions was originally created by [Steven Zweier](http://twitter.com/StevenZweier)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszweier%2FSZMentions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszweier%2FSZMentions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszweier%2FSZMentions/lists"}