Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom icon and color #6

Merged
merged 9 commits into from Oct 18, 2014
Merged

Custom icon and color #6

merged 9 commits into from Oct 18, 2014

Conversation

mamaral
Copy link

@mamaral mamaral commented Oct 18, 2014

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
@@ -124,5 +125,11 @@ typedef NS_ENUM(NSInteger, SCLAlertViewStyle)
*/
- (void)showTitle:(UIViewController *)vc title:(NSString *)title subTitle:(NSString *)subTitle style:(SCLAlertViewStyle)style closeButtonTitle:(NSString *)closeButtonTitle duration:(NSTimeInterval)duration;

/** Show Custom SCLAlertView
*
* TODO
Copy link
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
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
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
Copy link
Owner

dogo commented Oct 18, 2014

Cool! 👍 man!

@mamaral
Copy link
Author

mamaral commented Oct 18, 2014

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
Copy link
Owner

dogo commented Oct 18, 2014

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.

None yet

2 participants