问题描述
我使用 UISearchController
在一个屏幕中使用键盘、文本字段和结果进行内联搜索.tvOS
是否允许自定义键盘?我想使用深色设计,但我不知道如何自定义键盘.例如 YouTube 应用就是这样做的.他们有黑屏和白色键盘
I use UISearchController
to search inline with keyboard, textfield and results in one screen. Does tvOS
allow to customize keyboard? I want to use dark design, but I don't know how to customize the keyboard.For example YouTube app did that. They have black screen with white keyboard
推荐答案
UISearchController
有一个 UISearchBar
,它符合 UITextInputTraits
.这意味着它有一个 keyboardAppearance
,您可以将其设置为 UIKeyboardAppearanceDark
以获得深色键盘外观.这与 YouTube 应用中发生的情况不同,但它可能是您所能获得的最接近的结果.
A UISearchController
has a UISearchBar
, which conforms to UITextInputTraits
. This means it has a keyboardAppearance
which you can set to UIKeyboardAppearanceDark
to get a dark keyboard appearance. This isn't identical to what happens in the YouTube app, but it's probably the closest you can get.
这篇关于在 tvOS 中自定义键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!