ios - iPad 设置应用程序背景颜色

标签 ios objective-c ipad ios6 settings

有人知道 iPad 设置应用程序的背景颜色是什么吗?如果是这样,重现它的值是多少?

谢谢!

最佳答案

使用 Sip 从模拟器获取颜色:

[UIColor colorWithRed:0.85f green:0.86f blue:0.89f alpha:1.00f];

编辑:

看起来背景颜色是渐变的,而不是平面颜色。但如果你喜欢纯色,那应该适合你。如果没有,您可以添加渐变:

#import <QuartzCore/QuartzCore.h>

CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = view.bounds;
gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithRed:0.89f green:0.90f blue:0.92f alpha:1.00f] CGColor], (id)[[UIColor colorWithRed:0.82f green:0.82f blue:0.85f alpha:1.00f] CGColor], nil];
[view.layer insertSublayer:gradient atIndex:0];

如果您想在 Storyboard 中更改为该值,请单击您要更改其背景颜色的 View 。单击属性检查器中的背景颜色按钮,然后为 RGB 值添加以下内容:

红色:208 绿色:210 蓝色:216

enter image description here

关于ios - iPad 设置应用程序背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15580677/

相关文章:

iOS:为应用程序安装过程添加背景图像

ios - iPadOS 13 上的屏幕旋转故障

iphone - 取消 ASINetworkQueue 中的一个(或多个)特定 ASIHTTPRequest

ios - 检查哪个委托(delegate)插入模态视图 Controller 的优雅解决方案是什么?

iphone - NavigationController 和模态视图

ios - 静态链接dylib

ios - 不同设备上 int 类型的大小不同

ios - 注销时如何从 uber API 中删除访问 token ?

objective-c - cocoa : Resetting NSUserDefaults

iphone - UITableViewCell 中的 UITextView