ios5 - iPod Touch iOS 5 Animation Stuttering -


i have uiview acts badge in app, upon pressing button, badge supposed blink existence , nice squash , stretch animation. animation works on iphone 4, iphone 4s, , iphone 5 8gb ipod touch (4th generation) ios 5.1.1 has bad stuttering effect.

the popwithduration: method causes stuttering while resetcount method, causes view explode in size. wondering if knows fixes or workarounds.

here relevant methods, class subclass of uiview.

- (void)popwithduration:(cgfloat)duration {     if(self.cananimatelikednumber)     {         if(self.waitingtoreset){             [self resetcount];             return;         }         else             self.cananimatelikednumber = false;          cgaffinetransform stretchtransform = cgaffinetransformmakescale(1.5,1.5);         cgaffinetransform squashtransform = cgaffinetransformmakescale(1.0,1.0);          [uiview animatewithduration:duration delay:0.0f options:uiviewanimationoptionlayoutsubviews animations:^{             [self setalpha:1.0f];             [self settransform:stretchtransform];         } completion:^(bool finished) {             [uiview  animatewithduration:0.2f delay:0.0f options:uiviewanimationoptionbeginfromcurrentstate animations:^{                 [self settransform:squashtransform];             } completion:^(bool finished) {                 self.cananimatelikednumber = true;                 if(self.waitingtoreset){                     [self resetcount];                     return;                 }             }];         }];     }  }  - (void) resetcount {     if([nsstring isvalid: self.savedcountlabel.text] || (!self.hidden && self.superview))     {         if(self.cananimatelikednumber)         {             self.cananimatelikednumber = false;              cgsize defaultsize = [notificationbadge defaultbadgesize];              cgrect originalrect = cgrectmake(self.frame.origin.x, self.frame.origin.y, defaultsize.width, defaultsize.height);             [uiview animatewithduration:0.2 delay:0.0f options:uiviewanimationoptionlayoutsubviews animations:^{ //squash , stretch                 [self settransform:cgaffinetransformmakescale(2, 2)];             }             completion:^(bool finished)             {                 [uiview animatewithduration:0.4 delay:0.0f options:uiviewanimationoptionlayoutsubviews animations:^{                     [self settransform:cgaffinetransformmakescale(0.0,0.0)];                     [self setalpha:0.0f];                 }                 completion:^(bool finished)                 {                     [self sethidden:true];                     [self settransform:cgaffinetransformmakescale(1.0,1.0)];                      [self setframe:originalrect];                     [self.savedcountlabel settext:@"0"];                     [self.savedcountlabel setframe:cgrectmake(notification_label_insets.left, notification_label_insets.top, defaultsize.width - notification_label_insets.left - notification_label_insets.right, defaultsize.height - notification_label_insets.top - notification_label_insets.bottom)];                      self.cananimatelikednumber = true;                     self.waitingtoreset = false;                  }];             }];         }         else         {             self.waitingtoreset = true;         }     } } 

figured out. apparently if use transform property in ios 5.0+ cannot set transform value 0.0f ever.

crediting animation working in ios6, buggy in ios5


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -