Latest 1.2.0
Homepage https://github.com/dcordero/TvOSTextViewer
License MIT
Platforms tvos 9.0
Authors

Twitter: @dcordero
License MIT
Swift 4.2
Build Status

Light and scrollable view controller for tvOS to present blocks of text

TvOSTextViewer

Description

TvOSTextViewer is a view controller to present blocks of text on the same way native Apps do it on tvOS.

Customizable properties:

  • text: The block of text to be presented
  • textEdgeInsets: Margins for the text
  • backgroundBlurEffectStyle: .dark by default
  • textAttributes: Custom fonts/sizes, text colors, alignment, etc… via NSAttributedText

Requirements

  • tvOS 9.0+
  • Xcode 8.2

Installation

Cocoapods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate TvOSTextViewer 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 'TvOSTextViewer', '~> 1.2.0'
end

Then, run the following command:

$ pod install

Carthage

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 TvOSTextViewer into your Xcode project using Carthage, specify it in your Cartfile:

github "dcordero/TvOSTextViewer" ~> 1.2.0

Run carthage update to build the framework and drag the built TvOSTextViewer.framework into your Xcode project.

Usage

All you need is to create an instance of TvOSTextViewerViewController and present it on the screen:

let viewController = TvOSTextViewerViewController()
viewController.text = "Hello World"
present(viewController, animated: true, completion: nil)

If you would like to show this fullscreen view comming from an awesome button cropping the text on the same way Apple does, you can use it in combination with TvOSMoreButton by cgoldsby

Latest podspec

{
    "name": "TvOSTextViewer",
    "authors": {
        "David Cordero": "[email protected]"
    },
    "version": "1.2.0",
    "license": "MIT",
    "summary": "Light and scrollable view controller for tvOS to present blocks of text",
    "homepage": "https://github.com/dcordero/TvOSTextViewer",
    "source": {
        "git": "https://github.com/dcordero/TvOSTextViewer.git",
        "tag": "1.2.0"
    },
    "platforms": {
        "tvos": "9.0"
    },
    "source_files": "TvOSTextViewer/Sources/*.swift"
}

Pin It on Pinterest

Share This