TvOSTextViewer
TvOSTextViewer copied to clipboard
Create attributes text
Hi, I created the "attributes" variable to allow users to insert other elements in the text field that opens full screen.
For example, if I assign attributes to the simple text field, I can add a title of a different font and color compared to the description. Just like in other tvOS apps.
import SwiftyAttributes ... let title = title! .withAttributes ([ .font (.title1), .textColor (.white) ])
let overview = text! .withAttributes ([ .font (.body), .textColor (.white) ]) viewController.attributes = title + breakline + overview