{"id":13685174,"url":"https://github.com/SebastianThiebaud/STTweetLabel","last_synced_at":"2025-05-01T01:30:56.057Z","repository":{"id":5965926,"uuid":"7187411","full_name":"SebastianThiebaud/STTweetLabel","owner":"SebastianThiebaud","description":"Deprecated - A UILabel with #hashtag @handle and links tappable","archived":true,"fork":false,"pushed_at":"2016-05-09T13:13:04.000Z","size":2542,"stargazers_count":654,"open_issues_count":14,"forks_count":137,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-04-24T23:54:01.128Z","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/SebastianThiebaud.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":"2012-12-16T04:47:35.000Z","updated_at":"2024-10-22T13:42:12.000Z","dependencies_parsed_at":"2022-08-30T04:52:58.159Z","dependency_job_id":null,"html_url":"https://github.com/SebastianThiebaud/STTweetLabel","commit_stats":null,"previous_names":["sebastienthiebaud/sttweetlabel"],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianThiebaud%2FSTTweetLabel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianThiebaud%2FSTTweetLabel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianThiebaud%2FSTTweetLabel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianThiebaud%2FSTTweetLabel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SebastianThiebaud","download_url":"https://codeload.github.com/SebastianThiebaud/STTweetLabel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251808386,"owners_count":21647283,"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-08-02T14:00:45.364Z","updated_at":"2025-05-01T01:30:55.712Z","avatar_url":"https://github.com/SebastianThiebaud.png","language":"Objective-C","funding_links":[],"categories":["Objective-C","etc"],"sub_categories":[],"readme":"[![Platform](https://img.shields.io/cocoapods/p/STTweetLabel.svg?style=flat)](http://cocoadocs.org/docsets/STTweetLabel)\n[![Version](https://img.shields.io/cocoapods/v/STTweetLabel.svg?style=flat)](http://cocoadocs.org/docsets/STTweetLabel)\n[![CI](http://img.shields.io/travis/SebastienThiebaud/STTweetLabel.svg?style=flat)](https://travis-ci.org/SebastienThiebaud/STTweetLabel)\n[![License](https://img.shields.io/cocoapods/l/STTweetLabel.svg?style=flat)](http://cocoadocs.org/docsets/STTweetLabel)\n\n# STTweetLabel (not supported anymore)\n\nA custom UILabel for iOS with certain words tappable like Twitter (#Hashtag, @Handle and links).\n\n![STTweetLabel screenshot](https://raw.github.com/SebastienThiebaud/STTweetLabel/master/screenshot.png \"STTweetLabel Screenshot\")\n\n## Installation\n\nPlease use CocoaPods and include STTweetLabel in your Podfile.\n\nImportant: STTweetLabel 3.0 is based on TextKit and is only compatible with iOS 7 and above.\n\n## Demo\n\nBuild and run the project STTweetLabelExample in Xcode to see `STTweetLabel` in action. \n\n## Example Usage\n\n``` objective-c\nSTTweetLabel *tweetLabel = [[STTweetLabel alloc] initWithFrame:CGRectMake(10.0, 60.0, 300.0, 160.0)];\n[tweetLabel setText:@\"Hi. This is a new tool for @you! Developed by @SebThiebaud for #iPhone #ObjC... and #iOS7 ;-) My GitHub page: https://t.co/pQXDoiYA\"];\n[self.view addSubview:tweetLabel];\n```\n\nDon't forget to implement the `detectionBlock`. Without implementing this block, you won't be able to detect if somebody has clicked on the hashtag, handle or even a link.\nBlocks are easy. All you need to do is add a few lines of code:\n\n``` objective-c\n[tweetLabel setDetectionBlock:^(STTweetHotWord hotWord, NSString *string, NSString *protocol, NSRange range) {\n    // Do something\n}];\n```\n    \n## Properties\n\n- `NSString *text`: The text to display.\n- `NSArray *validProtocols`: All valid protocols for link (by default: `@[@\"http\", @\"https\"]`).\n- `BOOL leftToRight`: Writing direction (by default: `YES`).\n- `BOOL textSelectable`: Allows the user to select the text (by default: `YES`).\n- `UIColor *selectionColor`: If `BOOL textSelectable` is enabled, it's the color of the selection's background (by default: `[UIColor colorWithWhite:0.9 alpha:1.0]`).\n- `NSTextAlignment textAlignment`: Text alignment (by default: `NSTextAlignmentLeft`).\n\n## Methods\n\n**The two following methods refresh the component. That means you should only set the attributes at the initialization of your STTweetLabel instance.**\n\n- `-[STTweetLabel setAttributes:(NSDictionary *)attributes]`: Dictionary with attributes for all text.\n- `-[STTweetLabel setAttributes:(NSDictionary *)attributes hotWord:(STTweetHotWord)hotWord]`: Dictionary with attributes for specific STTweetHotWord.\n- `-[STTweetLabel suggestedFrameSizeToFitEntireStringConstraintedToWidth:(CGFloat)width`: Returns the CGSize calculated for the text submitted.\n\n## Credits\n\nInspired by the original Twitter application.\n\n## Contact\n\nSebastien Thiebaud\n\n- http://github.com/SebastienThiebaud\n- http://twitter.com/SebThiebaud\n\n## License\n\nSTTweetLabel is available under the MIT license.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSebastianThiebaud%2FSTTweetLabel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSebastianThiebaud%2FSTTweetLabel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSebastianThiebaud%2FSTTweetLabel/lists"}