Permalink
Browse files

correcting screen dimensions for landscape orientations

  • Loading branch information...
1 parent 9cb9309 commit aecf7305ee2d24b429200e3cd8b388e11a918dc4 @benlenarts benlenarts committed with Jul 4, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 Headers/FTUtils/FTAnimationManager.h
View
5 Headers/FTUtils/FTAnimationManager.h
@@ -64,6 +64,11 @@ extern NSString *const kFTAnimationTargetViewKey;
static inline CGPoint FTAnimationOffscreenCenterPoint(CGRect viewFrame, CGPoint viewCenter, FTAnimationDirection direction) {
CGRect screenRect = [[UIScreen mainScreen] bounds];
+ if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) {
+ CGFloat swap = screenRect.size.height;
+ screenRect.size.height = screenRect.size.width;
+ screenRect.size.width = swap;
+ }
switch (direction) {
case kFTAnimationBottom: {
CGFloat extraOffset = viewFrame.size.height / 2;

0 comments on commit aecf730

Please sign in to comment.