WatchKit 支持标准字体和自定义字体
使用自定义字体:
- 将自定义字体文件包含在WatchKit app和WatchKit extension包里
- 添加UIAppFonts关键词到WatchKit app的Info.plist文件里
文本输入
支持语音输入和选择默认的输入。调用presentTextInputControllerWithSuggestions:allowedInputMode:completion:方法来处理用户的输入,下面是官方文档里的例子:
NSArray* initialPhrases = @[@"Let's do lunch.", @"Can we meet tomorrow?", @"When are you free?"];
[self presentTextInputControllerWithSuggestions:initialPhrases
allowedInputMode:WKTextInputModeAllowAnimatedEmoji
completion:^(NSArray *results) {
if (results && results.count > 0) {
id aResult = [results objectAtIndex:0];
// Use the string or image.
}
else {
// Nothing was selected.
}
}];
文本显示国际化,WatchKit app可以使用和iOS app相同的技术来使app国际化。 参考:Internationalization and Localization Guide