Wednesday 17 April 2019

Sticky Parallax Header Widget

Check example in Git Hub:
https://github.com/Sylvia-YiyinShen/StickyParallaxHeaderDemo

Feature

  • Sticky header at the top
  • Parallax header
  • Auto resizing when dragging ended (toggle-able) 
  • Customisable child component changes during scrolling


How to use

1. Make you own header view subclass ParallaxHeaderBaseView

2. Initialize your own header view, then add the following code to viewDidAppear









3. Override the following functions








Advanced usage:
Override updateViews(scale: CGFloat) in your custom header view to animate child component during scrolling, e.g updating alpha, position, rotation, size....



No comments:

Post a Comment