uiinterfaceorientation

Can I rotate a UIView without the black bars?

六月ゝ 毕业季﹏ 提交于 2019-11-27 07:14:08
问题 I have a UIView that takes up the entirety of the window on the iphone. When it rotates to landscape, the edges get the little black bars until it snaps into place, as i would expect. I want to make that uiview bigger than the screen, so that rotating it doesn't show those black bars but shows the parts of the view that are normally offscreen. I've tried increasing the frame and bounds of the view, but that doesn't seem to do the trick. Has anyone done this succesfully? 回答1: You need to do

Xcode: Getting warning “implicit conversion from enumeration type UIDeviceOrientation”

丶灬走出姿态 提交于 2019-11-27 06:59:46
Full warning: Implicit conversion from enumeration type 'UIInterfaceOrientation' to different enumeration type 'UIDeviceOrientation' Getting it on the line: [self orientationChanged:interfaceOrientation]; This is the method: - (void)orientationChanged:(UIInterfaceOrientation)interfaceOrientation I can't really understand where this warning is coming from. UIDeviceOrientation refers to the physical orientation of the device whereas UIInterfaceOrientation refers to the orientation of the user interface. When you call your method [self orientationChanged:interfaceOrientation]; you are most likely

iPad iOS7 - UIImagePickerController in UIPopoverController has wrong preview image

南笙酒味 提交于 2019-11-27 05:39:25
问题 I am using an UIImagePickerController within an UIPopoverController which is working perfectly with iOS6. With iOS 7 the "preview" image which is shown to capture the image is rotated, but if I take a picture it is saved correctly. This is how I get my picker: UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; imagePicker.mediaTypes = [NSArray arrayWithObjects: (NSString

Why can't I force landscape orientation when use UINavigationController?

你。 提交于 2019-11-27 05:13:30
I find many question to force UIViewController to landscape as default: How to force a UIViewController to Portrait orientation in iOS 6 And try this: - (BOOL)shouldAutorotate { return YES; } -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape; } - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { return UIInterfaceOrientationLandscapeLeft; } But when I use UIViewController inside UINavigationController, I can't force to landscape.Please help! *Work NOT ok - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:

iOS7 iPad Landscape only app, using UIImagePickerController

你离开我真会死。 提交于 2019-11-27 03:23:25
I believe this is a common issue and many answers don't work anymore, many just partial, if you are under iOS7 and your iPad app is Landscape only, but you want to use the UIImagePickerController with source UIImagePickerControllerSourceTypePhotoLibrary or UIImagePickerControllerSourceTypeCamera . How to set it right, so it's working 100%? And you don't get mixed orientations and avoid the error "Supported orientations has no common orientation with the application, and shouldAutorotate returns YES ". If your iPad app is landscape only in all conditions, just do these 3 steps : 1) In your app

What is the “right” way to handle orientation changes in iOS 8?

隐身守侯 提交于 2019-11-27 02:36:44
Can someone please tell me the "right" or "best" approach to working with portrait and landscape interface orientations in iOS 8? It seems that all the functions I want to use for that purpose are deprecated in iOS 8, and my research has turned up no clear, elegant alternative. Am I really supposed to look at the width and height to determine for myself if we are in portrait or landscape mode? For example, in my view controller, how should I implement the following pseudocode? if we are rotating from portrait to landscape then do portrait things else if we are rotating from landscape to

Game center login lock in landscape only in i OS 6

亡梦爱人 提交于 2019-11-27 01:20:14
问题 When Game center is loaded its default orientation is portrait. In order to lock it in landscape mode, added a category. @implementation GKMatchmakerViewController (LandscapeOnly) - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return ( interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); } -(NSUInteger)supportedInterfaceOrientations { return

iOS: Device orientation on load

我是研究僧i 提交于 2019-11-27 00:09:06
It seems that when my app loads, it does not know its current orientation: UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation]; if (orientation == UIDeviceOrientationPortrait) { NSLog(@"portrait");// only works after a rotation, not on loading app } Once I rotate the device, I get a correct orientation, but when I load the app, without changing the orientation, it seems that using [[UIDevice currentDevice] orientation] doesn't know the current orientation. Is there another way to check this when I first load my app? groomsy EDIT: I mis-read your question. This will

RootViewController animation transition, initial orientation is wrong

て烟熏妆下的殇ゞ 提交于 2019-11-26 18:13:47
So I followed this thread: RootViewController Switch Transition Animation to transit the window.rootViewController from A to B to C. Code looks like this: [UIView transitionWithView:self.window duration:0.5 options: UIViewAnimationOptionTransitionFlipFromLeft animations:^{ self.window.rootViewController = newViewController; } completion:nil]; The problem is my app shall only support landscape, but during the rootViewController transition, the new view controller appears in portrait mode than quickly rotate to landscape mode. I'm sure that: I've set UISupportedOrientation to landscape (home

disable autorotate on a single UIViewController in iOS6

折月煮酒 提交于 2019-11-26 13:17:55
问题 I have a project using UINavigationController and segues working properly good, all of them rotate correctly, the thing is... I just want to disable autorotation on a specific UIViewController . I tried this: - (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { return NO; } // New Autorotation support for iOS 6. - (BOOL)shouldAutorotate NS_AVAILABLE_IOS(6_0){ return NO; } - (NSUInteger)supportedInterfaceOrientations { return