1

So I've often used two UISearchBar's next to each other prior to iOS7 - as long as they have the same tint color they look absolutely fine, as though it's one bar with two fields.

However - I don't know if iOS7 applies a slight horizontal gradient, or if I'm just going crazy, but you can see based on this code the two bars should be identical in color:

if(IS_IOS_7) {
    [self.whatSearch setBarTintColor:[[EJCBrandingManager sharedManager] primaryColor]];
    [self.whereSearch setBarTintColor:[[EJCBrandingManager sharedManager] primaryColor]];
}
else {
    [self.whatSearch setTintColor:[[EJCBrandingManager sharedManager] primaryColor]];
    [self.whereSearch setTintColor:[[EJCBrandingManager sharedManager] primaryColor]];
}

But, it looks like this: !?

Both bars

Specifically, look at this bit (the join in the center):

Zoomed crossover

4

1 回答 1

1

iOS7 不使用任何纯色。iOS7 中的所有控件背景都使用了特殊的渐变。这就是你使用浅色的原因。现在甚至键盘都有渐变背景。您可以使用 Mac Utilities 中的 DigitalColor Meter 来验证这一点。

于 2013-10-01T19:55:20.257 回答