UIView *view = (UIView*)sender;
CGAffineTransform scale =CGAffineTransformMakeScale(5.0f,5.0f);
CGAffineTransform unScale =CGAffineTransformMakeScale(1.0f,1.0f);
[UIViewanimateWithDuration:0.3animations:^{
[view setAlpha:0.0f];
[view setTransform:scale];
} completion:^(BOOL finished){
[view setAlpha:1.0f];
[view setTransform:unScale];
}];
for (int i =0; i < [buttons count]; ++i) {
UIButton *button = (UIButton*)[buttonsobjectAtIndex:i];
[button addTarget:selfaction:@selector(explode:)forControlEvents:UIControlEventTouchUpInside];
[button setCenter:buttonCenter];
[button setAlpha:0.0f];
[self addSubview:button];
}