Skip to content

Commit

Permalink
Workaround iOS glitch that requires using view's bounds, not frame, i…
Browse files Browse the repository at this point in the history
…n order to ignore the device orientation.
  • Loading branch information
danielbdavis committed May 16, 2013
1 parent 95fc15f commit 588452d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions OpenWatch/OWCaptureViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 588452d

Please sign in to comment.