From 60f81348b05ffa39d7d80a37598eba20f1742caf Mon Sep 17 00:00:00 2001 From: Christian Menschel Date: Tue, 7 Oct 2014 12:19:17 +0200 Subject: [PATCH 1/5] Fixes crash since SDK 8.0 with not synthesize setter Setter for executing, cancelled and finished need to explicitly synthesized --- NoticeView/WBNoticeView/WBNoticeOperation.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NoticeView/WBNoticeView/WBNoticeOperation.m b/NoticeView/WBNoticeView/WBNoticeOperation.m index ad6abca..4c62225 100644 --- a/NoticeView/WBNoticeView/WBNoticeOperation.m +++ b/NoticeView/WBNoticeView/WBNoticeOperation.m @@ -17,6 +17,9 @@ @interface WBNoticeOperation () @end @implementation WBNoticeOperation +@synthesize executing; +@synthesize cancelled; +@synthesize finished; - (void)start { From 8eebd6857d5524187178d8311819e2cc1209626a Mon Sep 17 00:00:00 2001 From: Jorge Enrique Salgado Martin Date: Wed, 4 Feb 2015 18:07:37 +0100 Subject: [PATCH 2/5] Use NS_ENUM --- NoticeView/WBNoticeView/WBNoticeView.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NoticeView/WBNoticeView/WBNoticeView.h b/NoticeView/WBNoticeView/WBNoticeView.h index 8537b4f..be6d972 100644 --- a/NoticeView/WBNoticeView/WBNoticeView.h +++ b/NoticeView/WBNoticeView/WBNoticeView.h @@ -8,10 +8,10 @@ #import -typedef enum WBNoticeViewSlidingMode { +typedef NS_ENUM(NSUInteger, WBNoticeViewSlidingMode) { WBNoticeViewSlidingModeUp, WBNoticeViewSlidingModeDown, -} WBNoticeViewSlidingMode; +}; /** `WBNoticeView` objects provides a lightweight, non-intrusive means for displaying information to the user. The `WBNoticeView` class is an abstract class that encapsulates the interface common to all notice objects. From 0496418bd37727df16d572b5f680eda885120f35 Mon Sep 17 00:00:00 2001 From: Jorge Enrique Salgado Martin Date: Wed, 4 Feb 2015 18:08:10 +0100 Subject: [PATCH 3/5] Add hash for subclass. Needs to be implemented if isEqual is --- NoticeView/WBNoticeView/WBNoticeView.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NoticeView/WBNoticeView/WBNoticeView.m b/NoticeView/WBNoticeView/WBNoticeView.m index 2dec11d..c7b1e05 100644 --- a/NoticeView/WBNoticeView/WBNoticeView.m +++ b/NoticeView/WBNoticeView/WBNoticeView.m @@ -78,6 +78,10 @@ - (BOOL)isEqual:(WBNoticeView *)object return [self.title isEqual:object.title] && [self.message isEqual:object.message]; } +- (NSUInteger)hash { + return [self.title hash] + [self.message hash]; +} + #pragma mark - - (void)displayNotice From 2b3c657571cadd5a3569a8b66eff5a961e629db8 Mon Sep 17 00:00:00 2001 From: Jorge Enrique Salgado Martin Date: Wed, 4 Feb 2015 18:08:43 +0100 Subject: [PATCH 4/5] Fix for universal and live related to ErrorViews --- NoticeView/WBNoticeView/WBNoticeView.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/NoticeView/WBNoticeView/WBNoticeView.m b/NoticeView/WBNoticeView/WBNoticeView.m index c7b1e05..d96465b 100644 --- a/NoticeView/WBNoticeView/WBNoticeView.m +++ b/NoticeView/WBNoticeView/WBNoticeView.m @@ -106,7 +106,7 @@ - (void)displayNotice self.gradientView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth; } else { - self.gradientView.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth; + self.gradientView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth; } // Go ahead, display it @@ -124,10 +124,7 @@ - (void)displayNotice [self registerObserver]; } completion:^ (BOOL finished) { // if it's not sticky, hide it automatically - if ((self.tapToDismissEnabled && !self.isSticky) || (!self.tapToDismissEnabled && self.isSticky)) { - // Schedule a timer - self.displayTimer = [NSTimer scheduledTimerWithTimeInterval:self.delay target:self selector:@selector(dismissAfterTimerExpiration) userInfo:nil repeats:NO]; - } else if (!self.isSticky) { + if (!self.isSticky) { // Display for a while, then hide it again [self dismissNoticeWithDuration:self.duration delay:self.delay hiddenYOrigin:self.hiddenYOrigin]; } From d6e75cdc982bf324cc6e910ba8732e4747e145e7 Mon Sep 17 00:00:00 2001 From: Jorge Enrique Salgado Martin Date: Thu, 12 Mar 2015 15:26:19 +0100 Subject: [PATCH 5/5] Remove flexible top margin --- NoticeView/WBNoticeView/WBNoticeView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NoticeView/WBNoticeView/WBNoticeView.m b/NoticeView/WBNoticeView/WBNoticeView.m index d96465b..e9ca98f 100644 --- a/NoticeView/WBNoticeView/WBNoticeView.m +++ b/NoticeView/WBNoticeView/WBNoticeView.m @@ -106,7 +106,7 @@ - (void)displayNotice self.gradientView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth; } else { - self.gradientView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin |UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth; + self.gradientView.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleWidth; } // Go ahead, display it