Created
March 16, 2014 20:03
-
-
Save pbrewczynski/9589015 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) animateWordMeaningLabelToLefttAndUpdateRepetitionOnCompletion { | |
CGRect orginalPlaceOfWordMeaningLabel = self.wordMeaningLabel.frame; | |
[UIView animateWithDuration:0.5 animations:^{ // TODO magic number | |
CGRect frame = self.wordMeaningLabel.frame; | |
frame.origin.x = -self.wordMeaningLabel.frame.size.width; | |
self.wordMeaningLabel.frame = frame; | |
self.wordMeaningLabel.layer.backgroundColor = [self.crossContainer.backgroundColor colorWithAlphaComponent:1].CGColor; | |
self.crossContainer.layer.backgroundColor = [self.crossContainer.backgroundColor colorWithAlphaComponent:1].CGColor; | |
self.wordMeaningLableIsAnimating = YES; | |
} completion:^(BOOL finished){ | |
self.wordMeaningLableIsAnimating = NO; | |
[self animateWordMeaningLabelFromMiddleTopToDesiredCenter:self.orginalCenterOfWordMeaningLabel]; | |
[self updateRepetition]; | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment