Latest 1.0.0
Homepage https://github.com/lihkg/UIScrollView-LIFade
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit
Authors

CI Status
Version
License
Platform

UIScrollView-LIFade is a lightweight, fancy and non-intrusive UIScrollView fade effect category.

Features

  • Lightweight: This library contains only 2 files.
  • Easy-to-use: Just one line of code can add a fade effect to any of scrollview.
  • Non-intrusive: There is no need to make the UIScrollView class inherit from other base class.
  • Category: Works on all of UIScrollView including UITextView, UITableView, UICollectionView or UI/WKWebView (scrollView), etc.

Screeshot

UIScrollView Example
UITextView Example

Showcase

LIHKG Menu

Usage

UIScrollView-LIFade add a fade property to UIScrollView witch is a UIEdgeInsets to represent the fading insets.

#import "UIScrollView+LIFade.h"
UIScrollView *scrollView;
scrollView.fade = UIEdgeInsetsMake(64, 0, 64, 0); //Fade vertically (top 64 and bottom 64)
scrollView.fade = UIEdgeInsetsMake(0, 64, 0, 64); //Fade horizontally (left 64 and right 64)
scrollView.fade = UIEdgeInsetsMake(64, 64, 64, 64); //Fade 4 edges with 64
scrollView.fade = UIEdgeZero; //Remove fade effect

For webview (WKWebView or UIWebView)

WKWebView *webView;
webView.scrollView.fade = UIEdgeInsetsMake(64, 0, 64, 0);

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Only tested on iOS 8 or higher.

Installation

CocoaPods

  1. Add pod 'UIScrollView-LIFade' to your Podfile.
  2. Run pod install or pod update.

Manually

  1. Put UIScrollView+LIFade.h and UIScrollView+LIFade.m to your Xcode project.

License

UIScrollView-LIFade is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "UIScrollView-LIFade",
    "version": "1.0.0",
    "summary": "A lightwight, fancy and non-intrusive UIScrollView fade effect category",
    "description": "- Just one line of code can add a fade effect to any of UIScrollView including its subclass.n- Support horizontal, vertical or both.n- Non-intrusive, no need to subclass it.",
    "social_media_url": "https://lihkg.com",
    "homepage": "https://github.com/lihkg/UIScrollView-LIFade",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "lihkg-foresight": "[email protected]"
    },
    "source": {
        "git": "https://github.com/lihkg/UIScrollView-LIFade.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "source_files": "UIScrollView-LIFade/*.{h,m}",
    "public_header_files": "UIScrollView-LIFade/**/*.{h}"
}

Pin It on Pinterest

Share This