WebView not rotating properly when switching to landscape

Discussion in 'iOS Programming' started by MythicFrost, Feb 25, 2010.

  1. MythicFrost macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia
    #1
    Hey, I'm making a tabbed Web Browser. My issue is that when I rotate the device the web browser doesn't rotate properly, fitting the entire screen.

    I've set:
    Code:
    tempWebView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin || UIViewAutoresizingFlexibleRightMargin || UIViewAutoresizingFlexibleTopMargin || UIViewAutoresizingFlexibleBottomMargin || UIViewAutoresizingFlexibleWidth || UIViewAutoresizingFlexibleHeight;
    But it doesn't work, the web views are being created via code. If I create one in IB and set the same settings it just automatically does it properly when switching to landscape...
    I must be missing some kind of setting that isn't default when created in code? Does anyone have any idea what's wrong?
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Try using bitwise-OR instead of logical-OR.
     
  3. MythicFrost thread starter macrumors 68040

    MythicFrost

    Joined:
    Mar 11, 2009
    Location:
    Australia
    #3
    Alright thank you, what's the difference?

    EDIT: Nothing a quick google couldn't solve, thank you, it works now that I'm using | instead of ||.
     

Share This Page