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"];