UICollectionViewCell Shake

Stworzyłem UICollectionView i chciałbym, aby wszystkie komórki trzęsły się jak tryb edycji trampoliny na iPhonie. Stworzyłem kod wstrząsania, ale nie wiem, jak go wdrożyć. Mam niestandardowe komórki, więc zakładam, że trafiają tam, ale nie wiem, jak zostaną zaimplementowane. Dziękuję Ci.

#define degreesToRadians(x) (M_PI * (x) / 180.0)
#define kAnimationRotateDeg 0.5
#define kAnimationTranslateX 1.0
#define kAnimationTranslateY 1.0

//startJiggling

int count = 1;
CGAffineTransform leftWobble = CGAffineTransformMakeRotation(degreesToRadians( kAnimationRotateDeg * (count%2 ? +1 : -1 ) ));
CGAffineTransform rightWobble = CGAffineTransformMakeRotation(degreesToRadians( kAnimationRotateDeg * (count%2 ? -1 : +1 ) ));
CGAffineTransform moveTransform = CGAffineTransformTranslate(rightWobble, -kAnimationTranslateX, -kAnimationTranslateY);
CGAffineTransform conCatTransform = CGAffineTransformConcat(rightWobble, moveTransform);

    self.transform = leftWobble;  // starting point

    [UIView animateWithDuration:0.1
                          delay:(count * 0.08)
                        options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse
                     animations:^{ self.transform = conCatTransform; }
                     completion:nil];

questionAnswers(4)

yourAnswerToTheQuestion