Skip to content

a1049145827/TransparentNavigation

Repository files navigation

TransparentNavigation

iOS Transparent NavigationBar

Features

  • Transparency changes during page switching
  • Navigation Bar Transparency Change When ScrollView Slides
  • Fluent switching when the gesture slides back
  • System adaptation for iOS8+

Example

example

Installation

cocoapods:

pod 'TransparentNavigation'

Usage

set the alpha in viewController's function: -viewWillAppear: likes the demo

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    self.navBarBgAlpha = @1;
}

Reference article:

如何优雅地在Swift4中实现Method Swizzling