{"id":783,"url":"https://github.com/cgoldsby/TvOSMoreButton","last_synced_at":"2025-07-30T19:32:14.615Z","repository":{"id":18485813,"uuid":"71502126","full_name":"cgoldsby/TvOSMoreButton","owner":"cgoldsby","description":"📺 tvOS '... More' Button","archived":false,"fork":false,"pushed_at":"2022-07-26T11:38:30.000Z","size":14103,"stargazers_count":59,"open_issues_count":0,"forks_count":14,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-11-29T14:56:45.022Z","etag":null,"topics":["button","swift","tvos","ui"],"latest_commit_sha":null,"homepage":"https://github.com/cgoldsby/TvOSMoreButton","language":"Swift","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/cgoldsby.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":"2016-10-20T20:33:55.000Z","updated_at":"2024-02-07T10:57:39.000Z","dependencies_parsed_at":"2022-08-07T09:00:46.346Z","dependency_job_id":null,"html_url":"https://github.com/cgoldsby/TvOSMoreButton","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/cgoldsby%2FTvOSMoreButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgoldsby%2FTvOSMoreButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgoldsby%2FTvOSMoreButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgoldsby%2FTvOSMoreButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgoldsby","download_url":"https://codeload.github.com/cgoldsby/TvOSMoreButton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228178887,"owners_count":17881105,"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":["button","swift","tvos","ui"],"created_at":"2024-01-05T20:15:31.226Z","updated_at":"2024-12-04T19:31:56.821Z","avatar_url":"https://github.com/cgoldsby.png","language":"Swift","funding_links":[],"categories":["Apple TV"],"sub_categories":["Other free courses","Getting Started"],"readme":"# TvOSMoreButton\n\u003e 📺 A tvOS button which truncates long text with '... More'.\n\nThe TvOSMoreButton is a simple view which aims to mirror the behavior of Apple's \"... More\" button; as seen in the Movie App.\n\n![](Artwork/example.png)\n\n## Features\n\nIf the text is too long to fit with in the button bounds then the text will be truncated and '... More' will be appended.\n\nBy default, if the text is truncated the button will be focusable. If the text is not truncated then the button will not be focusable.\n\nHowever, you can set `focusableMode` to `manual(_ isFocusable: Bool)` to alter the focus behavior. This mode will force the button to be always be focused or never be focused.\n\nWhen the button is focused, pressing select on the Apple TV remote will trigger a callback.\n\nThe majority of the UI properties are configurable; like\n- the button text\n- ellipse text; defaults to '...'\n- trailing text; defaults to \"More\"\n- trailing text color and font\n- the button text color and font\n- shadows and radius\n- and More 😉\n\n## Requirements\n\n- tvOS 9.0+\n- Xcode 9\n\n## Installation\n\n#### CocoaPods\n[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```\n$ gem install cocoapods\n```\n\nTo integrate TvOSMoreButton into your Xcode project using CocoaPods, specify it in your Podfile:\n\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :tvos, '9.0'\nuse_frameworks!\n\ntarget '\u003cYour Target Name\u003e' do\n    pod 'TvOSMoreButton', '~\u003e 1.4.1'\nend\n```\n\nThen, run the following command:\n\n```\n$ pod install\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with Homebrew using the following command:\n\n```\n$ brew update\n$ brew install carthage\n```\n\nTo integrate TvOSMoreButton into your Xcode project using Carthage, specify it in your Cartfile:\n\n```\ngithub \"cgoldsby/TvOSMoreButton\" ~\u003e 1.4.1\n```\n\nRun `carthage update` to build the framework and drag the built TvOSMoreButton.framework into your Xcode project.\n\n## Usage example\n\nPlease check out the Example workspace for more details.\n\n```swift\n    import TvOSMoreButton\n\n    private func setUpUI() {\n        tvOSMoreButton.text = // Super long text\n        tvOSMoreButton.buttonWasPressed = {\n            [weak self] text in\n            self?.moreButtonWasPressed(text: text)\n        }\n    }\n\n    private func moreButtonWasPressed(text: String?) -\u003e Void {\n        // Do something. May I suggest using TvOSTextViewerViewController\n        // to display the text in a full screen view!\n        let viewController = TvOSTextViewerViewController()\n        viewController.text = text\n        viewController.textColor = .white\n        viewController.textEdgeInsets = UIEdgeInsets(top: 100, left: 250, bottom: 100, right: 250)\n        present(viewController, animated: true)\n    }\n\n```\n\nIf you would like to display a fullscreen view with just the text then definitely check out [@dcordero](https://github.com/dcordero)'s awesome [TvOSTextViewer](https://github.com/dcordero/TvOSTextViewer). So good!\n\n## Contribute\n\nWe would love for you to contribute to **TvOSMoreButton**, check the ``LICENSE`` file for more info. Feel free to submit any issues or PRs. ❤️\n\n## Meta\n\nSpecial thanks [@mona-zsh](https://github.com/mona-zsh) for her fantastic article on [String Truncation](http://eskimona.com/coding/objective-c/2015/05/10/truncation.html).\n\nChris Goldsby – [@goldsbychris](https://twitter.com/goldsbychris)\n\nDistributed under the MIT license. See ``LICENSE`` for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgoldsby%2FTvOSMoreButton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgoldsby%2FTvOSMoreButton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgoldsby%2FTvOSMoreButton/lists"}