youknowone / UI7Kit

Backport flat-style UIKit from iOS7 to iOS5+
Other
1.67k stars 199 forks source link

If alertView has no button, not draw background. #135

Closed ghost closed 10 years ago

ghost commented 10 years ago

If alertView has no button, not draw background.

fix : backgroundView height

CGFloat viewHeight = baseHeight;
    if ([buttons count] > 0) {
        CGRect lastButtonFrame = [buttons.lastObject frame];
        viewHeight = lastButtonFrame.origin.y + lastButtonFrame.size.height;
    }
    // background image
    self.backgroundView.frame = CGRectMake(7.0, .0, UI7AlertViewWidth, viewHeight);
    self.backgroundView.image = [UIImage roundedImageWithSize:self.backgroundView.frame.size color:[UI7Color defaultBarColor] radius:6.0];
youknowone commented 10 years ago

0.9.13 is released with your patch. Thanks!