Skip to content

kaspermunck/KMCustomAlertView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

KMCustomAlertView

Customizable UIAlertVIew subclass. Easily customize labels, buttons and background of a UIAlertView.

NOTE: Is not verified to work in iOS 7.

How do I use it?

Easy as pie. Copy KMCustomAlertView.h and KMCustomAlertView.m into your project. Subclass KMCustomAlertView and overwrite the following methods:

- (UILabel *)titleLabel;
- (UILabel *)messageLabel;
- (UIButton *)cancelButton;
- (UIButton *)otherButton;
- (UIView *)backgroundView;

That's it. Don't worry about frames and all that, just provide desired labels/buttons/background view. Since it's a subclass of UIAlertView it can be used as such:

UIAlertView *alertView = [[MyAlertView alloc] initWithTitle:@"title string"
                                                    message:@"this is a message in landscape"
                                                   delegate:self
                                          cancelButtonTitle:@"cancel"
                                          otherButtonTitles:@"other 1", nil];

Custom UIAlertView

About

Customizable UIAlertVIew subclass.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors