简体   繁体   English

为什么标签上的文字不会出现在实际设备上,而会出现在模拟器中? (Xcode)

[英]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 错误,因为我找不到解决方法。

On iPad在 iPad 上ipad图片

on Simulator在模拟器上模拟器图片

请检查实际设备上是否enabled Dark mode ,如果是,则尝试将文本颜色更改为其他颜色: BlackColor因为如果文本颜色是labelColor那么在启用暗模式的设备上它会显示为white

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我的应用程序不能安装在模拟器或设备上 iOS xcode - Why won't my application install on simulator or device iOS xcode iPhone 7设备日志不会显示在Xcode的调试器中 - iPhone 7 device logs won't show up in the debugger in Xcode Swift iOS -UIImagePicker的照片库在模拟器上呈现但在运行Xcode时在实际设备上崩溃(不会出现) - Swift iOS -UIImagePicker's Photo Library Is Presented On Simulator But Crashes (won't present) On Actual Device While Running Xcode XCode将不再在设备/模拟器上运行我的应用程序 - XCode won't run my application on a device/simulator anymore xcode swift 不会更改标签文本 - xcode swift won´t change label text 用户位置不会在Xcode的模拟器中显示 - User location won't come up in simulator in Xcode Xcode初学者功能不会显示 - Xcode beginner functions won't show up Xcode 6:表格单元格中的标签在展开/与单元格对齐时不会展开/显示更长的文本 - Xcode 6: Label in Table Cell won't expand / display longer text upon expansion / line up with cell 为什么iAd在模拟器和设备测试中效果很好,但在App Store上发布后却没有出现? - Why did iAd work well on simulator and device testing, but didn't show up after released on App Store? Xcode 6.3不显示所连接设备版本的模拟器 - Xcode 6.3 doesn't show simulator of connected device version
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM