Author Topic: Can't use UILabel for status messages  (Read 5682 times)

TokyoDan

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 53
    • View Profile
Can't use UILabel for status messages
« on: August 05, 2013, 10:14:39 PM »
I'm trying to use a UILabel to display status messages. 

    public UILabel messageLabel;
    messageLabel.text = "This is a status message";

But the second time I try to set the .text field it just superimposes the 2nd message over the previous message without clearing out the text that was there before. Even trying to null the .text field or using an empty string before trying to change the .text field doesn't work.

    messageLabel.text = null // or "";
    messageLabel.text = "This is the 2nd status message";

How do I clear out the previous text so I can cleanly display new text?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Can't use UILabel for status messages
« Reply #1 on: August 05, 2013, 10:52:23 PM »
Check your camera clear flags. You likely don't have any cameras clearing color.

TokyoDan

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 53
    • View Profile
Re: Can't use UILabel for status messages
« Reply #2 on: September 19, 2013, 11:18:12 PM »
Thanks.