From 6882883e214b605b88e85eadbb05a4160c3e7859 Mon Sep 17 00:00:00 2001 From: Cezary Wojcik Date: Wed, 15 Apr 2015 12:16:12 -0700 Subject: [PATCH] 2.2.4 --- CWStatusBarNotification.podspec | 2 +- CWStatusBarNotification/CWStatusBarNotification.m | 10 +++++----- README.md | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CWStatusBarNotification.podspec b/CWStatusBarNotification.podspec index 2620315..b33e2c0 100644 --- a/CWStatusBarNotification.podspec +++ b/CWStatusBarNotification.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "CWStatusBarNotification" - s.version = "2.2.3" + s.version = "2.2.4" s.summary = "A library that creates status bar notifications." s.description = "CWStatusBarNotification is a library allows you to present a beautiful text-based notification in the status bar." s.homepage = "https://github.com/cezarywojcik/CWStatusBarNotification" diff --git a/CWStatusBarNotification/CWStatusBarNotification.m b/CWStatusBarNotification/CWStatusBarNotification.m index 4723d08..6563c50 100644 --- a/CWStatusBarNotification/CWStatusBarNotification.m +++ b/CWStatusBarNotification/CWStatusBarNotification.m @@ -22,7 +22,7 @@ @implementation CWWindowContainer - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { CGFloat height; - if (SYSTEM_VERSION_LESS_THAN(@"8.0") && UIDeviceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { + if (SYSTEM_VERSION_LESS_THAN(@"8.0") && UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { height = [UIApplication sharedApplication].statusBarFrame.size.width; } else { @@ -56,7 +56,7 @@ - (void)setSupportedInterfaceOrientations:(NSInteger)supportedInterfaceOrientati self._cwViewControllerSupportedInterfaceOrientation = supportedInterfaceOrientations; } -- (NSUInteger)supportedInterfaceOrientations +- (NSInteger)supportedInterfaceOrientations { return self._cwViewControllerSupportedInterfaceOrientation; } @@ -223,7 +223,7 @@ - (CGFloat)getStatusBarHeight return self.notificationLabelHeight; } CGFloat statusBarHeight = [[UIApplication sharedApplication] statusBarFrame].size.height; - if (SYSTEM_VERSION_LESS_THAN(@"8.0") && UIDeviceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { + if (SYSTEM_VERSION_LESS_THAN(@"8.0") && UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { statusBarHeight = [[UIApplication sharedApplication] statusBarFrame].size.width; } return statusBarHeight > 0 ? statusBarHeight : 20; @@ -231,7 +231,7 @@ - (CGFloat)getStatusBarHeight - (CGFloat)getStatusBarWidth { - if (SYSTEM_VERSION_LESS_THAN(@"8.0") && UIDeviceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { + if (SYSTEM_VERSION_LESS_THAN(@"8.0") && UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { return [UIScreen mainScreen].bounds.size.height; } return [UIScreen mainScreen].bounds.size.width; @@ -272,7 +272,7 @@ - (CGRect)getNotificationLabelFrame - (CGFloat)getNavigationBarHeight { - if (UIDeviceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation) || + if (UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation) || UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { return 44.0f; } diff --git a/README.md b/README.md index be68611..9ac9c84 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Works for iPhone and iPad. ### CocoaPods -`pod 'CWStatusBarNotification', '~> 2.2.3'` +`pod 'CWStatusBarNotification', '~> 2.2.4'` ### Manual