Giter VIP home page Giter VIP logo

msicc / ios16orientationlocksample Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 166 KB

With iOS 16, Apple made some old APIs non-functional. This includes also the established way of locking the orientation. In this blog post, I am going to show you how you can lock orientation on iOS 16 while the app is running with both .NET MAUI and Xamarin.Forms.

Home Page: https://msicc.net/how-to-lock-orientation-at-runtime-on-ios-16-with-net-maui-and-xamarin-forms/

License: MIT License

C# 100.00%
dotnet ios maui orientation xamarinforms orientation-lock

ios16orientationlocksample's Introduction

ios16orientationlocksample's People

Contributors

msicc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ptittof57

ios16orientationlocksample's Issues

Locking not possible on iPad

Thank you for posting that article - it really works great for iPhones.
But it seems that it is not possible on iPads to lock the orientation.

RequestGeometryUpdate shows following error:
"The current windowing mode does not allow for programmatic changes to interface orientation."

After that error the screen is not locked - rotating is still possible.

Tested with an iPad simulator with iOS 16:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.