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
1 change: 1 addition & 0 deletions Classes/PXAlertView+Customization.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- (void)setAllButtonsTextColor:(UIColor *)color;
- (void)setOtherButtonTextColor:(UIColor *)color;

-(void)setLineLayerColor:(UIColor*)color;
- (void)useDefaultIOS7Style;

@end
8 changes: 8 additions & 0 deletions Classes/PXAlertView+Customization.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ - (void)useDefaultIOS7Style {
[self setBackgroundColor:[UIColor whiteColor]];
}

-(void)setLineLayerColor:(UIColor*)color
{
for (CALayer* subLayer in [self.alertView.layer sublayers]) {
if ([subLayer.name isEqualToString:@"PXAlertView_lineLayer"]) {
subLayer.backgroundColor = color.CGColor;
}
}
}
- (void)setWindowTintColor:(UIColor *)color
{
self.backgroundView.backgroundColor = color;
Expand Down
1 change: 1 addition & 0 deletions Classes/PXAlertView.m
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ - (CALayer *)lineLayer
{
CALayer *lineLayer = [CALayer layer];
lineLayer.backgroundColor = [[UIColor colorWithWhite:0.90 alpha:0.3] CGColor];
[lineLayer setName:@"PXAlertView_lineLayer"];
return lineLayer;
}

Expand Down
1 change: 1 addition & 0 deletions PXAlertViewDemo/PXViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ - (IBAction)showCopyOfUIAlertView:(id)sender
contentView:nil
completion:nil];
[alertView useDefaultIOS7Style];
[alertView setLineLayerColor:[UIColor blackColor]];
}

- (IBAction)showLargeUIAlertView:(id)sender
Expand Down