autorotate

Autorotate ignored when changing tabs

爱⌒轻易说出口 提交于 2019-12-05 07:54:09
问题 I have an application with a UITabBarController, each of the tabs has a UINavigationController "attached" to it. Now lets assume that the rootViewControllers (of the navigationControllers) in Tabs 1,2 and 4 only support the portrait orientation and have such a "shouldAutorotateToInterfaceOrientation" implementation that only returns YES when asked to rotate to portrait. Tab 3 however has some viewControllers in its navigationController that support landscape orientation. When I am in tab 3

My self.view has the wrong dimensions

假装没事ソ 提交于 2019-12-05 03:13:25
My view has the wrong dimensions. I am running a Landscape only but the view is reporting portrait dimensions "View Width = 768.000000 Height = 1024.000000" Any Ideas how to fix that? I have played around with the autorotate I have tried - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft|| interfaceOrientation == UIInterfaceOrientationLandscapeRight); } and - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } It looks fine on the

App only rotates in iOS 6 and not in iOS 5

安稳与你 提交于 2019-12-05 00:59:26
问题 I have made an app targeted for iOS 5 and iOS 6, and for some reason it only rotates when using it on devices with iOS 6, wether on an iPhone or an iPad, and doesn't rotate on devices using iOS 5. My app is universal. Please help me resolve this problem! Thanks 回答1: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return ((toInterfaceOrientation == UIInterfaceOrientationPortrait) || (toInterfaceOrientation ==

UIImagePickerController (using camera as source) does autorotate on iPad2, how do i stop it?

筅森魡賤 提交于 2019-12-04 11:46:19
I am trying to write an app with some camera function, and I use an overlay view to decorate it with an image. This is how I implement the app: I use the UIImagePickerController to who the user what the camera takes in, and add a UIImageView onto the cameraOverlayView as a subview so that it works like this: (image at http://www.manna-soft.com/test/uploads/UIImagePickerView-portrait.jpg ) This works fine until the iPad2 come into place... it autorotates like this and ruin the layout: (image at http://www.manna-soft.com/test/uploads/UIImagePickerView-landscape.jpg ) The UIImagePickerController

Detecting device orientation

风格不统一 提交于 2019-12-04 07:05:45
I need to detect android device orientation change without playing manually with sensor data, while keeping activity orientation stick to some orientation onConfigurationChange will not work as will stick my activity to not rotate. Playing around with sensor data to detect the orientation change I consider that as an invention of wheel, as android already does have embedded implementation of the algorithm to detect device orientation change. And from another side the detection of orientation change is not a simple checks like this. public void onSensorChanged(SensorEvent event) { if (event

jQuery content rotator

a 夏天 提交于 2019-12-04 02:13:57
问题 Can someone recommend me some jQuery plugin, for the rotating this HTML structure. <div id="event_rotator"> <div class="event"> <h2>Title</h2> <p>Text</p> </div> <div class="event"> <h2>Title</h2> <p>Text</p> </div> <div class="event"> <h2>Title</h2> <p>Text</p> </div> </div> I would like, that it would rotate the automatically in the certain time period, when the user is on the page, and also that user can rotate it left and right with a click on an arrow. I tried to use this http://jquery

Autorotate ignored when changing tabs

帅比萌擦擦* 提交于 2019-12-03 21:51:29
I have an application with a UITabBarController, each of the tabs has a UINavigationController "attached" to it. Now lets assume that the rootViewControllers (of the navigationControllers) in Tabs 1,2 and 4 only support the portrait orientation and have such a "shouldAutorotateToInterfaceOrientation" implementation that only returns YES when asked to rotate to portrait. Tab 3 however has some viewControllers in its navigationController that support landscape orientation. When I am in tab 3 now and move to one of the viewControllers that support landscape I am able to turn the device and the

Autorotating video played from HTML5 <video> in UIWebView

折月煮酒 提交于 2019-12-03 20:21:52
问题 My app, for some reasons, only supports portrait orientation. However, in some cases I need to display videos from a UIWebView (with video tag) and it would be nice if the user can view it either in portrait or landscape. The controller is configured like this: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return UIInterfaceOrientationIsPortrait(toInterfaceOrientation); } Result : the video is played only in portrait mode (ok, quite expected).

iOS 6 UIInterfacePortrait ONLY viewcontroller being presented & stuck in landscape… when coming back from a landscape viewcontroller in nav stack

和自甴很熟 提交于 2019-12-03 14:52:54
问题 So like many others, I ran into the problem of only having one or two viewcontrollers support both portrait and landscape interface orientations, in an otherwise portrait only app. Everything worked fine prior to iOS 6, but suddenly autorotating stopped working. Thanks to some great questions here, I was able to resolve that issue by having the initial navController return the individual topViewController's preference for shouldAutorotate via: - (BOOL)shouldAutorotate { return self

iOS 6 auto rotation issue - supportedInterfaceOrientations return value not respected

拜拜、爱过 提交于 2019-12-03 13:00:07
I've got an app where I have a UINavigationController subclass as my rootViewController . I've got a UITableViewController that lets the user edit some settings, it should always be in portrait mode. My app also needs to support all other orientations after I push a MoviePlayer component onto the navigation controller. The UITableViewController subclass has this implementation of supportedInterfaceOrientations: - (NSUInteger)supportedInterfaceOrientations { LLog(); return UIInterfaceOrientationMaskPortrait; } The logging command tells me that this gets actually called. The problem is that the