Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Pod/Assets/TSMessagesDefaultDesign.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"shadowOffsetY": -1,
"textColor": "#FFFFFF",
"titleFontSize": 14,
"backgroundColor": "#76CF67"
"backgroundColor": "#76CF67",
"backgroundAlpha": 1.0
},
"message": {
"backgroundImageName": "NotificationBackgroundMessage.png",
Expand All @@ -35,7 +36,8 @@
"shadowOffsetY": 1,
"textColor": "#727C83",
"titleFontSize": 14,
"backgroundColor": "#D4DDDF"
"backgroundColor": "#D4DDDF",
"backgroundAlpha": 1.0
},
"warning": {
"backgroundImageName": "NotificationBackgroundWarning.png",
Expand All @@ -54,7 +56,8 @@
"shadowOffsetY": 1,
"textColor": "#484638",
"titleFontSize": 14,
"backgroundColor": "#DAC43C"
"backgroundColor": "#DAC43C",
"backgroundAlpha": 1.0
},
"error": {
"backgroundImageName": "NotificationBackgroundError.png",
Expand All @@ -73,6 +76,7 @@
"shadowOffsetY": -1,
"textColor": "#FFFFFF",
"titleFontSize": 14,
"backgroundColor": "#DD3B41"
"backgroundColor": "#DD3B41",
"backgroundAlpha": 1.0
}
}
4 changes: 4 additions & 0 deletions Pod/Classes/TSMessageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,14 @@ - (id)initWithTitle:(NSString *)title

_backgroundImageView = [[UIImageView alloc] initWithImage:backgroundImage];
self.backgroundImageView.autoresizingMask = (UIViewAutoresizingFlexibleWidth);
self.backgroundImageView.alpha = [current[@"backgroundAlpha"] doubleValue];
[self addSubview:self.backgroundImageView];
}
else
{
// On iOS 7 and above use a blur layer instead (not yet finished)
_backgroundBlurView = [[TSBlurView alloc] init];
_backgroundBlurView.alpha = [current[@"backgroundAlpha"] doubleValue];
self.backgroundBlurView.autoresizingMask = (UIViewAutoresizingFlexibleWidth);
self.backgroundBlurView.blurTintColor = [UIColor colorWithHexString:current[@"backgroundColor"]];
[self addSubview:self.backgroundBlurView];
Expand All @@ -280,6 +282,7 @@ - (id)initWithTitle:(NSString *)title

// Set up title label
_titleLabel = [[UILabel alloc] init];
[self.titleLabel setAccessibilityIdentifier:@"notificationTitle"];
[self.titleLabel setText:title];
[self.titleLabel setTextColor:fontColor];
[self.titleLabel setBackgroundColor:[UIColor clearColor]];
Expand All @@ -302,6 +305,7 @@ - (id)initWithTitle:(NSString *)title
if ([subtitle length])
{
_contentLabel = [[UILabel alloc] init];
[self.contentLabel setAccessibilityIdentifier:@"notificationMessage"];
[self.contentLabel setText:subtitle];

UIColor *contentTextColor = [UIColor colorWithHexString:[current valueForKey:@"contentTextColor"]];
Expand Down