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

时间:2022-11-20 21:33:39

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.

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

Is there a simple way for to change the colors in the keybaord?

有没有一种简单的方法来改变键盘中的颜色?

2 个解决方案

#1


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.

简短的回答是,你不能改变系统键盘的外观和感觉。即使你做了很多人甚至不使用默认键盘。

#2


With iOS 8 apple introduced custom keyboard extension.

随着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 :

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

#1


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.

简短的回答是,你不能改变系统键盘的外观和感觉。即使你做了很多人甚至不使用默认键盘。

#2


With iOS 8 apple introduced custom keyboard extension.

随着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 :

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