Latest 1.0.0
Homepage https://github.com/jaydee3/SimpleMotionEffects
License MIT
Platforms ios
Authors

This UIView Category provides a simpler API to create motion effects faster and in only a single line of code.

Screenshot

Installation

Cocoapods

pod 'SimpleMotionEffects'

Manually

Add the UIView+SimpleMotionEffects.{h,m} files to your project.

Usage

  1. Import the header #import "UIView+SimpleMotionEffects.h"
  2. Use any of the following methods on any UIView.

Just specify how much a view should move at maximum on both axes, when tilting:

- (void)addMotionEffectWithMovement:(CGPoint)movement;

Or specify, how much a view should move on both axes reacting to horizontalTilt oder verticalTilt only:

- (void)addMotionEffectOnHorizontalTilt:(CGPoint)horizontalMovement
                         onVerticalTilt:(CGPoint)verticalMovement;

Or for more granular settings:

- (void)addMotionEffectWithType:(UIInterpolatingMotionEffectType)type
                        keyPath:(NSString*)keyPath
                          value:(CGFloat)value;

- (void)addMotionEffectWithType:(UIInterpolatingMotionEffectType)type
                        keyPath:(NSString*)keyPath
                       minValue:(CGFloat)minValue
                       maxValue:(CGFloat)maxValue;

Twitter

I’m @jaydee3 on Twitter.

Latest podspec

{
    "name": "SimpleMotionEffects",
    "version": "1.0.0",
    "summary": "Simply add UIView Motion Effects in a single line!",
    "description": "This UIView Category provides the most simple API to create motion effects faster and in only a single line of code.",
    "homepage": "https://github.com/jaydee3/SimpleMotionEffects",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "Markus Emrich": "[email protected]"
    },
    "platforms": {
        "ios": null
    },
    "source": {
        "git": "https://github.com/jaydee3/SimpleMotionEffects.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "Classes",
        "SimpleMotionEffects/**/*.{h,m}"
    ],
    "requires_arc": false
}

Pin It on Pinterest

Share This