All Projects → jegumhon → URParallaxScrollAnimator

jegumhon / URParallaxScrollAnimator

Licence: MIT license
Show an animation as far as moved scroll while scrolling at the scroll view

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to URParallaxScrollAnimator

smooth-parallax
Smooth Parallax makes it a lot easier to move objects when the page scroll with ease.
Stars: ✭ 66 (+94.12%)
Mutual labels:  parallax-scrolling
VPAutoComplete
A simple Auto Complete UITextField also support UITableView written in swift 4.2
Stars: ✭ 20 (-41.18%)
Mutual labels:  uitableview
XFSettings
基于UITableView的界面定制,目标是更快更方便地构建设置界面,特点是易维护、可扩展性强。
Stars: ✭ 62 (+82.35%)
Mutual labels:  uitableview
RevivalxUITableView
This source code provides example for UITableView using Alamofire and Haneke.
Stars: ✭ 13 (-61.76%)
Mutual labels:  uitableview
DropDownTableView
Here is a drop-down TableView.
Stars: ✭ 16 (-52.94%)
Mutual labels:  uitableview
AdoHideTableSection
An easy way to hide or show section in a tableview
Stars: ✭ 57 (+67.65%)
Mutual labels:  uitableview
TreeView
"TreeView - sub-cells simplified" (c). Enable subcells in UITableView with a single drop-in extension. CocoaPod:
Stars: ✭ 54 (+58.82%)
Mutual labels:  uitableview
Parallaxie
Easiest, Responsive and Customizable Parallax jQuery Plugin
Stars: ✭ 65 (+91.18%)
Mutual labels:  parallax-scrolling
Mentions
An easy way to add mentions and hashtags
Stars: ✭ 24 (-29.41%)
Mutual labels:  uitableview
Multiple-collectionView-in-Multiple-tableView-cells
UICollectionView is embed in UITableViewCell. The collection views are horizontal scrollable. The UITableView can have a section title for each UICollectionView and the number of UICollectionView is equal to the number of sections.
Stars: ✭ 23 (-32.35%)
Mutual labels:  uitableview
PagedLists
Paginated UITableView and UICollectionViews for iOS.
Stars: ✭ 69 (+102.94%)
Mutual labels:  uitableview
CarLens-iOS
CarLens - Recognize and Collect Cars
Stars: ✭ 124 (+264.71%)
Mutual labels:  lottie-ios
ZHTableViewGroup
Manger UITableView DataSource Cells
Stars: ✭ 19 (-44.12%)
Mutual labels:  uitableview
HDEmptyView
一个Swift语言封装的EmptyView显示库,可作用于WKWebView、UITableView、UICollectionView 无网络提醒或者空数据提醒
Stars: ✭ 29 (-14.71%)
Mutual labels:  uitableview
YAAdapterTableViewWithResponderChain
No description or website provided.
Stars: ✭ 15 (-55.88%)
Mutual labels:  uitableview
hongkong
A parallax scroll effect plugin
Stars: ✭ 46 (+35.29%)
Mutual labels:  parallax-scrolling
StackableTableView
A UITableView subclass that enables setting an array of views for both headers and footers utilizing UIStackView
Stars: ✭ 72 (+111.76%)
Mutual labels:  uitableview
GenericCells
Creating generic UITableViewCells and UICollectionViewCells instead of subclasses.
Stars: ✭ 81 (+138.24%)
Mutual labels:  uitableview
TinyCoordinator
The Swift version of ThinningCoordinator focus on lighter view controllers.
Stars: ✭ 18 (-47.06%)
Mutual labels:  uitableview
FakeFBWall
This is a fun app to generate fake facebook wall. All the fields visible on the screen are editable. Screenshots attached for better understanding of the app. Code written in Swift 4.
Stars: ✭ 27 (-20.59%)
Mutual labels:  uitableview

URParallaxScrollAnimator

Swift podplatform pod poddoc license travis codecov CocoaPods compatible FOSSA Status

FOSSA Status

What is this?

Show an animation as far as moved scroll while scrolling at the scroll view for Swift3
This code style is the Protocol Oriented Programming.
So some protocols are configured to implement the parallax scrolling.
This extends the scrollView to make the parallax scrolling feature on the Run time, using objc_getAssociatedObject.

To show the animation as scrolling, Lottie is able to be used instead of UIImageView.

In addition to, you can provide the funny factor, Haptic feedback.
The haptic feedback is provided by scrolling down.(But only for iOS 10)

sample

Requirements

  • iOS 8.1+
  • Swift 3.0+

Installation

Cocoapods

Add the following to your Podfile.

pod "URParallaxScrollAnimator"

Dependancy

Lottie-iOS

Examples

See the Example folder.
Run pod install and open the .xcworkspace file.

Usage

import URParallaxScrollAnimator

1. Set the Parallax Scroll maker

    // for example...
    func initView() {
        self.tableView.parallaxScrollExtension.makeParallaxScrollExtensionConfiguration(upperImage: #imageLiteral(resourceName: "cloud_by_ur2"), lowerImage: #imageLiteral(resourceName: "mountain_by_ur2"), lowerLottieData: nil)
    }
1.1. How to use Lottie
  • You can find the detail Lottie usage guide at the Lottie-iOS
  • add the lottie files in the project, and then just use the json file name to load the Lottie View sample

2. Set the scroll handling functions in each UIScrollViewDelegate functions

    func scrollViewDidScroll(_ scrollView: UIScrollView) {
        ...
        self.tableView.parallaxScrollExtension.parallaxScrollViewDidScroll(scrollView)
        ...
    }

    func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
        ...
        self.tableView.parallaxScrollExtension.parallaxScrollViewWillBeginDragging(scrollView)
        ...
    }

    func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
        ...
        self.tableView.parallaxScrollExtension.parallaxScrollViewDidEndDragging(scrollView)
        ...
    }

3. Call the Pull to refresh finishing function, if you need the Pull to refresh in your app

    // for example, if calling the reload function, 
    // you must call the "parallaxScrollViewDidPullToRefresh" function just after reloading
    func handleAPICallFinish() {
        ...
        self.tableView.parallaxScrollExtension.parallaxScrollViewDidPullToRefresh()
        ...
    }

4. 😀 Configurable parameters of URParallaxScrollAnimator 😀

  • parallaxScrollRatio : parallax ratio between the target scroll view and upper parallax view and lower parallax view.
  • backgroundColor : parallax scrollView's background color.
  • isEnabledHapticFeedback : enable the Haptic feedback. Default is "true".(but this feature is only for iOS 10)
  • isEnabledPullToRefresh : enable the Pull to refresh. Default is "false".
  • refreshAction : callback to handle the Pull to refresh.(If you set this, "isEnabledPullToRefresh" is set automatically "true")

To-Do

  • support gif for scrolling animation.

License

URParallaxScrollAnimator is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].