On Dec 14, 2016, at 09:38 , Andreas Falkenhahn <andr...@falkenhahn.com> wrote:
> 
> But, as I wrote in
> my last mail, this default look is pretty confusing and irritating because
> background and foreground color aren't consistent at all.

You’re assuming that the “default” colors of the various controls (the colors 
you get if you don’t configure colors) are supposed to be the “standard” 
colors. What you’ve discovered is that this isn’t true. When you create 
controls programmatically, you take on the responsibility of deciding how your 
app should look. If you decide it should look like other apps, then it’s also 
your responsibility to implement that. If you implement that, it’s also your 
responsibility to change your app when the look of the rest of the apps changes 
with the iOS version.

Looking at these controls as configured by IB, I see that the "IB default" is 
typically a clear background. 

— I’m not sure why your UILabel defaults to the same color as the foreground, 
but I don’t see why you should be concerned about programmatically setting its 
background color to clear. The IB default foreground color is black.

— The IB default background for a UIView is gray, and the IB default background 
for a UITableView is clear. Cell views in IB have a white background. That 
means that section headers and footers let the gray background show through, 
and details rows have white backgrounds.

— The IB default color for button text is the tint color, which happens to be 
blue.

According to that information, you should set the UILabel background to clear 
or white, and set your cell view backgrounds to white, and leave everything 
else alone.

Also, take a look at view appearances. You might be able to use that API to 
ensure a consist look for all your controls without configuring every property 
manually for each UIControl instance.

I’d emphasize that if you set colors manually, you can’t necessarily expect 
that iOS will adjust your colors for new system designs in the future, whereas 
it may do this for apps that use IB-configured controls. That’s something you 
might lose by opting out of IB.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to