Skip to content

ilyi1116/MMParallaxView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMParallaxView

CI Status Version License Platform

demo1 demo2

MMParallaxViewController

//Find your parallaxView in sub viewController
public var parallax: MMParallaxView.MMParallaxView? { get }

MMParallaxView

//Set top view
@IBOutlet weak public var parallaxTopView: UIView?
//Set bottom view
@IBOutlet weak public var parallaxBottomView: UIView?
//mask on Top View
public var maskAlpha: CGFloat
//set parallaxBottomView margin with view top
public var topMargin: CGFloat
//scroll observer
public var shiftStatus: ((MMParallaxView.MMParallaxView.ShiftStatus) -> Swift.Void)?
//set parallaxTopView height
public var heightType: MMParallaxView.MMParallaxView.TopHeightType
public var parallaxBottomOffsetTop: CGFloat
//set top view shift rate when you scroll bottom view (value need >= 1)
public var parallaxTopShiftRate: CGFloat
// value 0-1 to pause view when animate stop
public var pauseLocation: CGFloat?
public var status: MMParallaxView.MMParallaxView.ShiftStatus
required public init?(coder aDecoder: NSCoder)
public func showTopView()
public func hideTopView()
public func set(topView: UIView, bottomView: UIView, topHeight: MMParallaxView.MMParallaxView.TopHeightType)

Requirements

iOS 10.0+
Xcode 8.0+
Swift 3.0+, 4.0+

Installation

MMParallaxView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'MMParallaxView'

Author

millmanyang@gmail.com

License

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

About

ParallaxView with scroll effect

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 95.3%
  • Ruby 4.7%