uiinterfaceorientation

iPhone landscape issues

我怕爱的太早我们不能终老 提交于 2019-12-20 07:26:25
问题 xcode:4.5.2 I want to create an application in iPad; I settings my info.plist as below: Initial interface orientation: Landscape (left home button) When I started my app, the orientation device have landscape mode, but my view not rotate to this orienatation. I don't know what it is, who can help me 回答1: are you implements these following methods. -(BOOL)shouldAutomaticallyForwardAppearanceMethods{ // This method is called to determine whether to // automatically forward appearance-related

Issue with device orientation and UIView during startup

半世苍凉 提交于 2019-12-20 07:11:58
问题 I'm working on a project in which when the user press a button a video will be played, I have to program this app for all orientations. I have added images as background for buttons given those buttons position based on the size of the superview like this: button1.frame = CGRectMake(0.15 * (self.view.frame.size.width),0.15 * (self.view.frame.size.height), 0.2 * (self.view.frame.size.width), 0.2 * (self.view.frame.size.height)); When I start the app in portrait it's view is fine and also when

Need help setting up an interface where rotation is fixed for most elements, but alert and sharing boxes auto-rotate with the device

≯℡__Kan透↙ 提交于 2019-12-20 03:31:38
问题 I'm working with Xcode 7 and Swift 2. I am working on an interface with a camera preview layer and controls that display in a manner similar to the native iOS camera app. The controls all stay in place as you turn the device, but the icons "pivot" in place to orient properly for the device orientation. (I hope I explained that in a way that makes sense. If not, open the native camera app on your iPhone and turn the device around a few times to see what I'm talking about.) I have the basic

Trick preferredInterfaceOrientationForPresentation to fire on viewController change

风格不统一 提交于 2019-12-19 17:43:36
问题 I am using MSNavigationPaneViewController from here and have rotation sort of working. I've overridden the rotation methods in my root UINavigationController -(BOOL)shouldAutorotate { return YES; } -(NSUInteger)supportedInterfaceOrientations { AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; if (appDelegate.topViewController != nil) { return [appDelegate.topViewController supportedInterfaceOrientations]; } else { return UIInterfaceOrientationMaskPortrait

iOS 6.0 restrict auto rotation within a navigation controller?

送分小仙女□ 提交于 2019-12-19 04:15:13
问题 What else should I do? -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) toInterfaceOrientation { return (toInterfaceOrientation == UIInterfaceOrientationPortrait); } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } -(BOOL)shouldAutoRotate { return NO; } My viewController still rotates. It is embedded in a navigation stack. If I subclass UINavigationController, and implement the same portrait-only templates there, and I embed my

Two-stage rotation animation is deprecated. This application should use the smoother single-stage animation

爱⌒轻易说出口 提交于 2019-12-18 15:01:07
问题 I am building a ipad application. when the applications starts i show it in landscape Right mode. But as soon as the application starts I get this message Two-stage rotation animation is deprecated. This application should use the smoother single-stage animation I used this method in all my classes - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); } I also set my supported

how to provide only one view with landscape for MPMoviePlayerController in IOS6

社会主义新天地 提交于 2019-12-18 09:48:19
问题 i had spend 2 hours finding the correct code to fix my orientation problem this are my movieplayer code. i need this particular view to be shown in landscape. in appdelegate i set all orientation and in my rootviewcontroller i set is as portrait only and in my movieplayer view as landscape but not luck. can anybody give me some comment on how to fix the issues please ? - (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window { return

iOS - Lock a specific UIViewController to a specific orientation [closed]

☆樱花仙子☆ 提交于 2019-12-18 08:57:23
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . My application supports every 4 orientation, I have a UIViewController which is in LandscapeRight . I am using UINavigationController to push that UIViewController , i want that UIViewController to be only in UIInterfaceOrientationLandscapeRight but when I rotate the phone, it switches back to

Problem pushViewController from Landscape to Portrait

可紊 提交于 2019-12-18 03:45:36
问题 I am trying to go from a viewcontroller that supports landscape (while in landscape mode), to one that explicitly doesn't (and shouldn't) support landscape. I'm doing this as follows: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return (toInterfaceOrientation == UIInterfaceOrientationPortrait); } Ideally I want the new viewController that i'm pushing onto the stack to start off initially in portrait, not landscape. Strangely even with this

Two lines of text in a UISegmentedControl

雨燕双飞 提交于 2019-12-18 01:13:09
问题 Try as I might, I can't solve a UISegmentedControl bug for an iOS7 iPhone app. When I create the segmented control, I use this code: NSArray *segmentedControlItemArray = [NSArray arrayWithObjects: @"Nominal:\n27 inch", @"Actual:\n700c x 23mm", @"Actual:\n700c x 20mm", nil]; _wheelDiameterSegmentedControl = [[UISegmentedControl alloc] initWithItems:segmentedControlItemArray]; _wheelDiameterSegmentedControl.frame = CGRectMake(0, 102, 290, 50); _wheelDiameterSegmentedControl.selectedSegmentIndex