# Changing orientation for a view

**URL:** <https://forum.xojo.com/t/changing-orientation-for-a-view/50865>\
**Category:** iOS\
**Created:** [October 25, 2019, 7:58am UTC](https://forum.xojo.com/t/changing-orientation-for-a-view/50865 "2019-10-25T07:58:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefania\_Georgiadi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@Stefania\_Georgiadi](https://forum.xojo.com/u/Stefania_Georgiadi)\
**Post date:** [October 25, 2019, 7:58am UTC](https://forum.xojo.com/t/changing-orientation-for-a-view/50865/1 "2019-10-25T07:58:21Z")

</div>

I have an app that is all on portrait, but there are 2-3 views that should be only landscape. I made a new iosScreen with landscape orientation and I tried to use this code to change the screen and view when a button is pressed:

```auto
Dim s as new iPhoneScreenLand
App.CurrentScreen.Content=s.Content
Dim v as new vMap
self.pushTo(v)
```

And apart from going through the open event twice (as the content of the iPhoneScreenLand is vMap) it doesn’t do anything. It opens the view, but it stays portrait.  
What should I do?

---

<div class="post-metadata">

**Author:** ![Jeremie\_L](https://forum.xojo.com/user_avatar/forum.xojo.com/jeremie_l/32/150_2.png) [@Jeremie\_L](https://forum.xojo.com/u/Jeremie_L)\
**Post date:** [October 25, 2019, 1:04pm UTC](https://forum.xojo.com/t/changing-orientation-for-a-view/50865/2 "2019-10-25T13:04:21Z")

</div>

Unfortunately this doesn’t seem to be possible using Xojo.

I have tried several times and never found a solution. Maybe @Jason King ?

---

<div class="post-metadata">

**Author:** ![Stefania\_Georgiadi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@Stefania\_Georgiadi](https://forum.xojo.com/u/Stefania_Georgiadi)\
**Post date:** [October 25, 2019, 4:55pm UTC](https://forum.xojo.com/t/changing-orientation-for-a-view/50865/3 "2019-10-25T16:55:27Z")

</div>

I really hope there is a way, as the app is almost ready to go…

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [October 25, 2019, 5:07pm UTC](https://forum.xojo.com/t/changing-orientation-for-a-view/50865/4 "2019-10-25T17:07:28Z")

</div>

> [@460260:@Stefania Georgiadi](#):
>
> I really hope there is a way, as the app is almost ready to go…

File a bugreport (or search for case ) you may get response from the developers

---

<div class="post-metadata">

**Author:** ![Jason\_King](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@Jason\_King](https://forum.xojo.com/u/Jason_King)\
**Post date:** [October 30, 2019, 11:21am UTC](https://forum.xojo.com/t/changing-orientation-for-a-view/50865/5 "2019-10-30T11:21:25Z")

</div>

[quote=460201:@Jeremie Leroy]Unfortunately this doesn’t seem to be possible using Xojo.

I have tried several times and never found a solution. Maybe @Jason King ?[/quote]  
I was never able to do this either. Maybe with some clever view transforms it could be emulated? But the way Xojo handles screens is too restricting. I have a feedback case from 5-6 years ago to add useful events to iOS. Doubt its ever going to happen.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [October 30, 2019, 11:26am UTC](https://forum.xojo.com/t/changing-orientation-for-a-view/50865/6 "2019-10-30T11:26:24Z")

</div>

Beyond feasability, which indeed does not seem possible, an app that would require the user to rotate his device to go from portrait to landscape and back seems like a strange design.

Why not elect instead to do everything in landscape ?

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [April 29, 2021, 4:08pm UTC](https://forum.xojo.com/t/changing-orientation-for-a-view/50865/7 "2021-04-29T16:08:46Z")

</div>


