这就是我的应用程序中的导航栏的样子:
这就是我希望它的样子(iTunes App,视频页面):
如何在导航栏中实现这种明亮多彩的模糊效果?
这是我到目前为止使用的代码:
navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.5];
navigationController.navigationBar.tintColor = [UIColor colorWithRed:88.0/255.0 green:204.0/255.0 blue:249.0/255.0 alpha:1.0];
navigationController.navigationBar.translucent=YES;
NSDictionary *navbarTitleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:1 green:1 blue:1 alpha:1.0],UITextAttributeTextColor,
[UIColor clearColor], UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(-1, 0)], UITextAttributeTextShadowOffset, nil];
[[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes];
答案 0 :(得分:1)
将navigationaBar
样式设置为半透明。
self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
self.navigationController.navigationBar.translucent = YES;