Search Results

Search found 36 results on 2 pages for 'autorotate'.

Page 1/2 | 1 2  | Next Page >

  • UiSplitViewController doesn't autorotate.

    - by Michael
    Hello, I have recently run into a problem. My iPad app is somehow preventing the iPad from auto-rotating. My app loads a UISplitView with both of the view controllers returning YES for shouldAutorotateToInterfaceOrientation:. I have set up my info.plist to include the "Supported interface orientations" key with all four orientations. When I run the app, however, rotating the device does not rotate the splitView (even though I am receiving UIDeviceOrientationDidChangeNotification). In addition, when I exit my app in a different orientation that it started in the iPad home screen doesn't autorotate to the correct view until I rotate it again without my app running.... Any Ideas would be much appreciated....

    Read the article

  • Autorotate works for iOS 6 but gives weird behavior in iOS 5

    - by Jeanne
    I seem to be having the opposite problem from this post: Autorotate in iOS 6 has strange behaviour When I submitted my paid app to Apple, XCode made me update to iOS 6 on my test devices. I used the GUI in XCode to set my app to display only in portrait mode on the iPhone and only in landscape mode on the iPad. This works great on my iOS 6 iPhone and iPad. In iOS 5, however, the iPad is allowing the app to rotate to portrait, displaying my buttons in a letterbox-like black area that shouldn't be there, and crashing repeatedly. I am using a Navigation Controller and storyboards. I know shouldAutorotateToInterfaceOrientation is deprecated in iOS 6, but figuring it should still be called in iOS 5, I tried this: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { if ((UIDeviceOrientationIsLandscape(UIDeviceOrientationLandscapeLeft))||(UIDeviceOrientationIsLandscape(UIDeviceOrientationLandscapeRight))) { return YES; } else return NO; } else { if ((UIDeviceOrientationIsLandscape(UIDeviceOrientationPortrait))||(UIDeviceOrientationIsLandscape(UIDeviceOrientationPortraitUpsideDown))) { return YES; } else return NO; } // Return YES for supported orientations } The above code seems to have done nothing. I am putting it in each of my view controllers; it seems I should really be putting it in my navigation controller, but because I set that up graphically, I'm not sure how to do that. Do I have to subclass my navigation controller and do everything in code? There must be a way to use the storyboard settings for this! (Note: I am not using AutoLayout and apparently can't because of some older components I am including my software that just plain don't like it.) What might be causing this? I'd like to fix it before too many people buy the app and complain! Thanks in advance...

    Read the article

  • Autorotate UINavigationController based Application in IPhoneOS 3.0

    - by Shoaibi
    I have an application which have code like: window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // UIWindow *window; viewController = [TopicsViewController new]; //TopicsViewController *viewController; //This is a UITableViewController navigationController = [UINavigationController new]; // UINavigationController *navigationController; UIImageView *background = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"background.png"]]; [self.navigationController.view addSubview:background]; [self.navigationController.view sendSubviewToBack:background]; [navigationController pushViewController:viewController animated:YES]; [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; Basically i am using UINavigationController and then push UITableViewController or sometime a UIViewController. UIViewController contain elements such as UITextView, UIImage, UIScrollView. Problem is i have been trying to make this application respond to iphone rotation e.g. when held in landscape, application should switch to landscape and vice versa, but nothing works so far.

    Read the article

  • iPad/iPod: autoRotate resizes view in window

    - by Jasconius
    Developing an iPad interface, I have a scenario where I have a UIViewController which manages a view that gets placed directly as a subview of the main UIWindow. Before being placed in the UIWindow, that view gets resized to a non-standard size, let's say, 768x460, and positioned at the bottom of the screen. When rotating the device, the autoRotate feature of the UIViewController causes the view to be resized so that it fills the entire UIWindow space. I thought this might be because in the XIB, the view is set to window size, but when I changed it to reflect the desired size, it still expanded it to the window size. Then I went into the MainWindow XIB and turned off autoresizeSubviews, and it still happens. This is a very frustrating problem, I am hoping that there is merely something obvious that I am missing out on. Anyone have any bright ideas?

    Read the article

  • PDFView printWithInfo:autoRotate: fails

    - by Brian Postow
    I'm trying to print a PDFDocument that I am constructing from a series of images. In case it matters, I'm doing all of this from within a Mozilla plugin. I create the PDFDocument, and put it into a PDFView, then I call [printView printWithInfo: [NSPrintInfo sharedPrintInfo] autoRotate: YES]; The print dialog comes up (as a separate window, instead of panel. I assume that that comes from being inside a mozilla window, so I wasn't too worried about it. The dialog shows my document, and I can page through it correctly, and everything looks good. However, when I hit "Print" the dropdown with "Layout" etc becomes empty, and the view under that becomes empty. The window doesn't disappear, and the document doesn't print. Hitting Cancel does exactly the same thing. The only thing I can do then is force-quit Mozillla. I based the program off of PDFKitLinker2 from the apple dev site, and that program works. But I can't see any significant differences between it and my version. Any suggestions on where to look? thanks. EDIT: Yes, I know that this is pretty much an exact duplicate of http://stackoverflow.com/questions/2058501/printing-off-screen-pdfviews but that never got a sufficient answer... (And I didn't notice it until just now...)

    Read the article

  • UIScrollView won't autorotate

    - by clozach
    My app design requires the same scrolling functionality found in the iPhone's native Photos app when browsing photos in full screen. Specifically: Each view snaps into place as the view is swiped Scrolling happens in only one direction Rotating the iPhone rotates the entire scrolling region as well such that the frame of each subview (photos, in Apple's case) rotates in-place and paging is still in the same direction (left-to-right) I started to use Apple's sample PageControl code as a launching point, and everything was going swimmingly until I attempted adding autorotation to the code. My sense from the docs was that all I had to do to get autorotation working was to add this to the sample code's MyViewController.m - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } While that does seem to cause the subviews' backgrounds to rotate, the UILabels and the enclosing UIScrollView stay fixed so that, from a user perspective, paging through the views now requires up/down flicking instead of left/right.

    Read the article

  • popViewController does not autorotate back to allowed orientation

    - by JoeGaggler
    I have two UIViewControllers, "A" and "B", where "A" overrides the shouldAutorotateToInterfaceOrientation to return YES for UIInterfaceOrientationPortrait, and "B" returns YES for all orientations. In my example "A" is the root navigation view controller, and I then use pushViewController for "B". After that I rotate the device into landscape, which successfully autorotates "B", then I pop "B" (back button or via popViewController) to return to "A". When targetting iPhone OS 3.1.3, "A" returns to the portrait orientation as expected. When targetting iPhone OS 3.2, I have two side-effects: "A" is displayed in landscape. The navigation bar does not update even though "A" is now displayed. The navigation bar still shows the items for "B". Only after trying to go back/pop one more time will the navigation bar animate to show the items for "A". If I instead attempt to push "B" again and go back, I have to pop twice before the navigation bar animates to show the items for "A". During these "intermediate pops" the view for "A" remains displayed. While researching this issue, I have seen other answers suggesting performing the rotation manually ([UIDevice setOrientation] or via a tranformation), however this does not help understand what the problem is, especially why it behaves differently between the two OS's. So my question is: must all of my UIViewControllers on the UINavigationController stack support exactly the same orientations going forward? And if not, then is there something that I need to do to make it behave as it did for OS 3.1.3?

    Read the article

  • UILabel reset after Autorotate

    - by MB
    Hi, I have a UILabel in a view that is set by calling a method against my view controller. The app is a TABBar app and the VC is in the MORE section. When I rotate the phone the label disappears (don't mind that) when I rotate back the label is showing all .......... (the value it is set to in the XIB) I added a line to set the label in the shouldAutoRotateToOrientation method lblProductTxt.titleLabel.text = self.productText; when autorotating what viewcontroller methods are being called. ?? the shouldAutoRotateToOrientation method doesn't get called when the VC is in the More section but when I move it it does get called but has no affect on the labeltext

    Read the article

  • UIView Clipped By Statusbar until Autorotate

    - by TonyNeallon
    Hi There, Ive created a multiview application that uses multiple controllers to display and control views. The problem Im having is, when the simulator initially loads the view the header is partially covered by the bar at top of screen and the tool bar at the base is not touching the base of the screen. I used the Interface builder size attributes to control the view when the iphone rotates and it works perfectly. All smaps into place perfectly both in landscape and portrait mode AFTER a rotation but the problem is with the initial load before a rotation occurs. Your thoughts a much appreciated. Tony

    Read the article

  • Subview Doesnt AutoSize When Added to Root View Controller

    - by Per
    Hello, I have a root view controller that will have up to 10 or so subviews. I am implementing autorotation/autosize accross the entire app. My problem is this: - When I allocate all the view controllers and add each as a subview to the root controller during startup, everything works as it should. The only problem is that each view controller needs time to initialize. This causes my application to load very slowly. Instead I am trying to allocate the view controllers as they are required. Now I find that if the application goes into Landscape, and I allocate a view controller that is designed in portrait, it will autorotate but the autosize doesnt happen. In other words as soon as the subview is added to the root controller in portrait mode it rotates and sizes correctly (and stays that way). If the subview is added when the root controller is in landscape it rotates but doesnt autosize (and view sizes remain messed up rotating back to portrait) I have tried to force an autosize by calling SetNeedsLayout, SetNeedsDisplay, and LayoutIfNeeded but nothing works. I know i could probably do this manually by determining the root controllers orientation and resizing the subviews appropriately, but this is a lot of work for something that should work automatically. Am I missing something? Any help would be appreciated. My project is an iPad port from an iPhone app, the iPhone app doesnt rotate so Im not sure if this may be something wrong with the 3.2 beta.

    Read the article

  • shouldAutorotateToInterfaceOrientation isn't getting called

    - by morgancodes
    What sort of conditions might prevent my UIViewController's shouldAutorotateToInterfaceOrientation method from being called? I've resorted to using NSNotificationCenter to listen for UIDeviceOrientationDidChangeNotification events, but would love to get the autoRotation behavior working properly. A couple shots in the dark about what's going wrong: Maybe I'm not creating my view controller correctly? Maybe it needs to be inserted in the responder chain and somthething I'm doing is preventing that from happening normally? This seems unlikely to me since my view controller is recieving touch events. Maybe the fact that the view contained by my controller relies on OpenGL has something to do with shouldAutorotateToInterfaceOrientation not getting called? Do either of these sound remotely possible as being responsible? Any other ideas of things to look at?

    Read the article

  • iphone cannot rotate views in TabBar controller

    - by Luc
    Hello, I am working on an application that consists of a TabBar controller. Within on of its tab, I have a subclass of UITableViewController, within this list I have a Core-plot graph in the first cell and some other data in the 4 following cells. When I return YES in the shouldAutorotateToInterfaceOrientation method, I would expect the autoresizing of the list view to happen, but... nothing. When I add some log in the willRotateToInterfaceOrientation method, they are not displayed. Is there something I missed ? Thanks a lot, Luc // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations //return (interfaceOrientation == UIInterfaceOrientationPortrait); NSLog(@"Orientation"); return YES; } - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; NSLog(@"Rotating"); if (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) { NSLog(@"view land:%@", self.view); } if (toInterfaceOrientation == UIInterfaceOrientationPortrait) { NSLog(@"view portrait:%@", self.view); } }

    Read the article

  • iPhone autorotation for too many objects on screen

    - by Denis
    Hi! I have a BlahAppDelegate, BlahViewController and no nibs in my iPhone app project. Only some subclasses of UIView in addition. All this is situated in main.m. My app has 6 subclassed UIViews. Each of it contains 18 UIImageViews. I need to get autorotating work. Or custom rotating. Or something. For example it would be nice to fade the screen out when device is rotated, then move/resize views and then fade screen out. But I don't know how to automate it, without writing a resizing code for each of objects. Please help me if you can.

    Read the article

  • Autorotation and multiple view controllers

    - by alku83
    I'm creating an iPad application which should only work in portrait and portait upsidedown modes. For performance reasons in my applicationDidFinishLaunching method I'm creating several viewControllers, and adding them to my main window as subviews. I then hide the ones I don't want to see straight away. There is no tab bar or navigation controller. My problem is that only the first viewController seems to be receiving the rotate calls. I have verified this by swapping around the order in which I add the subviews to the main window and NSLog's. Is there some way I can force all the controllers to receive the calls? Some of my views are designed to lay over the top of another view, but this behind view will not always be the same one - so it seems to make sense to have the overlay view in a separate view controller. Am I doing something fundamentally wrong, and that's why it's not behaving as I would expect? EDIT: The accepted answer for this question seems to indicate the exact problem I'm facing: http://stackoverflow.com/questions/548142/uiviewcontroller-rotate-methods

    Read the article

  • My app crashes after multiple rotates

    - by Ian Rae
    My app is crashing when I try and rotate it more than a couple of times. I first thought it was just the iPhone Simulator, so I loaded the app onto an iPod touch, and it crashed after fewer rotates in a row. I suspect it's a memory leak in one of my rotate methods. The only place I can think that the crash is being caused is in willRotateToInterfaceOrientation:duration:. The only two methods related to rotate that I've added/extended are shouldAutorotateToInterfaceOrientation: and willRotateToInterfaceOrientation:duration and I don't think it's the first because it only contains the two words: return YES;. Here is my willRotateToInterfaceOrientation:duration: method so you can review it and see where the possible memory leak is. -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation duration:(NSTimeInterval)duration { UIFont *theFont; if ((orientation == UIInterfaceOrientationLandscapeLeft) || (orientation == UIInterfaceOrientationLandscapeRight)) { theFont = [yearByYear.font fontWithSize:16.0]; yearByYear.font = theFont; [theview setContentSize:CGSizeMake(460.0f, 635.0f)]; } else { theFont = [yearByYear.font fontWithSize:10.0]; yearByYear.font = theFont; [theview setContentSize:CGSizeMake(300.0f, 460.0f)]; } [theFont release]; } yearByYear is a UITextView theview is a UIScrollView if anyone has any idea of why my app is crashing, I would be greatly appreciative.

    Read the article

  • Using accelerometer to detect iPad lock switch trigger?

    - by DevDevDev
    So for complicated reasons I am managing view rotations myself, and am only implementing UIDeviceOrientationPortrait as the autorotating orientation. Anyway, when one clicks the screen lock on the iPad, the device will rotate to UIDeviceOrientationPortrait, which will cause my code to rotate, which I do not want to happen. For instance of the user is holding the device in "landscape mode", i.e. I have already manually rotated the UI to landscape mode, and he/she clicks the screen lock, it will rotate the UI to portrait mode, even though the user did not move the device at all. So somehow I need a way to differentiate between rotations to portrait mode occuring from the screen lock, and those occuring from device rotation. As such, I would like somehow to use the accelerometer to detect whether or not the device was actually 'rotated' or whether the button was clicked. Thanks!

    Read the article

  • shouldAutorotateToInterfaceOrientation always get called more than once.

    - by lovecactus
    (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation My code get this event more than once while device is rotating. I'm searching in apple docs for reference but seems no lucky. Could any one offer a hint why this is happening? My code is an apple doc sample code, without any change but some logs. http://developer.apple.com/iphone/library/samplecode/AlternateViews/Introduction/Intro.html#//apple_ref/doc/uid/DTS40008755

    Read the article

  • iphone sdk: autorotate jumps back up the page, showing information that has already been read...

    - by jonathan
    Hi, I am using - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ return YES; } to allow rotation, which works fine - except that the landscape view jumps backwards up the page that is being displayed. I can't figure out what I should be looking at to fix it. I just want the page to rotate where it is. Any pointers would be great. Am a noob, as is probably clear. Thanks Jonathan

    Read the article

  • in iOS7 how do you stop the First viewcontroller autorotating?

    - by uaka
    I have an app that just needs one screen to autorotate, the first and last screens should be portrait. I can get the last screen to stop rotating using: -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } But this does not work on the first screen, I am using a storyboard with a UINavigationController (I'm thinking that may have something to do with it?) Any help would be gratefully received. Thanks

    Read the article

  • UITabBarController + autorotation

    - by ludo
    Hi, I created an application with a TabBarController using IB who have 4 TabBarItems and so display 4 differents ViewControllers. To allow a landscape orientation I must add this code in all of my ViewController: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown ? NO : YES); } The problem is I don't want for example the secondViewController to autorotate, How can I do that? Because everytime I delete the code above in one of my ViewController, every ViewControllers not rotate anymore. Thanks

    Read the article

1 2  | Next Page >