Swift: 如何更改键盘背景和字体的颜色?

Swift: How can I change the color of keyboard background and lettering?

我正在 swift 为 iOS8 构建一个项目。 xcode 中键盘的默认和深色选项与我的应用程序设计的颜色主题不匹配。

有没有简单的方法可以改变键盘的颜色?

简而言之,您无法更改系统键盘的外观。即使你做了很多人甚至不使用默认键盘。

随着 iOS 8 苹果推出 custom keyboard 扩展。

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.

这里有一些关于如何创建自定义键盘的有用教程: