I want to change the background color of my UIAlertView, but this doesn\'t appear to have a color attribute.
Well i solved the problem in a different way. I searched for the UIImageView which contains the background image and change the image.
... well show is maybe not the best solution for altering the view ...
@implementation CustomAlertView
- (void)show {
[super show];
for (UIView *view in self.subviews) {
NSLog(@"%@ with %i children", view, [view.subviews count]);
// change the background image
if ([view isKindOfClass:[UIImageView class]]) {
UIImage *theImage = [UIImage imageNamed:@"password entry bg - default.png"];
((UIImageView *)view).image = [theImage resizableImageWithCapInsets:UIEdgeInsetsMake(49, 8, 8, 8)];
}
}
}
@end