{"id":13466675,"url":"https://github.com/instacart/Nantes","last_synced_at":"2025-03-26T00:31:19.367Z","repository":{"id":45045152,"uuid":"164757106","full_name":"instacart/Nantes","owner":"instacart","description":"Swift TTTAttributedLabel replacement","archived":false,"fork":false,"pushed_at":"2024-01-08T07:43:25.000Z","size":653,"stargazers_count":1110,"open_issues_count":29,"forks_count":86,"subscribers_count":269,"default_branch":"master","last_synced_at":"2025-03-24T22:39:28.220Z","etag":null,"topics":["ios","swift","swift-framework","tttattributedlabel"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/instacart.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-01-09T00:42:10.000Z","updated_at":"2025-03-23T13:27:22.000Z","dependencies_parsed_at":"2024-01-29T18:06:43.017Z","dependency_job_id":null,"html_url":"https://github.com/instacart/Nantes","commit_stats":{"total_commits":72,"total_committers":13,"mean_commits":5.538461538461538,"dds":"0.33333333333333337","last_synced_commit":"eb99ab160da5c149e222f9a21fad83a30b5e8f35"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instacart%2FNantes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instacart%2FNantes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instacart%2FNantes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instacart%2FNantes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/instacart","download_url":"https://codeload.github.com/instacart/Nantes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245566097,"owners_count":20636390,"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":["ios","swift","swift-framework","tttattributedlabel"],"created_at":"2024-07-31T15:00:48.363Z","updated_at":"2025-03-26T00:31:19.345Z","avatar_url":"https://github.com/instacart.png","language":"Swift","funding_links":[],"categories":["Libs","UI [🔝](#readme)","Swift"],"sub_categories":["UI"],"readme":"Nantes 🥕\n========\n[![CI Status](https://img.shields.io/travis/instacart/Nantes.svg?style=flat)](https://travis-ci.org/instacart/Nantes)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Nantes.svg)](https://img.shields.io/cocoapods/v/Nantes.svg)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\nThis library is a Swift port/fork of the popular Objective-C library [TTTAttributedLabel](https://github.com/TTTAttributedLabel/TTTAttributedLabel). Much ❤️  and credit goes to [Mattt](https://github.com/mattt) for creating such a great UILabel replacement library.\n\n`Nantes` is a pure-Swift `UILabel` replacement. It supports attributes, data detectors, and more. It also supports link embedding automatically and with `NSTextCheckingTypes`.\n\nCome build awesome things with us here at [Instacart!](https://careers.instacart.com/)\n\n### Requirements ###\n- iOS 8.0+\n- Swift 4.2\n\n### Installation ###\n\nNantes is available through [Carthage](https://github.com/Carthage/Carthage). To install\nit, add the following line to your `Cartfile`:\n```\ngithub \"instacart/nantes\"\n```\n\n### CocoaPods\n\nNantes is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'Nantes'\n```\n\n### Communication\n\nIf you need help, feel free to open an issue. Please search before opening one, someone might have run into something similar.\n\n### Contributing\n\nOpening a pull request is the best way to get something fixed. If you need help, feel free to open an issue, hopefully someone can help you out with a problem you're running into.\n\n### Author\n\nchansen22, cthansen22@gmail.com\n\n### Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n### Getting Started ###\n\nCheck out `Nantes` in the `Example` directory for more examples.\n\n```swift\nimport Nantes\n\nlet label: NantesLabel = .init(frame: .zero)\nlabel.attributedTruncationToken = NSAttributedString(string: \"... more\")\nlabel.numberOfLines = 3\nlabel.labelTappedBlock = {\n  label.numberOfLines = label.numberOfLines == 0 ? 3 : 0 // Flip between limiting lines and not\n\n  UIView.animateWithDuration(0.2, animations: {\n    self.view.layoutIfNeeded()\n  })\n}\n\nlabel.text = \"Nantes label is great! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ac urna et ante lobortis varius. Nunc rhoncus enim vitae sem commodo sodales. Morbi id augue id augue finibus tincidunt. Cras ac massa nisi. Maecenas elementum vitae elit eu mattis. Duis pretium turpis ut justo accumsan molestie. Mauris elit elit, maximus eu risus sed, vestibulum sodales enim. Sed porttitor vestibulum tincidunt. Maecenas mollis tortor quam, sed porta justo rhoncus id. Phasellus vitae augue tempor, luctus metus sit amet, dictum urna. Morbi sit amet feugiat purus. Proin vitae finibus lectus, eu gravida erat.\"\nview.addSubview(label)\n\nlet linkLabel: NantesLabel = .init(frame: .zero)\nlinkLabel.delegate = self // NantesLabelDelegate\nlinkLabel.linkAttributes = [NSAttributedString.Key.foregroundColor: UIColor.green]\nlinkLabel.text = \"https://www.instacart.com\"\nview.addSubview(linkLabel)\n\n// Link handling\n\nfunc attributedLabel(_ label: NantesLabel, didSelectLink link: URL) {\n  print(\"Tapped link: \\(link)\")\n}\n\n\n```\n\n## License\n\n```\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstacart%2FNantes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finstacart%2FNantes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstacart%2FNantes/lists"}