Harry McGovern
Harry McGovern

Reputation: 167

UILabel Text Not Appearing on Some Devices for iOS

This problem appears to only affect the iPad Mini 5 and the iPad Mini 4. Not the iPhone 11. It's only the UILabel fields text. It's only on the Device, not on the Simulator.

The text display fine on anything but the iPad Mini 5 device nor the iPad Mini 4. I've tried changing the fonts. I've tried changing just about everything that's changeable. The app itself has been on the app store and working fine for years. Now it's not working on the iPad. I've tried checking the uppercase/lowercase thing mentioned elsewhere. The UILabel Field background shows clearly. Just not the text that's supposed to appear in the fields. Thanks Attached is an image of the iPad Storyboard. The [Change Image] icon is a Button, and displays and works fine. enter image description here

Upvotes: 3

Views: 1295

Answers (2)

Marina Aguilar
Marina Aguilar

Reputation: 1189

Any chance your device is on Dark Mode? If so, that would explain why text doesn't show and background does. Dark Mode by default will switch black texts to white and the other way around.

If that's the case and you don't want to support dark mode on you app, just disable it by adding this to your .plist:

<key>UIUserInterfaceStyle</key>
<string>Light</string>

Upvotes: 7

Harry McGovern
Harry McGovern

Reputation: 167

I found the solution. In the Attribute Inspector of the UIText I mean UILabel fields not displaying on the iPad, change the Behaviour from Enabled to Not Enabled. In other words, I had that box ticked. I unticked it, and now it works on all devices. Thanks for the responses.

Upvotes: -1

Related Questions