From ef452522532dc44523a1aab95ccda2ff57a61bca Mon Sep 17 00:00:00 2001 From: zhiyi Date: Tue, 28 May 2013 19:44:14 +0800 Subject: [PATCH] replace 'viewController.view.frame' to 'viewController.view.bounds', to avoid issues in landscape mode. --- Classes/TSMessage.m | 2 +- Views/TSMessageView.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/TSMessage.m b/Classes/TSMessage.m index e49f7d6a..dc198afc 100755 --- a/Classes/TSMessage.m +++ b/Classes/TSMessage.m @@ -280,7 +280,7 @@ - (void)fadeOutNotification:(TSMessageView *)currentView else { fadeOutToPoint = CGPointMake(currentView.center.x, - currentView.viewController.view.frame.size.height); + currentView.viewController.view.bounds.size.height); } [UIView animateWithDuration:kTSMessageAnimationDuration animations:^ diff --git a/Views/TSMessageView.m b/Views/TSMessageView.m index c106100b..2910d00f 100755 --- a/Views/TSMessageView.m +++ b/Views/TSMessageView.m @@ -237,7 +237,7 @@ - (id)initWithTitle:(NSString *)title if (self.messagePosition == TSMessageNotificationPositionBottom) { - topPosition = self.viewController.view.frame.size.height; + topPosition = self.viewController.view.bounds.size.height; } self.frame = CGRectMake(0.0, topPosition, screenWidth, actualHeight);