ios - 长按键盘时 TextField 显示 -[UIWindow endDisablingInterfaceAutorotationAnimated:] 错误 (SwiftUI)
问题描述
每当我长按 iOS 键盘中的某个键以显示备用键时,我都会收到以下错误:
2020-03-09 21:44:42.669194-0400 TestProject[10220:731641]
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on
<UIRemoteKeyboardWindow: 0x7ff98204fc00; frame = (0 0; 320 568);
opaque = NO; autoresize = W+H; layer = <UIWindowLayer: 0x6000020980e0>>
without matching -beginDisablingInterfaceAutorotation. Ignoring.
这甚至发生在一个新项目上。这是我的代码:
import SwiftUI
struct ContentView: View {
@State var testing: String = ""
var body: some View {
TextField("Hello, World!", text: $testing)
}
}
我尝试在线搜索解决方案,但每个人在尝试动态隐藏键盘时都会遇到这个问题,这不是我的情况。有谁知道我为什么会收到这个错误?
PS 我正在使用 XCode 版本 11.3.1 (11C504)。
解决方案
这绝对不是错误。
它只是一个抛出到控制台的调试消息,您可以放心地忽略它。
推荐阅读
- r - 如何使用 textInput 更新多个 selectizeInput?
- android - WebView 的 setInitialScale 无法缩放
- css - 如何修改 mui 组件中的 css - 手风琴?
- mongodb - removeShard 命令会清除该分片上的数据吗?
- docker - 使用 Semver 为 AWS ECS 托管的 docker 映像部署
- django - 当另一个登录失败发生时,Django 轴重置冷却
- kubernetes - Kubernetes 的 Traefik ingressRoute。如何将443端口重定向到8082端口?
- python-3.x - sqlite 选择具有特定 id 的所有值
- php - 使用 php 从两个表中识别条目
- xml - XSLT 具有嵌套的 for-each-group 以显示同级元素的唯一组合