Orientation in iOS


#1

Hi!

I have set orientation in root/config.xml using this :

But it seems not working in iOS. Is it Ionic issue or Cordova?

It’s kind of urgent. So, temporarily is there any property in xCode for setting orientation mode = default for ionic project?

Thanks!


#2

I don’t exactly know what you mean but if you open the Project in XCode and then click the ‘general’ tab you will find these options under deployment:


#3

I have done this same thing. But it’s not rotating screen.
Can @Woutwo you suggest me why it’s not working?


#4

Hmm, that’s odd. I can’t really come up with something else; I tried this option and everything worked directly.


#5

I made change in classes/MainViewController.m

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
    //AMI++
    return YES; //for supported orientations
    //return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
    }

And it solved.


#6

Hehe, nice one :stuck_out_tongue: