For my business purpose we have to place Apple TV in portrait mode. How can I create an app that have portrait orientation?.
The concept from an SDK perspective does not exist. None of the rotation-related methods from iOS made it over to tvOS, and for a good reason. With that said, there is still a small segment where it could be useful to have your tvOS application being rendered with more vertical than horizontal space.
You can read this post for some help.
Related
I am creating a game for google assistant using actions builder and interactive canvas (Phaser 3 Framework). I have two questions:
How to handle device orientation as most smart displays are in landscape orientation while smartphones are in portrait orientation.
I can create two games, one in portrait mode and another in landscape mode. Is there any way by which I can do conditional loading of interactive canvas game url? for eg: portrait mode game for smartphones and landscape mode game for smart displays?
Please note that I already tried adding multi resolution support in the game but the graphics and design is in such a way that it doesn't look good.
Thanks-in-advance
There's no direct way to do this. One potential workaround you could use is checking if the device supports the actions_capability_web_browser capability, which is only available on phones and not smart displays.
I have implemented one universal iOS app for both iPad & iPhone that supports iOS6 & iOS7 in Portrait mode.
Now my new task is to support landscape mode for this app also.
These views are not Auto Layout enabled.
My question is, Is there any great solution for orientation instead of implementing all orientation methods and writing code in each UIViewController class?
I have used too many controls in each XIB file.
Please make suggestions to me.
Autolayout is probably your best option. If you haven't been exposed to autolayout before I suggest reading a tutorial on RayWenderlich.com and watching the autolayout videos from the past 2 or three WWDC's. Several of the 'beginning autolayout' videos address the problem your facing.
I have developed a web app/website for the iPad but I can not get it stay in a fixed portrait view only.
I do not want it to rotate and work in landscape mode, because of the way the app has been designed.
I've tried various configurations of the viewport settings but that still has not worked.
I'm not very good at JavaScript so a copy paste option would be best or something in CSS/HTML.
Thanks in advance.
Unfortunately, there is no way to explicitly "lock" the orientation of a web-app in Mobile Safari, as you can also see from the link that Alex posted above in the comment:
How do I lock the orientation to portrait mode in a iPhone Web Application?
However, you can have multiple CSS files for different screen orientations. There's a handy JavaScript snippet that you can copy-paste here:
http://www.catswhocode.com/blog/10-useful-code-snippets-to-develop-iphone-friendly-websites
This should at least allow you to design around the rotation without having to use JS but just CSS.
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.
I'm not a super awesome designer so this new paradigm has me a little cranky. The iPad is not supposed to have a standard orientation, and should/shall display screen contents at whichever orientation the user decides. This has me sort of stumped. I can keep my UI designed the way I want it in landscape mode, but switching to portrait, I just can't determine the best way to present app content.
I know it's all speculation at this point, but what are the chances we can override the autoRotateToOrientation to only include the orientation of our choice? Apple ignored the HIG on a lot of issues for iPhone, including splash screens, saving state, etc.
I know we can't really argue with Apple, but doesn't it sound slightly ridiculous to reject an app because it won't rotate to portrait?
I've come a long way porting some code to iPad and it works great in landscape mode. I guess only time will tell. What do you all think?
This video: Designing for the iPad from the free Stanford iPhone Programming course might interest you.
If you also registered for the paid iPhone developer program, then I believe there's also the HIG available for the iPad in the site.
Why not design your UI to be fluid? Keep the most important elements high in the hierarchy and let the others flow further down the screen when viewing in portrait mode?