Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 6 Rotation-Bug #5

Merged
merged 1 commit into from Dec 20, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions MTZoomWindow.m
Expand Up @@ -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
Expand Down