Questions tagged [uiinterfaceorientation]
The orientation of the application's user interface in Apple OS.
969
questions
1
vote
1answer
31 views
UIViewController landscape orientation changes when Camera is opened in portrait mode
My iPad application is in Landscape. From ViewController1 I presented ViewController2. From there when camera is opened with UIImagePicker (while keeping the device in portrait mode), ViewController2 ...
0
votes
1answer
29 views
How do I know/get the list of supported orientations for my iOS app?
As a developer, I know the list of orientations added in the Project settings/plist for my iOS app, but I would like to know the list of supported orientations from the code.
For eg., one of the 3rd ...
0
votes
1answer
50 views
Swift: Enable landscape for one controller and for the rest only portrait
My application was only in portrait mode, but I need a controller to also support landscape.
Here my info.plist:
<key>UISupportedInterfaceOrientations</key>
<array>
&...
0
votes
0answers
22 views
Capture Image Orientation Issue
This is regarding image orientation when captured with the device rotation lock on.'
self.photoOutput.connection(with: AVMediaType.video)?.videoOrientation = self.stillImageOrientation
I have self....
0
votes
1answer
59 views
UIPageViewController where to implement setViewControllers(..:) method
So I have a UIPageViewController where I want to implement the spineLocation to be .mid if the device is in landscape and .min for portrait, therefore showing two controllers in landscape and one in ...
0
votes
0answers
106 views
Stop few screen landscape orientation in Swiftui
I am using SwiftUI and Swift in my application. Few screens are expected to support both landscape or portrait orientation.
In Swift, i am using below code to support landscape and portrait ...
0
votes
1answer
32 views
How to restore right orientation of the UIViewController after orientation was forced to landscape by another (iOS)?
The problem I am having is a bit strange and I can't seem to find any good solutions out there. So I have two UIViewControllers, one is allowed to take all orientations, another can only be viewed in ...
1
vote
1answer
30 views
ios app run on ipad, launchscreen.storyboard Rotate screen issue
iOS app ,set to allow only vertical screen, when running on iPad, when iPad is in horizontal screenļ¼display is incomplete.
0
votes
1answer
30 views
Date pickers selection's overlay not adjusting when screen rotates
I've got a view with two date pickers set to cover the entire view's height and half a width each, so that they are filling the entire view.
I've then added an overlay to each picker to make the ...
1
vote
0answers
78 views
Why viewDidLayoutSubviews and viewWillLayoutSubviews is not getting called in view controller
I have a viewcontoller Called P. Whenever I rotate the screen , viewDidLayoutSubviews is getting called in P.
But sometimes it's not getting called in P and I don't why it happens like that and I don'...
3
votes
5answers
949 views
iOS part of viewcontroller goes black when orientation changes
When I change viewcontroller orientation while it's loading on particular orientation, part of the screen goes blank at the bottom.
Steps to reproduce:
Have tableview(Not necessary I think. could be ...
0
votes
1answer
65 views
Image assets how to specify different images for portrait and landscape
xcode project has image assets we can specify image for both iPhone and ipad for a single image name
Is it possible I can specify image for portrait and landscape for iPhone and iPad separately
Any ...
1
vote
1answer
67 views
Is Apple's documentation on ARCamera.transform orientation backwards?
I'm having a hard time grasping the Apple documentation regarding the ARCamera.transform.
Excerpt:
In camera space, the x-axis points to the right when the device is in ...
0
votes
1answer
198 views
iOS 13 orientation changed forcefully
I have an app and it's working fine as expected in iOS 12 and below. I am only supporting portrait mode in my app. Now in iOS 13 what happens is If I open camera to capture video and rotates the ...
0
votes
1answer
421 views
Supported Interface Orientations in info.plist seem to block calls to shouldAutorotate
Iām designing an iPad/iPhone application in which the interface is designed to look as good in landscape as in portrait, and Iād like the interface to appear at launch as gracefully in one orientation ...
0
votes
1answer
404 views
How can I turn my flutter app left or right of landscape based on user phone orientation?
I made my application go into landscape mode when using
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeRight,
DeviceOrientation.landscapeLeft,
]);
But I cannot make ...
0
votes
2answers
35 views
iPhoneXR returning to rootview controller after rotation
I currently have a bug that has been reported only on the iPhone XR.
We have a custom camera that forces the rotation into Landscape, and when it is complete, it forces the view back to portrait.
...
-1
votes
2answers
45 views
Device Orientation not removed after Closing Video Player
This is what I am facing issue.
My whole app is in Portrait Mode When a video plays in full screen and user rotate the device its default behavior rotates to landscape mode on clicking the screen/...
1
vote
0answers
84 views
Obtaining safeAreaInsets for interface orientations?
I am using safeAreaInsets to respect iPhone X's notch and reserved menu areas.
This works great for when loading the view since the view is in the current interface orientation.
However, I need to ...
3
votes
2answers
80 views
Complex Multi-Device Orientation Handling
I have a universal application running both on iPads and iPhones. The application starts with a .xib file, built in interface builder, which acts as the launch image. Once the app launched, it ...
0
votes
1answer
55 views
Disabling autorotation for specific UIView iOS 12
How do I allow one subview of my view controller to autorotate on an orientation change, but keep the others static. I'm trying to get an effect similar to the native camera app where the capture and ...
4
votes
0answers
384 views
iOS ARKit app: How do I rotate the UI (screen) without rotating the camera view inside?
I'm trying to make an iOS app featuring some AR experience using ARKit. The app now has a start-up view with a "start" button (which shows first after the app is just launched) and a AR View (which ...
2
votes
1answer
53 views
Why I can't force UIViewController orientation on iPad to be portrait as a framework developer?
our client specified that the only available orientation for the device should be in portrait mode. It is easy to set that in the application, but I am developing a framework. This is why I add the ...
1
vote
2answers
47 views
Swift: Orientation Change with PushViewConteroller
I want to change the orientation of the View When it push from one ViewController to other view controller. Like when it push it should be change into the portrait to landscape.
I try to this code ...
0
votes
1answer
330 views
How to disable paging of UIPageViewController only for landscape orientation?
I have a scroll transition style UIPageViewController that needs to disable paging only when device is in landscape orientation. But paging should be enabled in portrait orientation.
I have ...
0
votes
1answer
243 views
How to get and use UIInterfaceOrientation items from info.plist?
I would like get the item0 of the supported interface orientations in my info.plist.
In order to have something like this:
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
...
1
vote
0answers
423 views
Present one view in landscape mode in an otherwise portrait mode app
I have an application (iPhone only) that is portrait-only, but with one exception, a view that must be displayed in landscape mode.
I have implemented the technique described in the accepted answer ...
-1
votes
1answer
493 views
How do I get an output for UIInterfaceOrientation?
I would like to be able to get the orientation of my iOS application's view using UIInterfaceOrientation.
This is different to UIDevice.current.orientation as that returns how the device should ...
1
vote
1answer
43 views
How do you hold all the items of a collectionView in place when the device rotates without locking the device in portrait mode?
I would like to build a collectionView that holds all the cells in place when the user rotates the device without locking the device's orientation into portrait mode. I have tried invalidating the ...
1
vote
1answer
118 views
iOS launch screen will appear in portrait instead of landscape
I am creating an iOS app that will support iPhone and iPad in landscape and portrait orientations. I have setup my launch screen storyboard with an ImageView and that appears correctly in both ...
0
votes
2answers
214 views
how to change the position of view on orientation change with just storyboard
I have a view B which comes below view A on Potrait
but when the device changes its orientation to landscape then I want the view B to be horizontally paralell to view A
I am able to do this by ...
0
votes
1answer
231 views
iOS: Handle Orientation change without enabling landscape mode on View Controller
My Swift app's View Controller is fixed to portrait mode at all times, but the View Controller has an embedded AV video player (added as a child view controller) which should switch to fullscreen mode ...
0
votes
1answer
40 views
App changes to different controller view when changing orientation
I'm developing an app using Xcode 9.2 and swift 4 and I needed to allow just one view in my app to change to landscape, so I added the code below to my AppDelegate
func application(_ application: ...
0
votes
1answer
338 views
UIView.isHidden not working when changing orientation using viewWillTransition
I'm trying to change orientation with just one view, the rest are anchored to Portrait. I've set a method in my AppDelegate as below
func application(_ application: UIApplication, ...
2
votes
1answer
893 views
iOS autorotate is not working when you have different orientation screens
I am working on an App which is written in Objective-C. I have more screens and all screens are Landscape Left and Landscape Right orientations and these screens must not be in portrait mode. But I ...
2
votes
2answers
857 views
AVPlayerViewController messes up underlying modal view controller in popup on iOS10
I have an app (supported interface orientation - portrait only) with the next hierarchy of modally presented view controllers:
A -> B -> AVP
Where A is a view controller sitting in tab bar ...
-1
votes
1answer
52 views
Orientation acting weird when programmatically setting it up
I have an issue with device orientation. I have a UITabBarController and I need all tabs to be Portrait except 1 tab that needs to be LandscapeRight.
I got it to work partially but consider this ...
0
votes
0answers
239 views
Swift: How to make a custom view update elements to its size
I have a custom view using the CVCalendar pod (https://github.com/CVCalendar/CVCalendar) that lays out dates within a UIView (calendarView). This works as expected when the view is loaded either in ...
1
vote
1answer
273 views
InputAccessoryView of UITextField disappears on rotation
I have a picker for inputView of a textfield, and a toolbar for inputAcessoryView of a textfield. When the orientation changes from portrait to landscape, the toolbar disappear and when i change it ...
1
vote
1answer
58 views
Swift 2: App crashes during rotation
i have reloaded the view that contains table view. But when i keep on rotating the table view frequently the app crashes saying:
Terminating app due to uncaught exception 'NSGenericException', reason: ...
2
votes
1answer
623 views
iOS App crash when it comes back to previous UIViewController
I have the same issue described in this question (link) but in my case I'm using AVPlayerViewController instead MPMoviePlayerController, so I tried to apply the same logic of the answer but AVPlayer ...
0
votes
5answers
481 views
How to enable landscape orientation only for 6 and 6Plus device programmatically?
I am doing an iPhone project where i need to portrait and landscape support only for 6,6 Plus and iPad ? Landscape won't work for iPhone 4,5 series.
How to do it programmatically in Objective c?
1
vote
1answer
18 views
How to upload an app without having landscape mode through AppLoader?
I am trying to upload an Universal app which supports only Portrait mode. But while uploading the package through AppLoader, it's want me to enable Landscape mode. But I don't want to support ...
2
votes
3answers
3k views
programmatically change orientation from Landscape to Portrait Mode xamarin IOS
I am developing an app with Xamarin MVVMCross technology and would like to ask a question about InterfaceOrientation option: all view controllers of application support all orientations but one should ...
0
votes
2answers
439 views
Programmatically rotate iOS app upside down using objective-c
I want to rotate my app upside down portrait using the following code in the ViewController:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{ //return ...
0
votes
0answers
96 views
Is there any way to force Portrait UIInterfaceOrientation for full screen video
I was searching it but could not found a solution. I want to support only UIInterfaceOrientationPortrait for the application. However, there is a VC for playing video. I am using these for other VCs
...
0
votes
1answer
121 views
Support all orientations without autorotate in iPhone
The view right after the launch screen is required to be presented in the device's orientation but should not autorotate to other orientations once it is presented. I used this code :
- (BOOL)...
0
votes
1answer
82 views
Rotate only between landscapeLeft and landscapeRight
I have vidoe playing in landscape mode. And the view only rotate between landscapeLeft and landscapeRight when the device orientation changes. That's to say there is no portrait mode when playing the ...
0
votes
0answers
21 views
NSLayoutConstraints for portrait orientation in vc1 reported as broken when vc2 is presented in landscape
I have an app for iPhone which was designed for portrait orientation only. With one view controller as an exception - this one has to be always in landscape.
I present landscape vc2 modally from ...
0
votes
1answer
124 views
Frame of transformed UIView mess up after multiple orientation changes
I have an app with a photo library viewer. In the app you can select a photo and using gestures scale and pan around the photo. I do this by changing the affine transform of the UIImageView containing ...