Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cbess/cbflipviewtransition
Flip transition, think iTunes App Store artwork flip to details.
https://github.com/cbess/cbflipviewtransition
animation calayer itunes objective-c
Last synced: about 1 month ago
JSON representation
Flip transition, think iTunes App Store artwork flip to details.
- Host: GitHub
- URL: https://github.com/cbess/cbflipviewtransition
- Owner: cbess
- License: mit
- Created: 2014-05-11T22:17:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-12-26T04:41:56.000Z (almost 8 years ago)
- Last Synced: 2024-04-14T15:44:19.437Z (7 months ago)
- Topics: animation, calayer, itunes, objective-c
- Language: Objective-C
- Size: 107 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CBFlipViewTransition
====================Flip transition, think iTunes App Store artwork flip to details.
```objc
- (IBAction)flipButtonPressed:(id)sender {
self.flipViewTransition = [CBFlipViewTransition new];
if (!_flipped) {
self.flipViewTransition.frontView = self.oneImageView;
self.flipViewTransition.backView = self.twoImageView;
} else {
self.flipViewTransition.frontView = self.twoImageView;
self.flipViewTransition.backView = self.oneImageView;
}
self.flipViewTransition.containerView = self.view;
self.flipViewTransition.zDistance = 700;
self.flipViewTransition.endingCenter = (_flipped ? self.oneImageView.center : self.twoImageView.center);
self.flipViewTransition.flipDirection = (_flipped ? CBFlipDirectionLeft : CBFlipDirectionRight);
self.flipViewTransition.duration = 1.5f;
__typeof__(self) __weak weakSelf = self;
[self.flipViewTransition performTransitionWithCompletion:^{
weakSelf.flipViewTransition.frontView.hidden = YES;
_flipped = !_flipped;
}];
}
```