Absurd Orientations


#1

How do i get rid of this particular orientation? The Device orientation is Portrait while the interface is Landscape. i’ve also been experiencing the vice-versa of this. How does one filter it out. I have returned Portrait and Landscape modes for the interfaces.

-(BOOL) shouldAutorotate{  //overriding. Enabling autorotation.
    
    [self.view setAutoresizesSubviews:YES];
    [slider setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
    
    [imageView setAutoresizingMask:UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth];//Maintaining all the 4 struts i.e side-margins while keeping height and width flexible.
    
    [leftButton setAutoresizingMask:UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleRightMargin];//Maintaining Bottom and Left struts.
    [rightButton setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleTopMargin ];//Maintaining Bottom and Right struts.
    [movingButton setAutoresizingMask:UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleTopMargin]; //Maintaining Bottom and Left struts.
    
    return ((UIInterfaceOrientation)[myDevice orientation]==UIInterfaceOrientationPortrait)||UIInterfaceOrientationIsLandscape((UIInterfaceOrientation)[myDevice orientation]);
}