Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

iOS 6 Rotation-Bug #5

Merged
merged 1 commit into from

2 participants

Philip Messlehner Matthias Tretter
Philip Messlehner

Fixed an Issue experiencing on iOS 6. Notifications for Rotation won't send any more on Application startup.

Matthias Tretter myell0w merged commit 4cd7701 into from
Matthias Tretter
Owner

Thanks a lot ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 20, 2012
  1. Philip Messlehner
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 0 deletions.
  1. +9 −0 MTZoomWindow.m
9 MTZoomWindow.m
View
@@ -77,6 +77,15 @@ - (id)initWithFrame:(CGRect)frame {
_zoomGestureRecognizers = [NSMutableSet set];
// using setter on purpose here
self.zoomGestures = MTZoomGestureTap | MTZoomGesturePinch;
+
+ // iOS 6 Hacks: willChange and didChange won't get called after launching the Application
+ UIInterfaceOrientation statusBarOrientation = [[UIApplication sharedApplication] statusBarOrientation];
+ if (UIInterfaceOrientationIsLandscape(statusBarOrientation)) {
+ [self setupForOrientation:UIInterfaceOrientationPortraitUpsideDown forceLayout:YES];
+ } else if (statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown) {
+ [self setupForOrientation:UIInterfaceOrientationPortrait forceLayout:YES];
+ }
+ self.frame = [UIScreen mainScreen].bounds;
// register for orientation change notification
[[NSNotificationCenter defaultCenter] addObserver:self
Something went wrong with that request. Please try again.