Search Unity

NGUI Question : UILabel not refreshing

Discussion in 'iOS and tvOS' started by ciaravoh, Oct 13, 2012.

  1. ciaravoh

    ciaravoh

    Joined:
    Dec 16, 2009
    Posts:
    252
    Hello Guys,

    I can't get logged to the website of NGUI editor, so asking there :)

    I want to update a UILabel.text field and the old value stays on the screen. The 2 labels are merged together.

    any idea on that ?

    thanks for your feedback.

    ekilog
     
  2. gregzo

    gregzo

    Joined:
    Dec 17, 2011
    Posts:
    795
    Code (csharp):
    1. public UILabel myLabel;
    2.  
    3. public string myText;
    4.  
    5. void Start()
    6. {
    7.      myLabel.text = myText;
    8. }
    This works.

    "I want to update a UILabel.text field and the old value stays on the screen. The 2 labels are merged together. "

    I have no idea what you are trying to say. If you want to append to a string, just use +:
    Code (csharp):
    1.  
    2. myLabel.text = myLabel.text+moreText;
     
    Last edited: Oct 14, 2012
  3. ciaravoh

    ciaravoh

    Joined:
    Dec 16, 2009
    Posts:
    252
    Thanks. I was playing with a bad camera setup..... :-(