dogo / SCLAlertView

Beautiful animated Alert View. Written in Objective-C
MIT License
3.5k stars 534 forks source link

amazing ,but if we can custom button corlor not only custom main corlor #236

Closed King-hb closed 7 years ago

King-hb commented 7 years ago
Include the following:
Reproduction Steps

1. 2. 3.

Expected Result
Actual Result

Tell us what could be improved:

King-hb commented 7 years ago

it will be fine

dogo commented 7 years ago

@King-whb did you run the sample? did you read the readme?

All the buttons could be customized using the buttonFormatBlock

   SCLButton *button = [alert addButton:@"First Button" target:self selector:@selector(firstButton)];

    button.buttonFormatBlock = ^NSDictionary* (void)
    {
        NSMutableDictionary *buttonConfig = [[NSMutableDictionary alloc] init];

        buttonConfig[@"backgroundColor"] = [UIColor whiteColor];
        buttonConfig[@"textColor"] = [UIColor blackColor];
        buttonConfig[@"borderWidth"] = @2.0f;
        buttonConfig[@"borderColor"] = [UIColor greenColor];

        return buttonConfig;
    };