Latest0.1.1
Homepagehttps://github.com/lozy219/RubAndReveal
LicenseMIT
Platformsios 7.0
Authors

RubAndReveal is a iOS library for you to create the effect of rubbing/wiping a front layer of image to reveal the back image.

demo

Installation

Using CocoaPods

pod 'RubAndReveal', '~> 0.1.1'

Usage

Objective-C

  • instantiate the RubAndReveal view

    RubAndReveal *demoView = [[RubAndReveal alloc] init];
  • configure the frame of the view

  • set the image

    [demoView configureLayoutWithBackImage:backImage
                                frontImage:frontImage];
  • add to subview

    [self.view addSubview demoView];
  • reset image if you want

    [demoView resetImage];

Swift

  • instantiate the RubAndReveal view

    let demoView = RubAndReveal()
  • configure the frame of the view

  • set the image

    demoView.configureLayoutWithBackImage(backImage, frontImage: frontImage)
  • add to subview

    self.view.addSubview(demoView)
  • reset image if you want

    demoView.resetImage()

Customization

you can change these properties for the RubAndReveal view

  • NSString *lineCap: it specifies the shape of the endpoints of an open path when rub
  • NSString *lineJoin: it specifies the style for join of the rubbing path
  • CGFloat lineWidth: it specifies the width of the rubbing stroke

Latest podspec

{
    "name": "RubAndReveal",
    "version": "0.1.1",
    "summary": "RubAndReveal help you create a view, and rub it to get the underneath view.",
    "description": "A longer description of RubAndReveal in Markdown format.nn* Think: Why did you write this? What is the focus? What does it do?n* CocoaPods will be using this to generate tags, and improve search results.n* Try to keep it short, snappy and to the point.n* Finally, don't worry about the indent, CocoaPods strips it!",
    "homepage": "https://github.com/lozy219/RubAndReveal",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Mingyu Lei": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/lozy219/RubAndReveal.git",
        "tag": "v0.1.1"
    },
    "source_files": "RubAndReveal/*",
    "public_header_files": "RubAndReveal/*.h"
}

Pin It on Pinterest

Share This