From ab6dc8577cc36d2a5039b034a077b443d94fe620 Mon Sep 17 00:00:00 2001 From: Troels Richter Date: Wed, 2 Jan 2013 22:18:19 +0100 Subject: [PATCH] noticeview with is calculated from the view bounds instead of frame to fix orientation with error --- NoticeView/WBNoticeView/WBErrorNoticeView.m | 2 +- NoticeView/WBNoticeView/WBStickyNoticeView.m | 2 +- NoticeView/WBNoticeView/WBSuccessNoticeView.m | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NoticeView/WBNoticeView/WBErrorNoticeView.m b/NoticeView/WBNoticeView/WBErrorNoticeView.m index bacee44..c344c64 100644 --- a/NoticeView/WBNoticeView/WBErrorNoticeView.m +++ b/NoticeView/WBNoticeView/WBErrorNoticeView.m @@ -25,7 +25,7 @@ - (void)show { // Obtain the screen width - CGFloat viewWidth = self.view.frame.size.width; + CGFloat viewWidth = self.view.bounds.size.width; // Locate the images NSString *path = [[[NSBundle mainBundle]resourcePath]stringByAppendingPathComponent:@"NoticeView.bundle"]; diff --git a/NoticeView/WBNoticeView/WBStickyNoticeView.m b/NoticeView/WBNoticeView/WBStickyNoticeView.m index 8b5aa07..990ecfa 100644 --- a/NoticeView/WBNoticeView/WBStickyNoticeView.m +++ b/NoticeView/WBNoticeView/WBStickyNoticeView.m @@ -24,7 +24,7 @@ - (void)show { // Obtain the screen width - CGFloat viewWidth = self.view.frame.size.width; + CGFloat viewWidth = self.view.bounds.size.width; // Locate the images NSString *path = [[[NSBundle mainBundle]resourcePath]stringByAppendingPathComponent:@"NoticeView.bundle"]; diff --git a/NoticeView/WBNoticeView/WBSuccessNoticeView.m b/NoticeView/WBNoticeView/WBSuccessNoticeView.m index 5519c39..7a8f421 100644 --- a/NoticeView/WBNoticeView/WBSuccessNoticeView.m +++ b/NoticeView/WBNoticeView/WBSuccessNoticeView.m @@ -24,7 +24,7 @@ - (void)show { // Obtain the screen width - CGFloat viewWidth = self.view.frame.size.width; + CGFloat viewWidth = self.view.bounds.size.width; // Locate the images NSString *path = [[[NSBundle mainBundle]resourcePath]stringByAppendingPathComponent:@"NoticeView.bundle"];