SmoothNavDemo icon indicating copy to clipboard operation
SmoothNavDemo copied to clipboard

平滑的在切换界面时隐藏/显示导航栏的demo

Results 21 SmoothNavDemo issues
Sort by recently updated
recently updated
newest added

iOS12 运行不了上来就崩溃,数组越界,[[self.navigationBar subviews] objectAtIndex:0]; 为什么self.navigationBar subviews 一个控件都没有,做了什么操作么?

UIView *barBackgroundView = [self.navigationBar subviews].firstObject;// _UIBarBackground iOS12 xr机型, 现在的导航栏下边有俩个imageview, 设置父视图barBackgroundView的alpha为0; 还是会显示一条白色, backgroundImageView这个view的alpha还是1 现在我这么做 backgroundImageView.hidden = alpha == 0?YES:NO; 解决的效果

将UINavigationController+Cloudox.m 方法“- (void)setNeedsNavigationBackground:(CGFloat)alpha” 中的barBackgroundView、backgroundImageView、backgroundEffectView修改成下方…… // 导航栏背景透明度设置 UIView *barBackgroundView;// _UIBarBackground UIImageView *backgroundImageView;// UIImageView UIView *backgroundEffectView;// UIVisualEffectView if (@available(iOS 10.0, *)) {// barBackgroundView = [self.navigationBar.subviews objectAtIndex:0]; backgroundImageView = [barBackgroundView.subviews objectAtIndex:0]; backgroundEffectView =...

iOS 9.3.5 应该是UINavigationBar的层级结构不一样造成了崩溃 ``` // 设置导航栏背景透明度 - (void)setNeedsNavigationBackground:(CGFloat)alpha { // 导航栏背景透明度设置 UIView *barBackgroundView = [[self.navigationBar subviews] objectAtIndex:0];// _UIBarBackground UIImageView *backgroundImageView = [[barBackgroundView subviews] objectAtIndex:0];// UIImageView if (self.navigationBar.isTranslucent) { if (backgroundImageView...

- (void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; self.navBarBgAlpha = @"0"; } iOS11这种写法,无法隐藏_UIBarBackground