Questions tagged [uideviceorientation]

134 questions
21
votes
3 answers

UIDeviceOrientationFaceUp - how to distinguish between portrait and landscape?

I'm trying to find out if the device is in portrait or landscape mode. My code works quite well if the device is not facing up. If it does face up (and orientation == 5), it won't distinguish between portrait and landscape. Is there anyway to…
n.evermind
  • 11,944
  • 19
  • 78
  • 122
19
votes
4 answers

when iphone Device orientation is face up/down, can I tell if it´s landscape or portrait?

I got this code that if the device is in landscape left/right or upside down it rotates and shows another view controller. but if it´s in the orientation face up or face down, then how can I tell if it´s in landscape mode or portrait? cause I only…
Tom Lilletveit
  • 1,872
  • 3
  • 31
  • 57
18
votes
11 answers

Get device current orientation (App Extension)

How to get device current orientation in an App Extension, I have tried below two methods but no success. It always return UIDeviceOrientationUnknown [[UIDevice currentDevice] orientation] It shows red message that ‘sharedApplication’ is not…
12
votes
3 answers

Disable taking images in any orientation other than Portrait AVFoundation

I am using AVFoundation to show the camera. I would like to prevent the camera itself to rotate so the viewer will see the camera only in portrait and the images will be taken only in portrait mode. I defined Supported Interface Orientation to…
Dejell
  • 13,947
  • 40
  • 146
  • 229
8
votes
3 answers

Change or disable the iPhone rotating animation when orientation changes

How do I change or disable the rotating animation when screen orientation changes from landscape to portrait, or vice versa?
Aldrich Co
  • 587
  • 6
  • 21
7
votes
1 answer

[UIDevice currentDevice].orientation == UIDeviceOrientationUnknown following UINavigationController push

This is an observation more than anything, because I appear to have found a work-around... The code below fails to work when it's in a controller which has been pushed onto a UINavigationController stack. In this situation [UIDevice…
7
votes
2 answers

How can I detect device orientation when the Orientation Lock is on and the app only supports Portrait

The issue that I'm running into is that when a user takes a photo with our app, using AVCaptureSession, I have no way of determining whether they took the photo in Portrait or Landscape mode. Our app only supports Portrait and I keep the Orientation…
jer-k
  • 1,413
  • 2
  • 12
  • 23
6
votes
1 answer

Restoring Auto-Rotate after Forcing Orientation in Swift

In my iPhone app I have a view that I want to show only in portrait mode. When navigating to that view it should be automatically displayed in portrait view. When navigating away, the orientation should change back to what it was, or, if the device…
user3386180
5
votes
4 answers

How to manually set the device orientation when App Deployment Info portrait is locked?

I dont want my app to be landscaped and always be porttrait.So i made my app Deployment Info to set portrait only. but when i need to display any image or videos in my app,i need landscape mode for better display. I can detect the device orientation…
user3745996
5
votes
1 answer

upSideDown iPhone orientation is not working in iOS 6?

hope you will be fine and doing your best. I am getting a problem in upSideDown Orientation in my iOS 6, while I think I am doing everything perfect, but I don't know why it is not working for me. I am sharing my problem with you so to get any…
4
votes
2 answers

Facebook iOS SDK Dialog Keyboard Issue

I am trying to publish a Facebook post to a users publish stream via a feed dialog in an iPad App. [_facebook dialog:@"feed" andParams:params andDelegate:self]; When I tap the area to input a message, the keyboard appears and when I tap the box…
thm
  • 524
  • 1
  • 5
  • 10
4
votes
4 answers

Prevent UIViewController from rotating when modal is rotating

My App is basically a portrait only app. So nothing is rotating. But not there is ONE exception. The user can add photos and when viewing those photos full-screen, this ViewController SHOULD be allowed to rotate. So I thought that if my…
Georg
  • 3,664
  • 3
  • 34
  • 75
4
votes
2 answers

How to detect iOS device orientation from background?

I am working on an app for a client that runs in the background. It's not an app store app, so it does not have quite the same rules that normally apply to app store apps. Even private APIs are an option for this app, but it must run on a…
Duncan C
  • 128,072
  • 22
  • 173
  • 272
4
votes
1 answer

UIViewController animations wait until animation complete

I'm using this observer: UIDeviceOrientationDidChangeNotification to detect when user is changing the device orientation. When the orientation changed to landscape I present a new UIViewController or dismiss this UIViewController when he changes it…
ytpm
  • 4,962
  • 6
  • 56
  • 113
4
votes
3 answers

Camera is not rotating properly in iOS8 beta for old projects

I'm working on an iOS Application which is created using older X-Code version, so it has window in MainWindow.xib. Recently when I run this project in iOS8 Beta version, I got a problem: window is not rotating in landscape orientation. So I have…
Ashok
  • 5,585
  • 5
  • 52
  • 80
1
2 3
8 9