Skip to content

Conversation

@paoloandrea
Copy link

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant