WeChat red envelope style navigation bar style switching, color transition switching, navigation bar background image switching, navigation bar transparency switching, navigation bar switching
Swift version of VHLNavigation
Reference study
Three options for switching between transparent and translucent NavigationBar
HansNavController
WRNavigationBar
Manually drag the VHLNavigation
folder into the project
Or import pod 'VHLNavigation'
through pod
Import the header file: #import "VHLNavigation.h"
[self vhl_setNavBarHidden:YES];
[self vhl_setNavBarBackgroundImage:[UIImage imageNamed:@"navbg"]];
[self vhl_setNavBarBarTintColor:[UIColor colorWithRed:0.35 green:0.42 blue:0.58 alpha:1.00]];
[self vhl_setNavigationSwitchStyle:VHLNavigationSwitchStyleFakeNavBar];
设置导航栏背景颜色
[self vhl_setNavBarBackgroundColor:[UIColor whiteColor]];
设置导航栏透明度
[self vhl_setNavBarBackgroundAlpha:1.0f];
设置状态栏样式
[self vhl_setStatusBarStyle:UIStatusBarStyleLightContent];
设置导航栏标题颜色
[self vhl_setNavBarTitleColor:[UIColor whiteColor]];
设置导航栏按钮颜色
[self vhl_setNavBarTintColor:[UIColor whiteColor]];
设置是否隐藏分割线
[self vhl_setNavBarShadowImageHidden:YES];
2019.09.28Fix the problem of transparency switching color under iOS 13
2019.09.27 Fixed the crash issue when clicking the default return button in the navigation bar under iOS 13. Adapted to iOS 13 modal jump PageSheet switching style.
2019.03.15 Fixed the abnormal height problem of navigation bar such as sharing hotspots and making phone calls.
2018.12.27 Add separate setting to ignore specified ViewController
2018.12.04 Fixed an issue where the navigation bar may be covered under modal jump.
2018.11.09 Added setting whether side sliding gesture is enabled
2018.11.05 Adapt to iPhone XR and other status bars
2018.07.03 Optimize the display effect of switching from status bar + navigation bar to no status bar + no navigation bar
2018.07.02 Fixed the issue where the navigation bar may flash when clicking the TabBar under a TabBarController.
2018.06.14 Added the ability to set the background view of the navigation bar, which can switch between WeChat's dynamic blur effect and other effects.
2018.06.12 Fixed an issue where when popping from a status bar to a status bar, the bottom content will be displayed due to the narrowing of the navigation bar.
2018.06.07 Fixed a problem where the navigation bar may have a white background under a modal jump.
2018.04.28 Fixed a problem that caused the navigation bar display to be offset when inherited from UITableViewController.
2017.09.23 Fixed an issue where a white background would appear when the hidden navigation bar is switched to another style navigation bar. Add floating navigation bar.
2017.09.21 Adapted to iOS11 and iPhone X
2017.09.01 Add transparency switch