[英]Why won't text on a label show up on an actual device but will in the simulator? (Xcode)
Running : - Latest version of Xcode - Catalina 10.15.2 - Base model MacBook Pro 13 inch运行: - 最新版本的 Xcode - Catalina 10.15.2 - 基本型号 MacBook Pro 13 英寸
I'm having an issue where when I have text in a label show up on the simulator but when I try running it on my iPad, it is just blank.我遇到了一个问题,当我在模拟器上显示标签中的文本时,但当我尝试在 iPad 上运行它时,它只是空白。 The text is currently being shown on the simulator because that is what I have just typed in on the label on the main.storyboard.
该文本目前正在模拟器上显示,因为这是我刚刚在 main.storyboard 上的标签上输入的内容。
I have tried setting the label text manually by doing myLabel.text = "myText"
but that didn't work either.我尝试通过执行
myLabel.text = "myText"
手动设置标签文本,但这也不起作用。 Each device is up to date in terms of the software and I have chosen iOS 13/iPad OS for what software the simulator should run on also.每个设备在软件方面都是最新的,我选择了 iOS 13/iPad 操作系统作为模拟器应该运行的软件。 I'm thinking it is just some weird iOS 13 bug because I can't find a fix for it.
我认为这只是一些奇怪的 iOS 13 错误,因为我找不到解决方法。
请检查实际设备上是否enabled
Dark mode
,如果是,则尝试将文本颜色更改为其他颜色: BlackColor
因为如果文本颜色是labelColor
那么在启用暗模式的设备上它会显示为white
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.