I'm developing an iOS application with latest SDK.
I have set Landscape right orientation as the unique orientation available and I have a question about viewController view.
This is my code:
- (void)viewDidLoad
{
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(deviceOrientationDidChange:)
name:UIDeviceOrientationDidChangeNotification
object:nil];
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != AVCaptureVideoOrientationLandscapeRight);
}
- (void)deviceOrientationDidChange:(NSNotification*)notification
{
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
if (orientation == AVCaptureVideoOrientationLandscapeLeft)
NSLog(@"Orientation: Landscape Left");
else if (orientation == AVCaptureVideoOrientationLandscapeRight)
NSLog(@"Orientation: Landscape Right");
NSLog(@"FRAME: %@", NSStringFromCGRect(self.view.frame));
}
And this is the log that I get:
Orientation: Landscape Right
FRAME: {{0, 0}, {320, 568}}
Orientation: Landscape Right
FRAME: {{0, 0}, {320, 568}}
My question is about {{0, 0}, {320, 568}}
:
Why am I getting these values?
I think the correct values would be {{0, 0}, {568, 320}}
.