Why is my label becoming invisible

I’m making a song quiz app, and I want to display the lyrics of my song when the user answers the question correctly. But once the lyrics are displayed, all the labels above it become invisible. But I know the text is still in them, because I used to a text to speech to speak out labelWord’s text (one of the labels that became invisible) and I’m getting the correct word. Why is this happening?
This is during live test on Chrome and on the legacy UI.

Weird! Are they maybe getting resized to near-zero height when you put the text in that final label? Sometimes resizing can do weird stuff, especially with a bunch of relative heights. Do you have your screen set to scroll?

I suggest setting the background on those disappearing labels to something visible, or putting a border on them temporarily, so that you can see if they’re getting squashed.

3 Likes

Thanks for your reply. Yeah my screen is set to scroll. I’ll try the border, too.

Yeah, they’re getting squashed. What can i do about it?

The borders are still visible.

1 Like

I have several times been unhappy with how the web app and phones do not deal with relative/fit/fill heights in exactly the same way. Trying to get it to work on all devices can be a pain, and sometimes I’ve settled for coding absolute heights instead. Be sure to test any fixes on your final delivery method - I wouldn’t bet on something that looks good in the web previewer/app being OK on phones, if you have a bunch of non-absolute heights.

2 Likes

Swear. Loudly. Then switch to absolute heights.

… at least, that’s what I do. :wink:

3 Likes

Great, thanks. I’ll try the absolute size and let you know.

Tempting.

Argh, not working.
It’s stubbornly staying squashed.

I’m going to add the solution here, in case it helps anyone else. (We worked it out in a PM.)

There were two labels that were getting set to too short of a height when another label had text (many many lines) put into it. The solution was to put the two labels that were getting squashed into a column with an absolute height. The screen was set to scroll, so that caused the large label to make the screen height bigger rather than taking height from the other labels.

1 Like