• Stars
    star
    375
  • Rank 114,096 (Top 3 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Custom UIView subclass with a pixellated animation inspired by Facebook's Slingshot app.

CRPixellatedView

Custom UIView subclass with a pixellated animation inspired by Facebook's Slingshot app.

Platform Version CI License

Installation

There are two options:

CocoaPods

  • Add the dependency to your Podfile:
platform :ios
pod 'CRPixellatedView'
...
  • Run pod install to install the dependencies.

Source files

  • Just clone this repository or download it in zip-file.
  • Then you will find source files under CRPixellatedView directory.
  • Copy them to your project.

Usage

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");
}];

Examples

pixellatedView.reverse = YES; // Reverse effect

CRPixellatedView-demo1

CRPixellatedView-demo2

pixellatedView.reverse = NO; // (default)
pixellatedView.pixelScale = 30.0f;

CRPixellatedView-demo3 Demo

See CRPixelledViewDemo Xcode project.

Requirements

  • iOS 6.0 or higher.

Bugs

  • It works well just with square images (CIFilter related bug) :(

Contributing

Anyone who would like to contribute to the project is more than welcome.

  • Fork this repo
  • Make your changes
  • Submit a pull request

License

CRPixellatedView is released under the MIT license. See LICENSE.

Contact

Christian Roman

http://chroman.me

[email protected]

@chroman

More Repositories

1

CRGradientNavigationBar

Custom UINavigationBar subclass which allows gradient coloured navigation bar on iOS 7.
Objective-C
914
star
2

CRMotionView

A custom photo viewer that implements device motion scrolling, inspired by Facebook Paper.
Objective-C
758
star
3

Doppio

An open source iOS app to find the nearest Starbucks store using NSURLSession, AFNetworking 2.0, Mantle and Starbucks private API.
Objective-C
553
star
4

ANPR

License plate recognition for iOS using OpenCV & Tesseract OCR Engine
C++
252
star
5

CRMultiRowSelect

Custom UITableViewCell for iOS that supports multiple row selection
Objective-C
171
star
6

HeartBeats

Source code for iOS app to draw heart beats by reading color changes using the device flash led and CoreGraphics.
Objective-C
168
star
7

CRMediaPickerController

An easy-to-use UIImagePickerController replacement for picking Images and Videos.
Objective-C
165
star
8

CRGradientLabel

Custom UILabel subclass with gradient coloured background, written in Swift.
Swift
50
star
9

repuve-api

Python
13
star
10

df-gtfs

Script para importar dataset de "df_gtfs" a PostgreSQL
13
star
11

Ecobici

Ecobici+ iOS app. Disponibilidad inteligente de Ecobici, ciclovias y rutas seguras. #hackdf
Objective-C
10
star
12

API-SCT

API para consumir datos de rutas a traves de SCT
Ruby
9
star
13

XReset

Xcode Plugin to Reset iOS Simulators Content and Settings.
Objective-C
7
star
14

congreso

iOS app for #app115 challenge which Mexican House of Representatives announced that they were planning to pay $9.3 million to have an app developed. This an open source version and was presented at Mexican Congress.
Objective-C
7
star
15

FaceMemesCV

Live face detection & memes with OpenCV
C++
5
star
16

Toggle

Google Chrome extension to toggle between .h and .m source files on GitHub.
JavaScript
4
star
17

memeAR

iPhone app that detects real time faces and add memes
Objective-C
4
star
18

meds

Meds application for Android
Java
3
star
19

TextureViewDemo

Android TextureView Demo like the new Youtube app.
Java
3
star
20

chroMVC

PHP MVC framework based on Sinatra
JavaScript
2
star
21

cpmx4-chat

CPMX4 Node.js Chat
CSS
1
star
22

Programming-challenges

Programming challenges that solve in my free time from the book: The programming contest training manual
Java
1
star