orientation

xCode6 incorrect view controller orientation when deployed to iOS7 device

落爺英雄遲暮 提交于 2019-12-11 07:16:10
问题 I'm running into a weird issue when testing an app with deployment target of 7.1 compiled with xCode6 and tested on an iOS 7.1.2 and iOS 8.0.2 devices. A view controller is defined in storyboard with a portrait placeholder. The app supports landscape orientation only. in app delegate: @property (nonatomic,strong) UIViewController* privacyScreen; self.privacyScreen = [kMainStoryboard instantiateViewControllerWithIdentifier:@"privacyScreen"]; [self.window addSubview:self.privacyScreen.view];

iPad Application Comes Up in Portrait Orientation After Screen Unlock Regardless of Orientation on Screen Sleep

给你一囗甜甜゛ 提交于 2019-12-11 06:57:13
问题 I have my iPad application in landscape mode sitting at my desk. When the iPad's screen locks, I unlock the screen. When the application is shown again, the application is in portrait mode and will remain so until I pick up my iPad and move it around to reset the orientation. Is there some sort of check that I should make to leave it in the orientation that it is in when the view appears? 回答1: You can try checking [[UIApplication sharedApplication] statusBarOrientation] and then setting the

Android how to save realm results with onSaveInstanceState for screen rotation

时间秒杀一切 提交于 2019-12-11 06:36:46
问题 My problem is this: When i open dialog fragment, i send realm and realm results from activity to dialog fragment. I always send different realm results to dialog fragment, depending what i click in activity. This is code in dialog fragment where i receive realm and realmResults from activity, when i click to open dialog fragment: public void setChangeNoteListener(ChangeNoteListener mChangeNoteListener, RealmResults<Drop> realmResults, Realm realm) { mNotelistener = mChangeNoteListener;

Is there a way to guarantee resize event fires AFTER orientationchange event (jQuery Mobile, JavaScript)?

允我心安 提交于 2019-12-11 06:21:04
问题 I'm having an issue with iOS, specifically the iPhone, where my jQuery Mobile web app is firing a window resize event BEFORE jQuery Mobile's orientationchange event. I have not seen this occur on Android in my testing, at this point (meaning, it could spring up later). Is there a way I can guarantee the resize event fires AFTER the orientationchange event, perhaps utilizing window.orientation? Thank you. 回答1: Good news and bad news. The bad news is, no, you can't guarantee it. This bugs have

Percentage of height not working for portrait screen orientation

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 06:13:48
问题 I am trying to set percentage for 2 div elements(main and header) contained in the body of html. The problem is that this is not working(the height percentages appearing are wrong) when my screen orientation is portrait. Examples dimensions i am checking are the below: 320x480 320x568 600x800 768x1024 800x1280 I use viewport resizer to check my code. HTML code: <body> <header> <div id="title"> Just a title </div> </header> <main> Main div element here </main> </body> CSS code: html, body{

Media Queries not responding on to Orientation Changes on iPhone 5

倖福魔咒の 提交于 2019-12-11 06:06:15
问题 For some reason, the iPhone 5 doesn't change the layout of my site when it is rotated from portrait to landscape or visa-versa. So, if the page is loaded in portrait view, the portrait media queries I have defined kick at and adjust the site, but then if it is rotated, the layout stays optimized for portrait view. If I manually refresh the page though, the landscape view loads, but won't change to portrait if the phone is rotated, unless it is refreshed again. Here is the basic code from my

What's the correct way to detect a screen rotation from 0 to 180, or 90 to 270?

夙愿已清 提交于 2019-12-11 05:59:08
问题 I'm attempting to orient a camera preview according to the screen's rotation. I've noticed that when rotating directly between orientations with matching dimensions (so, 0 -> 180, and 90 -> 270), the configuration is not changed and the activity is not restarted. I'm currently using Display.getRotation() within Activity.onCreate() , but this information becomes out of date. What's the best way to detect this change so that I can appropriately re-orient my camera preview? 回答1: Use an

Android: Orientation Change Based On Screen Size

只愿长相守 提交于 2019-12-11 05:24:13
问题 I need certain activities of mine to only change to landscape if the screen is big enough. This means tablets and phones with screen size 5.1in+. Is there anyway to do this through overriding onConfigurationChanged(...) and using the XML statement: android:configChanges="orientation" 回答1: You certainly can. You can sniff for the screen size and using an if statement if binary or a switch otherwise to set the orientation of the view manually: Display d = ((WindowManager) getSystemService

iPhone Prevent application to automatically change orientation to portrait when a video stop

删除回忆录丶 提交于 2019-12-11 04:13:43
问题 My application is in landscape mode and I use MPMoviePlayerController to play an sample video. It works fine but when I stop the video with the OK button (or if I wait until the movie ends), the orientation automatically changes to portrait. Is it possible to keep application in landscape mode when the OK button is pushed ? I use the followwing code in my main view controller to force landscape mode : -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

Landscape iAd is showing the portrait graphic in iOS6?

牧云@^-^@ 提交于 2019-12-11 03:48:50
问题 My app runs in the Portrait orientation, but the content inside rotates with the accelerometer. I show an iAd on the bottom of the screen. The iAd changed position as you rotate, but the actual interface does not rotate (shouldAutorotate returns NO, all the rotates are handled in OpenGL). So the iAd is positioned, and then a transform is set to rotate it so it's the correct way up for the user. When the app is in Portrait, it's the portrait ad. When in Landscape, it's the landscape. This has