我想检查iOS设备的版本是否大于3.1.3
我尝试过的东西:
[[UIDevice currentDevice].systemVersion floatValue]
Run Code Online (Sandbox Code Playgroud)
但它不起作用,我只想要一个:
if (version > 3.1.3) { }
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?
如何在iOS 7中为我的半透明导航栏获得正确的颜色?导航栏只是将给定的颜色调整为更亮的颜色.改变颜色的亮度或饱和度也无法提供正确的结果.
谁有同样的麻烦?它似乎以某种方式工作,看着Facebook:他们有自己的颜色和半透明的导航栏.
编辑:只是为了说清楚:我需要条形图是半透明的,不透明(有一些阿尔法),不是坚实的!http://en.wikipedia.org/wiki/Transparency_and_translucency
编辑:现在发布到Apple BugReporter
有谁知道Facebook用于模糊工具栏的内容?

现在,我知道有关iOS 7模糊的无数线程.他们都来到这些相同的解决方案:
我已经在Apple Dev论坛上详细阅读过,看起来这对于Apple工程师来说也是一项技术挑战.Facebook将实时模糊与我所描述的两种方法相结合.任何的想法?
我想在我的观点上添加模糊效果,我用a UIToolbar来做到这一点.但是当我尝试在其上添加条纹色调时UIToolbar,会发生一些奇怪的事情.
这是我以前添加的代码UIToolbar,非常基本,没什么花哨的:
UIToolbar *toolbar = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, self.blurView.frame.size.width, self.blurView.frame.size.height)];
[self.blurView addSubview:toolbar];
Run Code Online (Sandbox Code Playgroud)
在我添加之前barTintColor,一切看起来都很好:

但在我添加条纹色调后:
[toolbar setBarTintColor:[UIColor colorWithWhite:0.000 alpha:0.500]];
Run Code Online (Sandbox Code Playgroud)
工具栏下的所有内容都变为黑白:

起初我认为颜色或透明度有问题,我一直在玩不同的颜色和不同的透明度.只要我使用setBarTintColor,它就会变成黑色和白色.例如,随机蓝绿色:

我无法使我的UINavigationBar完全透明,只显示白色文本和按钮,因此我用于ViewController背景的ImageView在顶部完全可见.
我已尝试过其他代码:
// Set the BarTintColor to translucent and text colors to white
self.navigationController.navigationBar.barTintColor = [UIColor clearColor];
self.navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObject:[UIColor whiteColor] forKey:UITextAttributeTextColor];
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
Run Code Online (Sandbox Code Playgroud)
不过这是结果,一个黑色的UINavigationBar的,我怎么能解决这个问题?
该应用程序从此ViewController推送到此ViewController,其中UINavigationBar淡出为红色.还有其他几个ViewControllers执行相同的淡入淡出动画,因此需要UINavigationBar
带有"Ny"按钮的第一个ViewController的部分将得到改进;) - 只需要开始使用像Photoshop这样的工具
谢谢!埃里克
我在AppDelegate中为Nav Bar设置了一种特殊颜色:
[[UINavigationBar appearance]setBarTintColor:[UIColor colorWithRed:0 green:(41.0f/255.0f) blue:(103.0f/255.0f) alpha:1]];
Run Code Online (Sandbox Code Playgroud)
但是随后显示的RGB值是:R:12 G:48 B:110.iOS似乎只是把价值提高了一点.我怎么能避免这种情况?(因为它看起来很难看)当我给同一种颜色定制的TableViewSection时,它是对的.
截图:
的NavBar:

自定义TableViewSection:
