Skip to content

Commit

Permalink
load icon images from correct bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-dumit committed Jan 24, 2017
1 parent 16f8e5c commit ea679b4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Classes/TWMessageBarManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -807,16 +807,23 @@ - (nonnull UIColor *)strokeColorForMessageType:(TWMessageBarMessageType)type
- (nonnull UIImage *)iconImageForMessageType:(TWMessageBarMessageType)type
{
UIImage *iconImage = nil;
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
switch (type)
{
case TWMessageBarMessageTypeError:
iconImage = [UIImage imageNamed:kTWMessageBarStyleSheetImageIconError];
iconImage = [UIImage imageNamed:kTWMessageBarStyleSheetImageIconError
inBundle:bundle
compatibleWithTraitCollection:nil];
break;
case TWMessageBarMessageTypeSuccess:
iconImage = [UIImage imageNamed:kTWMessageBarStyleSheetImageIconSuccess];
iconImage = [UIImage imageNamed:kTWMessageBarStyleSheetImageIconSuccess
inBundle:bundle
compatibleWithTraitCollection:nil];
break;
case TWMessageBarMessageTypeInfo:
iconImage = [UIImage imageNamed:kTWMessageBarStyleSheetImageIconInfo];
iconImage = [UIImage imageNamed:kTWMessageBarStyleSheetImageIconInfo
inBundle:bundle
compatibleWithTraitCollection:nil];
break;
}
return iconImage;
Expand Down

0 comments on commit ea679b4

Please sign in to comment.