question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Orientation] supportedInterfaceOrientations

See original GitHub issue

React Native needs some way to allow for setting a preferred orientation on a screen by screen basis.

My use case is I have an iPhone app that should be portrait except for the video and picture screens which should allow rotation to landscape.

- (NSUInteger)supportedInterfaceOrientations{
    return UIInterfaceOrientationMaskPortrait;
}

https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/#//apple_ref/occ/instm/UIViewController/supportedInterfaceOrientations

Looks like this could be related to #426

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:27 (18 by maintainers)

github_iconTop GitHub Comments

3reactions
wellyshencommented, Mar 7, 2017

@yamill 's library is not working on RN 0.42.0, I’m looking for a new solution, anyone suggest for it?

0reactions
swaroopa94commented, Apr 28, 2017

Same issue in 0.43.0 any updates how to solve this

Read more comments on GitHub >

github_iconTop Results From Across the Web

supportedInterfaceOrientations - Apple Developer
Notifies the view controller about a change in supported interface orientations or preferred interface orientation for presentation.
Read more >
How to lock a view controller's orientation ... - Hacking with Swift
To configure this, you need to override the supportedInterfaceOrientations property in your UIViewController subclass, returning whichever ...
Read more >
Set the Supported Device Orientation - Medium
The supportedInterfaceOrientations is an instance property that returns all of the interface orientations this view controller supports.
Read more >
Forcing an orientation in iOS - Nuno Alexandre
Most SO answers suggest to override preferredInterfaceOrientationForPresentation , supportedInterfaceOrientations , and shouldAutorotate .
Read more >
Understanding UIViewController Rotation - gists · GitHub
A view controller can override the `supportedInterfaceOrientations` method to ... ViewController screen is now rotating again as device orientation changes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found