Syed Faraz Haider Zaidi
Syed Faraz Haider Zaidi

Reputation: 1369

IOS UiView animation producing different effects on ios 5 and ios 6 devices

i created the zooming animation in my ios application, its working fine in ios 6 devices, but when i run the same code on devices containing ios 5, its behaving differently, that is button (on which i put this effect) coming with stretching and delay effect. Can anyone please take a look on code and checkout what i'm mistaken.

Code

- (void) zoomEffect
{
    self.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0, 0);
    [UIView animateWithDuration:0.3 animations:^{
        self.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.3, 1.3);
    } completion:^(BOOL finished){
        [UIView animateWithDuration:0.3 animations:^{
            self.transform = CGAffineTransformIdentity;
        } completion:^(BOOL finished){

        }];
    }];
}

Upvotes: 0

Views: 204

Answers (1)

TonyMkenu
TonyMkenu

Reputation: 7667

I had same "issue"... :)

Try to change this line

self.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0, 0);

in

self.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.0001, 0.0001);

Upvotes: 1

Related Questions