CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Christian Roman.
Custom UIView
subclass with a pixellated animation inspired by Facebook's Slingshot app.
There are two options:
CocoaPods
platform :ios
pod 'CRPixellatedView'
...
pod install
to install the dependencies.Source files
To use CRPixellatedView, create a CRPixellatedView
, configure and animate!
An example of making a CRPixellatedView:
CRPixellatedView *pixellatedView = [[CRPixellatedView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];
pixellatedView.image = [UIImage imageNamed:@"Image"];
[self.view addSubview:pixellatedView]; // Add to your view
[pixellatedView animate];
You can configure this settings, customizable example:
CRPixellatedView *pixellatedView = [[CRPixellatedView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];
pixellatedView.image = [UIImage imageNamed:@"Image"];
pixellatedView.pixelScale = 20.0f;
pixellatedView.animationDuration = 0.8f;
[self.view addSubview:pixellatedView]; // Add to your view
[pixellatedView animateWithCompletion:^(BOOL finished) {
NSLog(@"completed");
}];
Also, you can customize the animation effect using the reverse
property:
CRPixellatedView *pixellatedView = [[CRPixellatedView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];
pixellatedView.image = [UIImage imageNamed:@"Image"];
pixellatedView.pixelScale = 20.0f;
pixellatedView.animationDuration = 0.8f;
pixellatedView.reverse = YES; // Reverse effect
[self.view addSubview:pixellatedView]; // Add to your view
[pixellatedView animateWithCompletion:^(BOOL finished) {
NSLog(@"completed");
}];
pixellatedView.reverse = YES; // Reverse effect
pixellatedView.reverse = NO; // (default)
pixellatedView.pixelScale = 30.0f;
See CRPixelledViewDemo Xcode project.
Anyone who would like to contribute to the project is more than welcome.
CRPixellatedView is released under the MIT license. See LICENSE.
Christian Roman