Customizable UIAlertVIew subclass. Easily customize labels, buttons and background of a UIAlertView.
NOTE: Is not verified to work in iOS 7.
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];