Skip to content

Commit

Permalink
Merge pull request #56 from benguild/master
Browse files Browse the repository at this point in the history
Quick fix for lack of NSAttributedString support. Could be improved.
  • Loading branch information
cezarywojcik committed Jul 11, 2015
2 parents b87af9f + 6d2a139 commit c5875f1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CWStatusBarNotification/CWStatusBarNotification.m
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,13 @@ - (void)displayNotificationWithMessage:(NSString *)message completion:(void (^)(
}
}

- (void)displayNotificationWithAttributedText:(NSAttributedString *)attributedText completion:(void (^)(void))completion
{
[self displayNotificationWithMessage:[attributedText string] completion:completion];
[[self notificationLabel] setAttributedText:attributedText];

}

- (void)displayNotificationWithView:(UIView *)view completion:(void (^)(void))completion
{
if (!self.notificationIsShowing) {
Expand Down Expand Up @@ -575,6 +582,13 @@ - (void)displayNotificationWithMessage:(NSString *)message forDuration:(CGFloat)
}];
}

- (void)displayNotificationWithAttributedText:(NSAttributedString *)attributedText forDuration:(CGFloat)duration
{
[self displayNotificationWithMessage:[attributedText string] forDuration:duration];
[[self notificationLabel] setAttributedText:attributedText];

}

- (void)displayNotificationWithView:(UIView *)view forDuration:(CGFloat)duration
{
[self displayNotificationWithView:view completion:^{
Expand Down

0 comments on commit c5875f1

Please sign in to comment.