开发者

iPhone app 'fake' landscape mode

开发者 https://www.devze.com 2023-01-15 18:56 出处:网络
So after wasting many hours trying to get my app to run in landscape mode by defualt I\'m looking for an alternative.

So after wasting many hours trying to get my app to run in landscape mode by defualt I'm looking for an alternative.

My idea is to create the app in portrait mode but rotate everything by 90 degrees, the player thinks that he is playing the game in landscape mode (when really I've just rotated everything). I recognise it will be a little awkward to develop but I come into all sorts of issues when I try to program 开发者_开发问答for landscape.

My question is, does Apple frown upon this? Could they reject my app for any reason or is this safe to do? Are there any issues I should be aware of?

Advice/articles/help all appreciated.


I do not allow landscape mode in my applications and none of them have been rejected. Sometimes an application does not benefit from being in landscape mode.

EDIT: The same also goes for portrait mode. If your app makes sense only in one orientation or the other, Apple will not reject you.


There is a key you can put into your Info.plist to make it start in landscape (see here). Or have you already tried that?


There are reportedly immersive full screen Open GL games that hide the status bar and do this. Note that you will still need to detect and handle landscape-left and landscape-right rotations or your app might appear upside-down.


Just set an affine transform on your top-level view, and be careful to always use the correct coordinate system.

0

精彩评论

暂无评论...
验证码 换一张
取 消