- August 28, 2025
- Mins Read
If the text is too long to fit with in the button bounds then the text will be truncated and ‘… More’ will be appended.
By default, if the text is truncated the button will be focusable. If the text is not truncated then the button will not be focusable.
However, 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.
When the button is focused, pressing select on the Apple TV remote will trigger a callback.
The majority of the UI properties are configurable; like
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate TvOSMoreButton into your Xcode project using CocoaPods, specify it in your Podfile:
source ‘https://github.com/CocoaPods/Specs.git’
platform :tvos, ‘9.0’
use_frameworks!
target ‘<Your Target Name>’ do
pod ‘TvOSMoreButton’, ‘~> 1.4.1’
end
Then, run the following command:
$ pod install
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate TvOSMoreButton into your Xcode project using Carthage, specify it in your Cartfile:
github “cgoldsby/TvOSMoreButton” ~> 1.4.1
Run carthage update
 to build the framework and drag the built TvOSMoreButton.framework into your Xcode project.
Please check out the Example workspace for more details.
import TvOSMoreButton
private func setUpUI() {
tvOSMoreButton.text = // Super long text
tvOSMoreButton.buttonWasPressed = {
[weak self] text in
self?.moreButtonWasPressed(text: text)
}
}
private func moreButtonWasPressed(text: String?) -> Void {
// Do something. May I suggest using TvOSTextViewerViewController
// to display the text in a full screen view!
let viewController = TvOSTextViewerViewController()
viewController.text = text
viewController.textColor = .white
viewController.textEdgeInsets = UIEdgeInsets(top: 100, left: 250, bottom: 100, right: 250)
present(viewController, animated: true)
}
If you would like to display a fullscreen view with just the text then definitely check out @dcordero‘s awesome TvOSTextViewer. So good!
This package provides you with an easy way to show tooltips over any SwiftUI view, since Apple does not provide ...
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or ...
Create Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and ...