UILabel/UITextView Autosizing

Discussion in 'iPhone/iPad Programming' started by sleaver, Jul 24, 2010.

  1. macrumors member

    Joined:
    Jul 21, 2010
    #1
    I have a UIView that creates a couple of the above with the following (UILabel example)

    PHP:
    dateLabel = [[UILabel allocinitWithFrame:CGRectMake(149.069.0155.021.0) ];
    I have just set shouldAutorotateToInterfaceOrientation to
    PHP:
    return YES
    in my app, and you've probably guessed what I'm about to say/ask.

    Of course my view won't look right in landscape. I know how to do it in IB by using the Autosizing section, but is it possible in code and if so how?

    Thanks
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2

Share This Page