Skip to content
Open
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: 6 additions & 6 deletions SIAlertView/SIAlertView.m
Original file line number Diff line number Diff line change
Expand Up @@ -977,21 +977,21 @@ - (UIButton *)buttonForItemIndex:(NSUInteger)index
UIImage *highlightedImage = nil;
switch (item.type) {
case SIAlertViewButtonTypeCancel:
normalImage = [UIImage imageNamed:@"SIAlertView.bundle/button-cancel"];
highlightedImage = [UIImage imageNamed:@"SIAlertView.bundle/button-cancel-d"];
normalImage = [UIImage imageNamed:@"SIAlertView.bundle/button-cancel" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil];
highlightedImage = [UIImage imageNamed:@"SIAlertView.bundle/button-cancel-d" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil];
[button setTitleColor:self.cancelButtonColor forState:UIControlStateNormal];
[button setTitleColor:[self.cancelButtonColor colorWithAlphaComponent:0.8] forState:UIControlStateHighlighted];
break;
case SIAlertViewButtonTypeDestructive:
normalImage = [UIImage imageNamed:@"SIAlertView.bundle/button-destructive"];
highlightedImage = [UIImage imageNamed:@"SIAlertView.bundle/button-destructive-d"];
normalImage = [UIImage imageNamed:@"SIAlertView.bundle/button-destructive" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil];
highlightedImage = [UIImage imageNamed:@"SIAlertView.bundle/button-destructive-d" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil];
[button setTitleColor:self.destructiveButtonColor forState:UIControlStateNormal];
[button setTitleColor:[self.destructiveButtonColor colorWithAlphaComponent:0.8] forState:UIControlStateHighlighted];
break;
case SIAlertViewButtonTypeDefault:
default:
normalImage = [UIImage imageNamed:@"SIAlertView.bundle/button-default"];
highlightedImage = [UIImage imageNamed:@"SIAlertView.bundle/button-default-d"];
normalImage = [UIImage imageNamed:@"SIAlertView.bundle/button-default" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil];
highlightedImage = [UIImage imageNamed:@"SIAlertView.bundle/button-default-d" inBundle:[NSBundle bundleForClass:self.class] compatibleWithTraitCollection:nil];
[button setTitleColor:self.buttonColor forState:UIControlStateNormal];
[button setTitleColor:[self.buttonColor colorWithAlphaComponent:0.8] forState:UIControlStateHighlighted];
break;
Expand Down