Skip to content

Commit

Permalink
Merge pull request #5 from NOUSguide/master
Browse files Browse the repository at this point in the history
iOS 6 Rotation-Bug
  • Loading branch information
myell0w committed Dec 20, 2012
2 parents f8a43fd + 8b91d39 commit 4cd7701
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions MTZoomWindow.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ - (id)initWithFrame:(CGRect)frame {
_zoomGestureRecognizers = [NSMutableSet set]; _zoomGestureRecognizers = [NSMutableSet set];
// using setter on purpose here // using setter on purpose here
self.zoomGestures = MTZoomGestureTap | MTZoomGesturePinch; 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 // register for orientation change notification
[[NSNotificationCenter defaultCenter] addObserver:self [[NSNotificationCenter defaultCenter] addObserver:self
Expand Down

0 comments on commit 4cd7701

Please sign in to comment.