Hey,
I have the following code:
 -(void)viewWillAppear:(BOOL)animated {
    UIDeviceOrientation orientation = [[UIDevice currentDevice] UIInterface];
    if(orientation==UIDeviceOrientationLandscapeLeft || orientation==UIDeviceOrientationLandscapeRight) {
        NSLog(@"Device Landscape");
    } else {
        NSLog(@"Device Portrait");
    }
 }
This works perfectly for the simulator and on the device but ONLY if the iPad is not flat on a surface, for example if i lay the ipad on my desk and load the view it will say its FaceUp and so i cant detect the orientation when the view appears.
Any ideas of the best way to detect the interface orientation when the viewWillAppear is called??
Thanks