Note that there are some explanatory texts on larger screens.

plurals
  1. POTransformation unable to perform twice
    text
    copied!<p>I have this function,</p> <pre><code>-(void)transitionstar{ star.hidden = NO; star2.hidden = NO; star3.hidden = NO; star4.hidden = NO; star5.hidden = NO; star6.hidden = NO; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.4f]; [UIView animateWithDuration:0.0 animations:^{ CGAffineTransform scale = CGAffineTransformMakeScale(1, 1); CGAffineTransform rotate = CGAffineTransformMakeRotation(360.0); CGAffineTransform rotate2 = CGAffineTransformMakeRotation(-360.0); CGAffineTransform rotate3 = CGAffineTransformMakeRotation(-720.0); CGAffineTransform rotate4 = CGAffineTransformMakeRotation(720.0); CGAffineTransform rotate5 = CGAffineTransformMakeRotation(1080.0); CGAffineTransform rotate6 = CGAffineTransformMakeRotation(-1080.0); CGAffineTransform translate = CGAffineTransformMakeTranslation(-800, -800); CGAffineTransform translate2 = CGAffineTransformMakeTranslation(600, -600); CGAffineTransform translate3 = CGAffineTransformMakeTranslation(400, 400); CGAffineTransform translate4 = CGAffineTransformMakeTranslation(-200, 200); CGAffineTransform translate5 = CGAffineTransformMakeTranslation(900, -300); CGAffineTransform translate6 = CGAffineTransformMakeTranslation(-200, 500); CGAffineTransform transform = CGAffineTransformConcat(translate, scale); transform = CGAffineTransformConcat(transform, rotate); CGAffineTransform transform2 = CGAffineTransformConcat(translate2, scale); transform2 = CGAffineTransformConcat(transform2, rotate2); CGAffineTransform transform3 = CGAffineTransformConcat(translate3, scale); transform3 = CGAffineTransformConcat(transform3, rotate3); CGAffineTransform transform4 = CGAffineTransformConcat(translate4, scale); transform4 = CGAffineTransformConcat(transform4, rotate4); CGAffineTransform transform5 = CGAffineTransformConcat(translate5, scale); transform5 = CGAffineTransformConcat(transform5, rotate5); CGAffineTransform transform6 = CGAffineTransformConcat(translate6, scale); transform6 = CGAffineTransformConcat(transform6, rotate6); star.transform = transform; star2.transform = transform2; star3.transform = transform3; star4.transform = transform4; star5.transform = transform5; star6.transform = transform6; } completion:^(BOOL finished){ if (finished) { star.hidden = YES; star2.hidden = YES; star3.hidden = YES; star4.hidden = YES; star5.hidden = YES; star6.hidden = YES; } }]; [UIView commitAnimations]; } </code></pre> <p>When i call it first time, it did worked. </p> <p>However, i call again within same view, it cannot perform and stuck there. </p> <p>-hidden work</p> <p>-transition not work</p> <p>-rotation not work</p> <p>-nslog work</p> <p>Why second time will become like this?</p> <p><strong>Update</strong></p> <pre><code>if(!positionrepeat) { //Display Correct IMAGE; [isrepeat addObject:[NSNumber numberWithInt:positionvalue]]; //soundeffect = [self createSoundID: @"correct"]; //AudioServicesPlaySystemSound(soundeffect); [self displayresulttext:@"correct"]; [self.view setNeedsDisplay]; [self transitionstar]; correct++; completed.text = [NSString stringWithFormat:@"%d", correct]; [self result]; } </code></pre> <p>This is how I call the function. However, it still same.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload