From 588452d21d9dd4e7fe3ac373fd2eca32e89df415 Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Wed, 15 May 2013 17:53:59 -0700 Subject: [PATCH] Workaround iOS glitch that requires using view's bounds, not frame, in order to ignore the device orientation. --- OpenWatch/OWCaptureViewController.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenWatch/OWCaptureViewController.m b/OpenWatch/OWCaptureViewController.m index 0844809..ff22d45 100644 --- a/OpenWatch/OWCaptureViewController.m +++ b/OpenWatch/OWCaptureViewController.m @@ -96,16 +96,16 @@ - (void)viewDidLoad - (void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - self.videoPreviewView.frame = self.view.bounds; + + self.videoPreviewView.frame = self.view.bounds; CGFloat buttonWidth = 100.0f; CGFloat buttonHeight = 45.0f; CGFloat padding = 10.0f; CGFloat labelWidth = 100.0f; CGFloat labelHeight = 30.0f; - // What's the deal with this iOS bug - CGFloat frameWidth = self.view.frame.size.height; - CGFloat frameHeight = self.view.frame.size.width; + CGFloat frameWidth = self.view.bounds.size.width; + CGFloat frameHeight = self.view.bounds.size.height; self.uploadStatusLabel.frame = CGRectMake(frameWidth - labelWidth - padding, padding, labelWidth, labelHeight); self.recordingIndicator.frame = CGRectMake(padding, padding, 35, 35);