/HWNavigationView

The HWNavigationView is a navigation view that changes shape depending on the position of the scroll.

Primary LanguageSwiftMIT LicenseMIT

HWNavigationView

The HWNavigationView is a navigation view that changes shape depending on the position of the scroll.

Demos

Demo1

Demo1
9

example

navigationView.addEffect(object: myTitleLabel, effets: [.moveHorizonalDirection(from: .left(offset: 10), to: .center(offset: 0)),.labelFontSizeIncrease(minFontSize: 20, maxFontSize: 25)])

Note: The ViewDidScroll function of HWNavigationView should be invoked from the original Scrollview Delegate function, ViewDidScroll function.

func scrollViewDidScroll(_ scrollView: UIScrollView) {
    hwNavigationView.scrollViewDidScroll(scrollView)
}

Demo2

Demo2
9

example

navigationView.addEffect(object: titleLabel, effets: [.replaceConstant(leading: nil, trailling: nil, top: HWNavigationView.HWNavigationFromTo(from:0,to: -30), bottom: nil),.fadeOut(minAlpha: 0, maxAlpha: 1)])
navigationView.addNavigationResizableHeight(from: 40, to: 60)
navigationView.addEffect(object: self.imageView, effets: [.fadeIn(minAlpha: 0, maxAlpha: 1),.replaceConstant(leading: HWNavigationView.HWNavigationFromTo(from: 30, to: 10), trailling: nil, top: HWNavigationView.HWNavigationFromTo(from: 0, to: 15), bottom: nil),.viewSizeIncrease(minWidth: 20, maxWidth: 30, minHeight: 20, maxHeight: 30)])

Note: The ViewDidScroll function of HWNavigationView should be invoked from the original Scrollview Delegate function, ViewDidScroll function.

func scrollViewDidScroll(_ scrollView: UIScrollView) {
    hwNavigationView.scrollViewDidScroll(scrollView)
}

Requirements

  • iOS 11.0+
  • Xcode 12+
  • Swift 5.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate HWNavigationView into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'HWNavigationView', '~> 1.0'