Force landscape mode

Having issues with forcing landscape… I know how to just make it rotate the first time the screen loads, but because it’s in a tab bar it has to do it also when the tab bar selects it. I set up a protocol to do that but it just doesn’t do anything. It seems the act of rotation only happens when the view did load executes the first time. Even if I do self.viewdidload() nothing happens the second time.

I have the option to just display a “rotate your screen” label when in portrait but would like it if I could make it rotate back and forth and lock across a tab bar controller

Do you want it landscape only? You can simple change it in the project settings fof landscape only

unfortunately no. I have a tab bar controller which switches between 4 different sets of scales on 4 different view controllers. VC 1 and 3 should be portrait, and VC 2 and 4 should be landscape… locked would be great… I’m going to keep working on the problem but I tried 3 different things last night and nothing worked the way I wanted. I should have posted the code I used but I deleted it before thinking it through lol.

You can check what orientation the device is and do something from there.

But you can’t force a rotation (I don’t think) unless you set the entire app to portrait or landscape exclusively.

I’d think about your design, it seems very odd to switch between portrait and landscape depending on which tab you’re on. As a user I’d find that annoying and not a good experience

Hmm… okay well with this tiny font it can work but when they set it in the piano they won’t be able to read it, maybe I should just boost the font size when I detect landscape and let them decide, but then some people won’t even think about the possibility of rotating it… I suppose a label to say rotate for a bigger font? Seems clunky

yeah maybe a simple
“Best viewed when landscape” would be better