xcode Swift:如何更改键盘背景和字体的颜色?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30222040/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Swift: How can I change the color of keyboard background and lettering?
提问by Kashif
I am building a project for iOS8 in swift. The default and dark options for keyboard in xcode do not go with the color theme for my app design.
我正在快速为 iOS8 构建一个项目。xcode 中键盘的默认和深色选项与我的应用程序设计的颜色主题不符。
Is there a simple way for to change the colors in the keybaord?
有没有一种简单的方法可以更改键盘中的颜色?
回答by Mika
The short answer is no you can't change the look and feel of the system keyboard. Even if you did many people don't even use the default keyboards.
简短的回答是不,您无法更改系统键盘的外观和感觉。即使你做了很多人甚至不使用默认键盘。
回答by ignotusverum
With iOS 8 apple introduced custom keyboardextension.
随着 iOS 8 苹果引入了自定义键盘扩展。
A custom keyboard replaces the system keyboard for users who want capabilities such as a novel text input method or the ability to enter text in a language not otherwise supported in iOS. The essential function of a custom keyboard is simple: Respond to taps, gestures, or other input events and provide text, in the form of an unattributed NSString object, at the text insertion point of the current text input object.
对于需要新颖文本输入法或以 iOS 不支持的语言输入文本等功能的用户,自定义键盘可替代系统键盘。自定义键盘的基本功能很简单:响应点击、手势或其他输入事件,并在当前文本输入对象的文本插入点以无属性 NSString 对象的形式提供文本。
And here's some useful tutorials about how to create custom keyboard :
这里有一些关于如何创建自定义键盘的有用教程: