rnystrom / RNBlurModalView

Add depth to your alerts.
MIT License
830 stars 143 forks source link

i can't change dismissButton style #46

Open coolgo opened 10 years ago

coolgo commented 10 years ago

i want to change the dismissbutton style but ,how can i do

coolgo commented 10 years ago

thanks ,i create a simple category to friendly solve it. @interface RNBlurModalView (CLFIX) -(void)changeCloseButtonImage:(UIImage*)img; @end @implementation RNBlurModalView (CLFIX)

-(void)changeCloseButtonImage:(UIImage*)img{

for (UIView* view in self.subviews) {
    if ([view isKindOfClass:[UIButton class]]) {
        DLog(@"btn:%@",view);
        UIButton *btn=(UIButton*)view;
        [btn setBackgroundImage:img forState:UIControlStateNormal];
    }
}

} @end

so,i can easily change the closebutton image