Landscape Orientation: [view bounds] gives wrong sizes?

Hi
Getting a view's bounds rect while in Landscape Mode returns the wrong sizes:
Starting from a new UIView Template Project, I'm adding a single UIView to the ViewController in Interface Builder (in Landscape Mode) and setting the view size to width=400, height=200;
However when I add a breakpoint in the ViewController (at viewDidAppear), the sizes are w=220, h=380!
(Even though the view clearly is correct on the screen)
In myViewController.m I've set:
- (BOOL)shouldAutorotateToInterfaceOrientation:
(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); // home button on right
In myAppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
application.statusBarOrientation = UIInterfaceOrientationLandscapeRight; //home on right
[window addSubview:viewController.view];
[window makeKeyAndVisible];
return YES;
and in the info.plist I've set: Initial interface orientation = Landscape (right home button)
I'm not trying to rotate the view with the iPhone, it is meant to be fixed in Landscape only.
Is there a workaround for this? I need to create some CALayers dependent on the correct view size.
Thanks
Steve

I figured it out

Similar Messages

  • Time machine gives wrong size in lion 10.7.4

    The hard drive has a total size of 250 gb but time machine gives wrong size of 750 gb??

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Console in the page that opens.
    Select "system.log" from the file list. Enter "backupd" (without the quotes) in the String Matching text field. Post the messages from the last backup, beginning with "Starting standard backup."
    Post the log text, please, not a screenshot. If there are runs of repeated messages, post only one example of each. Do not post many repetitions of the same message.
    Some personal information, such as the names of your files, may be included — edit that out, too, but don’t remove the context.

  • Landscape orientation view

    My Blackberry 9800 Torch will no longer switch from portrait to landscape view in any application when I turn the unit on its side. It is stuck in portrait view. Very frustrating! This happened once before but corrected itself. Is there a setting that can changed? Can any one offer any suggestions as to why this is happening? My carrier, Bell Mobility, was of no assistance. Just told me to return the unit for repair which would take 6 - 8 weeks.

    Hey man. Just had that same problem with my torch. To fix it I slammed it close 2 or 3 times. Give that a shot

  • K7T 266 Pro2 RU; Raid gives wrong size on HDD

    Hi!
    I've got a K7T266 Pro2 RU, and trying to set up two Samsung 160GB in Stripe mode (2+0), creating an array of 320GB.
    The Promise bios displays one array of 320GB (as I set it up), but when I try to install WinXP, it only comes up with a volume of about 260GB...
    There should not be any limitations on terms of WinXP/NTFS, so therefore I suspect that the Promise driver gives false information to WinXP, showing what most likely is a raid containing two 130GB disks.
    Has anyone experienced the same problem?
    FYI: I striped two 40GB IBM's earlier, creating an array of 80GB - worked like a charm. Also - the jumper settings on the Samsung disks are correct... I have even tried with Promise's own drivers for this controller, but it won't work. I guess MSI has added too much change for its OEM drivers :-(
    I would greatly appreciate any help!!
    Isirider

    This article in the Microsoft knowledge base may help.

  • I have a problem with landscape oriented pages being cut off at 8.5" horizontally, when in Design View.

    I am trying to edit a form created in livecycle designer. Some of the pages are in portrait orientation and some in landscape orientation. The problem is that all the landscape oriented pages are cut off at 8.5" horizontally, so I can't edit the part that is cropped off. the full horizontal width of the landscape pages are visible in Preview PDF mode, but not Design View mode. Does anyone know what I need to do to be able to see all of the 11" width of these landscape oriented pages in Design Mode?
    thanks

    The following line tells me that this is not a template file, but a document created from a template called index.dwt
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" -->
    This means that you saved a child document as a template file at some stage.
    If you go to Modify->Templates->Detach from Template, you can remove the template structure from your document. All you then need to do is to re-save the document as a template.

  • Fixed landscape orientation changed to wrong fixed portrait in iOS7 on iPad

    Hi,
    I just downloaded iOS7 on my iPad.
    iOS7 changed my fixed landscape orientation to wrong fixed portrait orientation in iOS7 on my iPad
    for a app I made in Flash CS 5.5.
    I didnot have this problem in iOS6.
    Did anyone else encounter this problem?
    Does anyone know how to repair this for iOS7?
    Any help is greatly appreciated.

    That's not correct, you should not be exporting AIR 3.4. The latest is 3.8 and the difference is huge for overall compatibility. Please do not export at 3.4.
    Download the latest AIR SDK:
    http://www.adobe.com/devnet/air/air-sdk-download.html
    Unzip it anywhere you'd like to save your SDK. I put mine in the Flash CS6 folder  (Note: The 3.8 folder in the pic does not exist, you have to make it and you can call it anything you like. I used 3.8 for clarity and convention.).
    If you have CS6 then simply point it to the new SDK (Help->Manage AIR SDK-[+] Button, point to the SDK location)
    e.g.
    If you have access to CS6 just use it over CS5.5. If you need to use CS5.5 then you can google plenty of resources on how to properly overlay an AIR SDK on CS5.5.

  • Combined Acrobat file - scanned PDF wrongly gets landscape orientation

    Online subscription Acrobat - when combining files, a scanned portrait-orientation PDF file is reformatted to landscape orientation, clipping contents at the bottom of the page. Is this a bug, or can I fix this?
    Frode

    One solution was to take the scanned PDF, open it in Reader, and "Print-to-PDF" it again but selecting Landscape orientation instead of automatic orientation.
    Frode

  • Duplex printing issues with landscape orientation

    I have read through all of the previous questions, and can't seem to resolve my problem here.
    I am using Acrobat 8 Professional (8.2.2).  I have created a PDF from a Powerpoint presentation.  I need to be able to send this to someone else and have them view it on screen with the correct orientation, and also duplex print it correctly, as all of our company printers default to duplex printing (to save paper).  However, since the person who prints it is going to staple it in the upper left hand corner, it really needs to be duplexed to open along the left edge (the short edge of the paper).
    When I first bring up the print screen the document has the incorrect orientation; i.e. it shows a thumbnail of an 8.5 x 11" page in portrait orientation, and my content is reduced in size to fit the 8.5 width.  I think this is really the issue at hand--for some reason, even though the page is set up in Powerpoint as a 8.5x11 landscape oriented document, when it exports to the PDF format, that orientation doesn't hold.
    Anyway, it seems that no matter what settings I try to adjust, it doesn't seem to work.  I have toggled "Auto-Rotate and Center," I have toggled the duplex settings in the PDF document properties.  I have toggled the duplex print settings on my printer driver between "Open to Left" and "Open to Top."  None of it seems to make any difference in the final printout--basically what comes out of my printer is a document that is rotated to print out as if it was a portrait page, and is bound on the left edge (so each second page is printed upside down, when I am looking at it in landscape orientation).
    The only work-arounds I can think of would be to rotate every other page in the PDF so that when it printed it printed correctly.  However, then the PDF would not be readable on the screen.  I could generate two separate versions of the PDF, one marked for print, and the other for viewing--but that is a real waste.
    Does anyone have any suggestions here?  I am looking for a way either to get the PDF software to "understand" that this document is a landscape document from the get-go (then it SHOULD work to duplex print correctly with the "Open to Left" setting), or maybe create a custom print setting for this document that allows me to rotate every other page as it is printed, but that doesn't rotate the pages on the screen.
    I hope this is all clear...and that someone can offer some advice.
    Thanks!
    Melise
    P.S.  Just in case it makes any difference, I am running Windows XP Professional and am using the Microsoft Office 2007 software package.  Because the company has multiple different printers throughout the company, I need a solution that will work without regards to the specific printer driver.

    I am having the exact same issue.  The setting of "Auto-Rotate and Center" has no affect.
    Do I have to rotate the odd pages 180 so they are upside down in the PDF, but print correctly?
    I am using Acrobat 9 Pro V. 9.3.3 in Win 7 Pro 64, to HP CP6015XH (colour laser).

  • Forcing Landscape orientation for TabBarController and NavigationController

    Hello,
    I'm writing an application that need to force LandscapeRight with a UITabBarController that contains a UINavigationController that contains UIViewController.
    I can force UIViewController to landscape, but when I add the UINavigationController, the emulator starts as Landscape, but returns to Portrait when I call [window addSubView:], and the viewOrientation field from window switch from 0 to Portrait.
    Is there anybody has worked with landscape orientation ? (it's really hard to make a landscape app, indeed).
    David

    The code below almost works. It does force landscape orientation. The problem I am having is that the navigation items in the navigation bar are not centering themselves until the device is physically rotated. Hope it helps.
    Ed
    [window addSubview:[navigationController view]];
    [window makeKeyAndVisible];
    // get height of status bar before setting the status bar to landscape orientation
    CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame];
    // set the status bar to landscape orientation
    [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];
    // rotate
    UIScreen *screen = [UIScreen mainScreen];
    CGRect newBounds = CGRectMake(0, 0, screen.bounds.size.height, screen.bounds.size.width - statusBarFrame.size.height);
    self.navigationController.view.bounds = newBounds;
    self.navigationController.view.center = CGPointMake(newBounds.size.height / 2.0, newBounds.size.width / 2.0);
    self.navigationController.view.transform = CGAffineTransformConcat(self.navigationController.view.transform, CGAffineTransformMakeRotation(degreesToRadian(90)));
    self.navigationController.view.center = window.center;
    here is the function definition
    #define degreesToRadian(x) (M_PI * x / 180.0)

  • PDF with Portait and Landscape Orientation act differently between pages

    Hi,
    I have issue when I'm trying to have a landscape orientation in a PDF with another portrait page.
    All I want to do is have a small page which indicates instructions on the form because it is a form builder, once the form is created by the user the landscape page gets hidden.
    My issue here is that when I set a masterpage to landscape it makes it different to switch between pages.
    I can't see more than 1 page at a time, just like it can't show a landscape and portait orientation together in the screen.
    I have another form with landscape and portait together and it works fine, but this form doesn't stay normal... There must be something I'm missing...
    It is annoying that I can't have more than one page in the screen, once I hit the bottom or the top of the page it switches automatically to the other page.
    Please help me on this, I'm trying to figure out what is causing this bug..

    Hi,
    I haven't used form builder, but do you still have a viewState, try adding the following line in the docReady event of the form
    event.target.viewState = { pageViewLayoutMode:2 };
    This has the same effect as setting Enable Scrolling on the View ... Page Display menu.
    A value of 1 would give you the single page view.
    Regards
    Bruce

  • How do I print text document (spreadsheet) in 11 x 17 format with landscape orientation?

    Print preview shows only in portrait orientation when I get an image at all, then when I hit "print" icon, get instant message that says "out of memory".  Also cannot seem to get printer to recognize 11 x 17 size -- keeps saying that printer settings & paper size do not match.

    Don't want to come across as ungrateful, but I'm NOT impressed with how these postings are being handled.  Guess I should expect that with HP -- ever since their calculators came out with RPN, the culture of HP has been different from most others.
    To repeat myself, my printer is HP B8550 Photosmart, capable of wide format printing -- the reason I purchased this one after reading reviews by others  of all its features.  My OS is Windows XP Home Edition.  My problem is with trying to print out a spreadsheet format of a large genealogical database that I have created, using Windows Works.  When I open the file, create the desired printer settings, and perform the page set-up tasks, all I get when I hit "print preview" is an error message that says "out of memory", which prevents any further action.  When I clear that from the screen & try to see a print preview, I get a truncated image of the spreadsheet in PORTRAIT orientation & not the LANDSCAPE orientation that I have set the document printing for.
    While awaiting a useful response from yesterday's forum (& not getting one), I tried a different Word document while using the same 11 x 17 sheet size setting for the printer, & that document was processed without a hiccup.  I'm now more inclined to believe that there is something wrong with my Window Works software & NOT the printer software that just doesn't want to deal with 11 x 17 spreadsheets in queue or out on the stack (or heap -- wherever the machine stages such data for processing), but I just don't know.  Made a separate file using just one page of the database, thinking that maybe the 4.5 MB file size was the problem, but that had absolutely no effect on the situation -- it won't print even that small file as structured.  To display all the data, I need to use landscape orientation.  Puzzled why it won't show in that orientation even within print preview.
    ANY advice on how to get this project to work properly is appreciated -- it represents about 8 years' worth of work in creating it & I'm ready to make a hard copy to use while doing on-site work at various archives holding such records.

  • Force Landscape Orientation?

    Does anybody know of a way to force landscape orientation for a view controller in an iPhone application?
    I have defined a UI in Interface Builder that I want to always show in landscape mode.
    When the app first starts though, it is always in Portrait Mode.
    Once the orientation is changed to landscape it will never go back to Portrait since I have setup the shouldAutorotateToInterfaceOrientation method correctly, but I can't seem to figure out a way to start it out in landscape mode.

    Andrew, I'm having a very similar problem. Have you found a solution yet?
    I have an app that has two screens, one is displayed landscape, and the other is displayed portrait. The user can press a button to swap between them. When I switch between the views I call
    [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait];
    or
    [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];
    to put the device into the correct orientation for whichever view I'm about to display.
    Problem is, if the user is on the landscape screen, rotates the phone to portrait, and then presses the button to switch to the screen that is in portrait, the new view gets put on in the wrong orientation (landscape). If the user then rotates the device to landscape and back to portrait, it fixes itself. It's like the phone ignored the call to [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait]; if the device is already being held in portrait orientation.
    I've been at this for a few days now, and I'm really stuck. Any help would be appreciated.

  • CS4: How to set up landscape orientation doc with dual page setup vertical not horizontal

    I'm an InDesign newbie and am trying to set up document presets for a landscape-oriented document that will have binding at the top and bottom edges of the page, not the default left and right edges.  So when I open up my spread of pages 2 and 3 I want to see page 2 ABOVE page 3 not to the left of it.
    I can't see any way to do this. Am I missing something or is this just not possible in InDesign CS4 (v6.0.6)?

    The closest you can come out of the box is to set up a facing pages document using portrait orientation, then select the spreads in the Pages panel and Rotate Spread View 90 degrees Counter-Clockwise before you begin the layout.
    This will allow you to work "as if" your pages were landscape and bound on the long edges, but things like x and y coordinates will be swapped bcause you are really still working on rotated pages.

  • How to read ibooks on landscape orientation one page at a time on iPhone 6 Plus

    How can I force iPhone 6 Plus to show me only one page at the time on landscape orientation on iBooks. Right now it show me one page at the time if it is in portrait orientation but as soon as I turn the phone to landscape orientation it splits and shows me two pages ie page 1 and page 2.

    I've looked everywhere I can think of to change the way that iBooks handles this and cannot find an option to change it. If you choose scrolling view then it will not show two columns but then you scroll to read rather than turning "pages."

  • Any calendar app with landscape week view?

    Before I waste more hours searching, I thought I'd ask here:
    Is there ANY basically reliable stand-alone calendar app for the Touch that will do a landscape-oriented week-view?
    Or any clue that in the next six months someone at Apple will sit down for a couple of hours, figure out how to make the native calendar program do this, and issue an update?
    I don't necessarily need it to sync to anything, since I'm used to using a paper planner. I'm not going to buy a program for my desktop just to get the Touch calendar.
    I teach college and do a lot of random meetings and appointments with people on the fly, in the "can we meet in the next few days" genre. On paper, I'm scanning my Week View all the time, and I'm just flabbergasted that that's the one thing I can't get the iPod software to do for me.
    The list-based portrait weekly view in something like PI-Lite will just barely suffice.
    Any suggestions?

    Palm Pre.
    Except it is $199

Maybe you are looking for