970 questions
2
votes
1
answer
1k
views
How to use requestGeometryUpdateWithPreferences in Objective C
I have an example in Swift language:
guard let windowScene = view.window?.windowScene else { return }
windowScene.requestGeometryUpdate(.iOS(interfaceOrientations: .portrait)) { error in }
I ...
1
vote
0
answers
715
views
Have anyone experienced same error log in related with view controller orientation in iOS16?
I know that I should use supportedInterfaceOrientations and setNeedsUpdateOfSupportedInterfaceOrientation method instead of shouldAutorotate and attemptRotationToDeviceOrientation.
Above reason, I ...
3
votes
1
answer
2k
views
How to replace shouldAutorotate, now deprecated in iOS16. Any examples?
I am have trouble trying to update our app from relying on "shouldAutorotate". We are using Objective C.
Currently, in iOS15, the "shouldAutorotate" updates the location and size ...
25
votes
8
answers
23k
views
is Force View Controller Orientation working in iOS 16 beta
According to the iOS & iPadOS 16 Beta 3 Release Notes:- Attempting to set an orientation on UIDevice via setValue:forKey: isn’t supported and no longer works. Instead, they say use: ...
5
votes
2
answers
7k
views
Wrong Interface Orientation Reported in iOS 16
I have been using the following to detect the current interface orientation in iOS 14/15:
UIApplication.shared.windows.first!.windowScene!.interfaceOrientation
Now in iOS 16 Beta (1 and 2), it is ...
0
votes
1
answer
471
views
Swift 5 UICollectionViewCell Autolayout constraints
I am working on remastering Swift and UIKit after a long time.
WorkFlow:
I have created a ViewController with a UICollectionView aligning its centers in both X and Y axis and Proportional Width and ...
1
vote
1
answer
1k
views
WKWebView changes its content offset scroll after rotation (orientation changed)
When I rotate from Portrait to Landscape on my phone web view changes its scroll automatically almost to the bottom of content on the page.
I've tried reloadInputViews also this code does not work as ...
0
votes
0
answers
52
views
How to enable rotation interface orientation on a specific screen
I have set globally portrait interface orientation in target settings.
But I would like to have all possible interface orientation on a specific view controller only.
Is there a way to do it.
I don't ...
1
vote
1
answer
70
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
1
answer
531
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
1
answer
1k
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
0
answers
141
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
1
answer
366
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
0
answers
257
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
1
answer
547
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 ...