diff --git a/CSNotificationView/CSNotificationView.h b/CSNotificationView/CSNotificationView.h index 084a6b5..0094c18 100755 --- a/CSNotificationView/CSNotificationView.h +++ b/CSNotificationView/CSNotificationView.h @@ -108,4 +108,10 @@ typedef void(^CSVoidBlock)(); */ @property (nonatomic, copy) CSVoidBlock tapHandler; +/* + * If given, this view will be used in place of the image or the activity view. + * The size of the symbol view will be adjusted automatically; + * the setter should not set width/height constraints + */ +@property (nonatomic, strong) UIView* customSymbolView; @end diff --git a/CSNotificationView/CSNotificationView.m b/CSNotificationView/CSNotificationView.m index 4f4fbb0..7be6617 100644 --- a/CSNotificationView/CSNotificationView.m +++ b/CSNotificationView/CSNotificationView.m @@ -439,7 +439,10 @@ - (void)updateSymbolView { [self.symbolView removeFromSuperview]; - if (self.isShowingActivity) { + if (self.customSymbolView) { + _symbolView = self.customSymbolView; + } + else if (self.isShowingActivity) { UIActivityIndicatorView* indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; indicator.color = self.contentColor; [indicator startAnimating];