landscape

iphone: Forcefully change orientation from portrait to landscape on navigation

一曲冷凌霜 提交于 2019-12-01 00:21:11
Is there any way that we can Forcefully change app orientation from portrait to landscape while navigating ? I have a requirement that while pushing controller from A to B. B should be in landscape but my A controller is in portrait. In your ViewController-B add this lines of code in viewDidLoad: [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight]; float angle = M_PI/2; //rotate 180°, or 1 π radians self.view.layer.transform = CATransform3DMakeRotation(angle, 0, 0.0, 1.0); This code is working fine if you are using navigation controller to move from

UIAlertView with 3 buttons hides message in landscape mode

独自空忆成欢 提交于 2019-11-30 21:48:38
My UIAlertView has a message and 3 buttons, my problem is the alert view display normally in portrait but it hides message in landscape mode as below screenshots. How to make the message appears? Thanks in advance. I too got same problem, But I solved this, with a small change. like add "\n\n" at the end of Title in the alertView This is not a correct solution. but this will rectify that problem some what. *Note : The Title and the Message should be of one line text. Thanks, Satya By merging the Title String into the Message String you can fit two lines of landscaped text. Localization wise,

UIAlertView with 3 buttons hides message in landscape mode

一曲冷凌霜 提交于 2019-11-30 17:07:12
问题 My UIAlertView has a message and 3 buttons, my problem is the alert view display normally in portrait but it hides message in landscape mode as below screenshots. How to make the message appears? Thanks in advance. 回答1: I too got same problem, But I solved this, with a small change. like add "\n\n" at the end of Title in the alertView This is not a correct solution. but this will rectify that problem some what. *Note : The Title and the Message should be of one line text. Thanks, Satya 回答2:

iPhone: In landscape-only, after first addSubview, UITableViewController doesn't rotate properly

耗尽温柔 提交于 2019-11-30 15:48:52
问题 A minimal illustrative Xcode project for this is available on github. On my UIWindow, when I add second (and subsequent) UITableView's as subviews, they do not rotate properly, and thus appear sideways. This is only tested in the Simulator. Here's a little code for you: - (void)applicationDidFinishLaunching:(UIApplication *)application { ShellTVC* viewA = [[ShellTVC alloc] initWithTitle:@"View A"]; ShellTVC* viewB = [[ShellTVC alloc] initWithTitle:@"View B"]; // The first subview added will

Play video fullscreen in landscape mode, when my entire application is in lock in portrait mode

我怕爱的太早我们不能终老 提交于 2019-11-30 15:07:46
I want to play video in landscape mode in fullscreen. And my application is lock in portrait mode. How to implement this. Please help me. Thanks in advance Pratik Jamariya I've done this in on of my app. To do this you need to check that is your viewcontroller that where you want to play a video. The first thing you have to do is check Device Orientation to Portrait,Landscape left, Landscape right in your project target In your AppDelegate do the below code -(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ UIStoryboard

Is there a way to avoid having fullscreen SearchView/Keyboard on landscape?

徘徊边缘 提交于 2019-11-30 08:50:36
I'm trying to avoid having fullscreen keyboard editing on landscape in order to access to the suggestions. I already read a lot of threads explaining that I have to add EditorInfo flags like flagNoFullscreen and/or flagNoExtractUi . I added them programmatically but not really helpful. Is there a way to figure this out? It took me a while to figure this one out, but it's actually quite simple. Initially I created a custom class that extended the SearchView class, and used a onCreateInputConnection() override, however I couldn't get it working that way. I eventually got it working in a much

Landscape splash screen for Android in PhoneGap Build

∥☆過路亽.° 提交于 2019-11-30 03:01:21
问题 What should I enter to config.xml or what should I do in general, to have PhoneGap Build application's splash screen displayed correctly on Android device in landscape mode? PhoneGap Build (used to compile) docs / blog have nothing on this. Only Portrait is covered for Android. Since first (docs) says that using height and width is cross-platform supported, I tried to use it: <gap:splash src="res/splash-200x320-android.png" gap:platform="android" gap:density="ldpi" width="200" height="320" />

Play video fullscreen in landscape mode, when my entire application is in lock in portrait mode

[亡魂溺海] 提交于 2019-11-29 21:09:19
问题 I want to play video in landscape mode in fullscreen. And my application is lock in portrait mode. How to implement this. Please help me. Thanks in advance 回答1: I've done this in on of my app. To do this you need to check that is your viewcontroller that where you want to play a video. The first thing you have to do is check Device Orientation to Portrait,Landscape left, Landscape right in your project target In your AppDelegate do the below code -(NSUInteger)application:(UIApplication *

Can we make our webpage open defaultly in landscape mode for mobile/tablets using media query/js/jquery?

試著忘記壹切 提交于 2019-11-29 11:59:46
Is it possible to make my web page open default in landscape mode in a mobile or tablet even if the orientation of screen is off using css3 media query or jquery ?? You COULD do this. Wether it is a good idea or not I'll let you decide (hint: it isn't). Check for portrait orientation with CSS and rotate the body if necessary: @media screen and (orientation:portrait) { body { transform: rotate(-90deg); transform-origin: 50% 50%; } rotating the body in this way will not cause it's width and height to update to suit it's new orientation so we will have to correct this with JQuery: function

How to detect landscape left (normal) vs landscape right (reverse) with support for naturally landscape devices?

北城以北 提交于 2019-11-29 09:26:02
What I would like to do: Detect the current layout orientation of the device (Portrait, Landscape-Left, Portrait(upside down), Landscape-Right) Differentiate between the two possible landscape modes (leaning on the left side, leaning on the right side) Support devices that have landscape as their natural state ( for example , discussed here ) Support < 2.2 (can't use getRotation() ) Just to clarify, I want to know what orientation the layout is currently in. Which direction is the bottom of the layout? Is it in portrait? Is it in landscape? Is the landscape left or right? etc. The closest I