Skip to content

Custom icon and color#6

Merged
dogo merged 9 commits into
dogo:masterfrom
mamaral:custom-icon
Oct 18, 2014
Merged

Custom icon and color#6
dogo merged 9 commits into
dogo:masterfrom
mamaral:custom-icon

Conversation

@mamaral

@mamaral mamaral commented Oct 18, 2014

Copy link
Copy Markdown

This pull request adds the ability to create a custom SCLAlertView, using the same title, subtitle, buttons, etc. as the normal alert view, but also being able to customize the icon image/color and button colors.

As you can see from the provided example, using the below code has the following pretty nice result:

demo

SCLAlertView *alert = [[SCLAlertView alloc] init];

UIColor *color = [UIColor colorWithRed:65.0/255.0 green:64.0/255.0 blue:144.0/255.0 alpha:1.0];
[alert showCustom:self image:[UIImage imageNamed:@"git"] color:color title:@"Custom" subTitle:@"Add a custom icon and color for your own type of alert!" closeButtonTitle:@"OK" duration:0.0f];

Mike Amaral added 6 commits October 17, 2014 20:35
…lor passed in, as well as grows the icon image view to be larger inside the circle view.
…could be passed in for the custom alert view type, and are left nil for all others.
…and added the outlets to handle creating a new custom alert and displaying it.
@mamaral mamaral changed the title Custom icon Custom icon and color Oct 18, 2014
Comment thread SCLAlertView/SCLAlertView.h Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mamaral Could you please add some documentation to Show Custom? It's one of my current tasks :D

Thanks

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, and I will also update the README as well if you'd prefer?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, go ahead and update both. thanks

@dogo

dogo commented Oct 18, 2014

Copy link
Copy Markdown
Owner

Cool! 👍 man!

@mamaral

mamaral commented Oct 18, 2014

Copy link
Copy Markdown
Author

Alrighty I added a bit of documentation and some basic info for the custom type in the README with a screenshot. Let me know what you think!

@dogo

dogo commented Oct 18, 2014

Copy link
Copy Markdown
Owner

Great ! Merging now

dogo added a commit that referenced this pull request Oct 18, 2014
@dogo dogo merged commit 79fdcea into dogo:master Oct 18, 2014
@mamaral mamaral deleted the custom-icon branch June 1, 2015 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants