• Stars
    star
    390
  • Rank 110,242 (Top 3 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 11 years ago

Reviews

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

Repository Details

A custom table view with highly detailed ripple animations.

RNRippleTableView

A custom table view with highly detailed ripple animations.

Level of Detail

I created this control from a couple posts on Dribbble by Boris Valusek out of pure curiosity. I really wanted to nail the shadow animations as well as a bounce effect that followed diminishing return rules on amplitude as well as plausible timing. Take a look at some screens and animations.

To enable Anti-Aliasing you'll need to set the UIViewEdgeAntialiasing key to YES in your Info.plist. Doing so will impact performance, but if you're an optimizer you'll end up with good performance and sweet, sweet line edges like this:

Installation

The preferred method of installation is through CocoaPods. Just add the following to your Podfile:

pod 'RNRippleTableView', '~> 0.1.4'

Or if you want to install manually, drag both RNRippleTableView's .h and .m into your project. You'll need to ensure that the QuartzCore framework is included.

Optionally, you'll need to add the following code to any view controllers using RNRippleTableView to have ripple animations on shake gestures.

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    [self.rippleView becomeFirstResponder];
}

Usage

To use RNRippleTableView, simply add to your controller and lay it out just as you would any other view. Connect a datasource and delegate in a similar fashion to UITableView. You must also register the class that will be used as the table cells. This class should be a class or subclass of UIView.

self.rippleView = [[RNRippleTableView alloc] init];
[self.rippleView registerContentViewClass:[RNSampleCell class]];
self.rippleView.delegate = self;
self.rippleView.dataSource = self;

Setup your cells just like you would with UITableView except without any of the identifier and checking for nil parts, that is handled for you.

- (UIView *)viewForTableView:(RNRippleTableView *)tableView atIndex:(NSInteger)index withReuseView:(RNSampleCell *)reuseView {
    reuseView.backgroundColor = [UIColor colorWithRed:117/255.f green:184/255.f blue:174/255.f alpha:1];
    reuseView.titleLabel.text = [NSString stringWithFormat:@"Cell %i",index];
    reuseView.titleLabel.textColor = [UIColor whiteColor];
    return reuseView;
}

Customization

RNRippleTableView comes with a small set of options to customize the appearance and animations.

@property (nonatomic, assign) BOOL rippleEnabled; // default YES

Toggle rippling on and off.

@property (nonatomic, assign) BOOL isAnchoredLeft; // default YES

Determines the anchor point for cells. Also determines which side of the view is animated as well as the direction that the shadow is drawn.

@property (nonatomic, assign) NSInteger rippleOffset; // default 3

The number of adjacent cells that are rippled.

@property (nonatomic, assign) CGFloat rippleAmplitude; // default 20 (degrees)

The angle at which the epicenter of the ripple animates its rotation to in degrees.

@property (nonatomic, assign) CGFloat rippleDuration; // default 0.75 seconds

The time for a single bounce animation to complete in seconds.

@property (nonatomic, assign) CGFloat rippleDelay; // default 0.1f

The timing delay between bounce animations in seconds that gives the entire ripple animation its delay effect. Faster looks more like a burst while slower looks like water.

@property (nonatomic, assign) BOOL rippleHasParentShading; // default YES

Determines if the previous view casts a shadow on the animated view.

@property (nonatomic, assign) BOOL rippleHasShading; // default YES

Determines if the entire view is shaded as it bounces.

@property (nonatomic, assign) BOOL ripplesOnShake; // default NO

Optionally you can animate small ripples on shake gestures with the device. This was a fun feature I added just because.

Credits

I created a parent project called RNTableView simply as a bare-minimum project for starting highly customized UITableView-esque classes. That project was entirely insprired by Mike Ash's Let's Build UITableView blog post.

Boris Valusek was the creator behind this idea on Dribbble. All credit for originality goes to him.

Apps

If you've used this project in a live app, please let me know! Nothing makes me happier than seeing someone else take my work and go wild with it.

Contact

License

See LICENSE.

More Repositories

1

RNFrostedSidebar

A Control Center-esque control with blurred background and toggle animations.
Objective-C
2,125
star
2

RNGridMenu

A grid menu with elastic layout, depth of field, and realistic animation.
Objective-C
1,282
star
3

RNBlurModalView

Add depth to your alerts.
Objective-C
830
star
4

RNThemeManager

Easily manage themes and respond to theme changes by updating views in real time.
Objective-C
322
star
5

RNSwipeViewController

Swipe in view controllers from off-screen similar to Check the Weather.
Objective-C
293
star
6

HackerNewsReader

A small, read-only app for Hacker News.
Objective-C
261
star
7

WeatherKit

A quick and elegant solution to gathering local weather data.
Objective-C
166
star
8

UITableViewController-Containment-Demo

This is a sample project showing how to contain a UITableViewController in another VC with a Search Bar + Display Controller working as if it were all in a UITableViewController.
Objective-C
135
star
9

RNExpandingButtonBar

iOS UI widget that mimics the famous button used by the app Path.
Objective-C
126
star
10

RNTextStatistics

A category on NSString to gather advanced statistics on text.
Objective-C
124
star
11

RNBoilerplate

A bundle of my necessary frameworks, libraries, helpers, and settings for each Xcode project with configurable options.
Objective-C
106
star
12

SimpleWeather

A personal weather app I'm building in the open.
Swift
83
star
13

RNSwipeBar

Custom iOS widget to swipe a tab bar from the bottom of the screen
Objective-C
66
star
14

RNAvatarLogin

A simple way to autocomplete Gravatar icons for text fields.
Objective-C
57
star
15

Swift-CoreData

An extremely simple Core Data backed Swift app
Swift
55
star
16

PopDemos

Some demos of Facebook's Pop library made for a RayWenderlich.com tech talk.
Objective-C
53
star
17

TransitionExample

Testing UIViewControllerAnimatedTransitioning
Objective-C
42
star
18

World-Cup-Matches

Very simple app to keep an eye on World Cup 2014 matches.
Objective-C
39
star
19

Metro-Lights

A dark Xcode theme inspired by City Lights for Atom.
34
star
20

IGListKit-Binding-Guide

Starter and finished project for binding guide.
Objective-C
33
star
21

Xcode-Empty-Application

Adding the Empty Application template back to Xcode
30
star
22

UISVC-Compatibility-Demo

UISplitViewController setup that works on iOS 7 with all devices (iPhones + iPads).
Swift
30
star
23

VectorKit

A vector library and playground
Swift
29
star
24

D3Kit

An easy to use iOS library to access the Diablo 3 API.
Objective-C
28
star
25

OneNews-Swift

A work-in-progress universal iOS app for reading Hacker News, Designer News, and Product Hunt.
Objective-C
26
star
26

From-Scratch-Guides

Collection of guides & tutorials about building software from nothing.
25
star
27

WatchKit-by-Tutorials

Repository for all sample code in the upcoming WatchKit by Tutorials book from Ray Wenderlich.
Objective-C
20
star
28

IGListKit-Benchmarks

Benchmark tests for IGListKit
Swift
17
star
29

RNMDParser

Sample application experimenting with Obj-C Markdown parsing.
Objective-C
16
star
30

BottleRocket

An experimental CLI tool for generating normalized Swift models from example JSON responses.
Swift
12
star
31

New-Awesome-Blog

Showing off my awesome blog!
HTML
11
star
32

leadership

[WIP] My thoughts, principles, and resources on leadership.
11
star
33

NSString-RNSynonyms

A fast and lightweight solution to finding synonyms for words, built as a category on NSString.
Objective-C
11
star
34

RNTableView

A recreation of UITableView with only the bear essentials. Use this to start a highly customized UITableView.
Objective-C
11
star
35

WatchKit-Threading

A really simple demo app showing that threading in WatchKit works.
Objective-C
10
star
36

Arduino-HomeKit

HTML
9
star
37

RWDevCon-View-Controller-Transitions

Objective-C++
8
star
38

RNCardStreamController

A vertical section and cell navigation control inspired by Facebook Paper.
Objective-C
8
star
39

Armory-for-Diablo-3

Source code for my Armory app that is awaiting Apple approval.
Objective-C
7
star
40

WeatherExample

Building a Weather app example using ReactiveCocoa for raywenderlich.com
Objective-C
6
star
41

status-checklists

Action to that updates Issue state with checklists
TypeScript
5
star
42

create-child-issues

Action to generate child issues with labels.
JavaScript
5
star
43

Crateless

https://itunes.apple.com/us/app/crateless/id563997439?ls=1&mt=8
Objective-C
5
star
44

.github-template

4
star
45

Playground

Link: https://github.com mention: @rnystrom
3
star
46

RNNumberedTextView

Easily add customizable line numbers to UITextView.
Objective-C
2
star
47

issue-actions

WIP actions to sync parent and child issues.
JavaScript
2
star
48

M3Demo

Objective-C
2
star
49

HackerNews-iOS

Objective-C
1
star
50

Blog

Nothing special.
CSS
1
star
51

dotfiles

1
star
52

Read-Write-Protection-Perf

Teeny tiny profiling of different ways to protect mutations in your objects.
Objective-C
1
star
53

SunlightTest

Sample app to test background and text colors in sunlight
Objective-C
1
star