Text and Search
If necessary, your app can request text-based information in order to perform searches, log into services, and more. Just be mindful that, unless a physical keyboard is connected, text entry can be a tedious task on Apple TV.
A text field is a fixed-height, single-line field with rounded corners that automatically brings up a keyboard screen when the user clicks in it. Use a text field to request a small amount of information, such as an email address.
Minimize text entry in your app. Entering long passages of text or filling out numerous text fields is time-consuming on an Apple TV. Minimize text input and consider gathering information more efficiently, such as with buttons.
Show a hint in the text field to help communicate purpose. A text field can contain placeholder text—such as "Email" or "Password"—when there’s no other text in the field. Don’t use a separate label to describe a text field when placeholder text is sufficient. When dictation is enabled, a text field on a modal keyboard screen contains a dictation prompt and the field’s placeholder text appears at the top of the screen instead.
Show the email address keyboard when appropriate. If your app asks for an email address, always display the email address keyboard to ease entry and provide access to recently entered addresses. See UIKeyboardTypeEmailAddress in UITextInputTraits.
Use secure text fields when appropriate. Always use a secure text field when your app asks for sensitive data, such as a password.
For developer guidance, see UITextField.
A linear keyboard screen appears automatically whenever the user clicks a text field with the Siri Remote. This screen is optimized for the touch experience, letting people enter text with quick, fluid motions.
NOTE A grid keyboard screen appears with devices other than the Siri Remote, and the layout of content automatically adapts to it.
Specify an appropriate keyboard type for the kind of content being collected. Apple TV provides several different keyboard types, each designed to facilitate a specific kind of input. Certain ones make it easier to enter a name, email address, or number. For a list of available keyboard types, see UIKeyboardType in UITextInputTraits. To learn about managing the keyboard in your app, see Managing the Keyboard in Text Programming Guide for iOS.
Use the optional accessory view when appropriate. Keyboard screens include an optional accessory view. Use this area to provide context and additional information about the data you’re collecting. For example, you might add your app logo and a label such as "Please enter your email address to log in to your MyApp account." For developer guidance, see Custom Views for Data Input in Text Programming Guide for iOS.
A search screen is a specialized keyboard screen for inputting search text. On this screen, search results appear beneath the keyboard in a fully customizable view.
Allow for recent searches. People frequently repeat searches on Apple TV. Minimize text reentry by listing popular or recent searches in the results area under the keyboard before the user starts typing.
Simplify and limit search results. Don’t provide a lengthy list of search results that requires lots of scrolling. Make the information easy to navigate by, for example, splitting it into columns, or by presenting a smaller subset of results that most closely match the search performed.
Consider letting people filter search results. If appropriate, implement a scope bar in the search results content area to help people quickly and easily filter search results.
For developer guidance, see UISearchController.