• Stars
    star
    286
  • Rank 144,690 (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 horizontal gradient which adjusts its appearance based on the positional attitude of an iOS device.

TLTiltHighlightView

TLTiltHighlightView is a UIView subclass with a horizontal gradient which adjusts its appearance based on the positional attitude of the device. The movement of the gradient when re-orientating the device is subtle – it's meant to augment keylines. This mimics the iOS 6 Music app (notice the gradient keylines at the very top and bottom of the images).

Left highlight Right highlight

How to Use

Drag TLTiltHighlightView.h and TLTiltHighlightView.m into your project. Make sure to add QuartzCore and CoreMotion to the list of libraries you link against.

Alternatively, you can use CocoaPods:

pod search TLTiltHighlightView

Create an instance of TLTiltHighlightView and add it to a view hierarchy. Optimal size is any width and 2pt tall (the keyline will always sit at the bottom of the TLTiltHighlightView).

TLTiltHighlightView *highlightView = [[TLTiltHighlightView alloc] initWithFrame:CGRectMake(0, 44, CGRectGetWidth(self.view.bounds), 2)];
[self.view addSubview:highlightView];

Our implementation

You can also change the background colour and the highlight colours.

highlightView.highlightColor = [UIColor redColor];
highlightView.backgroundColor = [UIColor clearColor];

Alternatively to instantiating the class programmatically, you can also use Interface Builder by selecting the Identity Inspector and changing the class of a view.

Interface Builder

The TLTiltHighlightView class supports all four interface orientations of iPhones and iPads.

Requirements

You must link with QuartzCore and CoreMotion. This project requires ARC and has been tested on iOS 6. It should work on iOS 5, but it has not been rigorously tested. If you use it successfully on iOS 5, please let us know!

More Repositories

1

Hyperlapse.js

JavaScript hyper-lapse utility for Google Street View.
JavaScript
2,350
star
2

Upcoming

Objective-C
882
star
3

UITableViewCell-Swipe-for-Options

A reproduction of the iOS 7 Mail app's swipe-to-reveal options
Objective-C
614
star
4

UICollectionView-Spring-Demo

A demonstration of UICollectionView and UIKit Dynamics
Objective-C
478
star
5

UIViewController-Transitions-Example

An example of how to use the new iOS 7 APIs to create custom view controller transitions.
Objective-C
268
star
6

UIKit-Dynamics-Example

An example of a sidebar menu animated completely with UIKit Dynamics on iOS 7
Objective-C
248
star
7

TLAlertView

A replacement for 1-button UIAlertView that uses Blurring and UIKit Dynamics on iOS 7.
Objective-C
173
star
8

TLTiltSlider

A UISlider subclass which adjusts its appearance based on the positional attitude of an iOS device.
Objective-C
102
star
9

SwiftSocketIODemo

Swift & SocketIO Demo
Objective-C
61
star
10

ofxAsciiArt

Add-on for openFrameworks - GPU based real-time ASCII Art filter.
C++
54
star
11

GaTrackEvents-Jquery-Plugin

GaTrackEvents is a lightweight jQuery plugin to quickly tag Google Analytic events through data attributes via HTML markup
JavaScript
27
star
12

ofxTVI

Touch Vision Interface client addon for openFrameworks
C++
25
star
13

node-carrot2

Carrot2 Document Clustering Server implementation for Node.js
JavaScript
16
star
14

iOS-8-GUI-for-Sketch-iPhone-6

A Sketch file of GUI elements found in the public release of iOS 8.
12
star
15

iOS-8-GUI-PSD-iPhone-6

A Photoshop template of GUI elements found in the public release of iOS 8.
8
star
16

iPad-GUI-for-Sketch-iOS-7

A Sketch file of GUI elements found in the public release of iOS 7.
3
star
17

iPhone-GUI-for-Sketch-iOS-7

A Sketch file of GUI elements found in the public release of iOS 7.
2
star
18

iPad-GUI-PSD-iOS-7

This Photoshop template contains all the major iOS elements to help you design your app.
1
star