ios - 求一个功能的实现思路和技术点(导航栏模糊显示图片)
PHP中文网
PHP中文网 2017-04-17 15:02:10
0
1
761

这个导航栏的背景是这张图片的顶部一部分(导航栏和背景图应该是一张图片,不是分开显示), 我需要怎么设置? 而且让文字能更好的显示在图片上面?

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
洪涛

Thoughts
- Set the background color to a transparent image
- Set the lines under the navigation bar to be transparent images
- Set status bar

(Hope to adopt)
[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleLightContent];
self.bgImageView.backgroundColor=[UIColor redColor];

UIImage *image = [UIImage imageNamed:@"bg.png"];
[self.navigationController.navigationBar setBackgroundImage:image
forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:image];

UIView *statusview=[[UIView alloc]initWithFrame:CGRectMake(0, -20, 320, 20)];
statusview.backgroundColor=[UIColor redColor];
[self.navigationController.navigationBar addSubview:statusview];

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template