Label text alignment

Discussion in 'iOS Programming' started by davbeck, Sep 3, 2009.

  1. davbeck macrumors regular

    Joined:
    May 16, 2008
    Location:
    Reno, NV
    #1
    Is there a way to left and right align text on a label? Maybe using stringWithFormat? I don't want to place the right string so many characters over, I want the right side of the string on the right side of the label and vice versa for the left string.

    Code:
    |left     right|
    |not      this |
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    How many label instances are we looking at here?
     
  3. davbeck thread starter macrumors regular

    Joined:
    May 16, 2008
    Location:
    Reno, NV
    #3
    I was hoping to use one per row. The example above has 2 rows.

    I want to avoid using two labels because ideally, if there was too much for one line, it would be truncated (possibly in the middle).
     

Share This Page