Hier ist ein Auszug aus ...Was ist die Standardfarbe Apple Blue?
//
// UIColor.h
// UIKit
//
// Copyright (c) 2005-2013, Apple Inc. All rights reserved.
//
........
// Some convenience methods to create colours.
// These colors will be as calibrated as possible.
// These colors are cached.
+ (UIColor *)blackColor; // 0.0 white
+ (UIColor *)darkGrayColor; // 0.333 white
+ (UIColor *)lightGrayColor; // 0.667 white
+ (UIColor *)whiteColor; // 1.0 white
+ (UIColor *)grayColor; // 0.5 white
+ (UIColor *)redColor; // 1.0, 0.0, 0.0 RGB
+ (UIColor *)greenColor; // 0.0, 1.0, 0.0 RGB
+ (UIColor *)blueColor; // 0.0, 0.0, 1.0 RGB
+ (UIColor *)cyanColor; // 0.0, 1.0, 1.0 RGB
+ (UIColor *)yellowColor; // 1.0, 1.0, 0.0 RGB
+ (UIColor *)magentaColor; // 1.0, 0.0, 1.0 RGB
+ (UIColor *)orangeColor; // 1.0, 0.5, 0.0 RGB
+ (UIColor *)purpleColor; // 0.5, 0.0, 0.5 RGB
+ (UIColor *)brownColor; // 0.6, 0.4, 0.2 RGB
+ (UIColor *)clearColor; // 0.0 white, 0.0 alpha
Unglaublich, sie nicht enthalten "Standard Apple-Taste blau '" ........
In Projekte, wir haben immer das: aber es ist ein bisschen eine wilde Vermutung.
#define APPLEBLUE [UIColor \
colorWithRed:0/255.0 green:122/255.0 blue:255/255.0 alpha:1.0]
Alternativ Sie etwas irrsinnig komplex wie dies tun können .........
@implementation SomeButtons
{
UIColor *defaultColor;
}
-(id)initWithFrame:(CGRect)frame
{
defaultColor = [UIColor redColor];
if(self = [super initWithFrame:frame])
{
for (UIView *v in self.subviews)
if ([v isKindOfClass:[UIButton class]])
defaultColor = [(UIButton *)v titleColorForState:UIControlStateNormal];
}
return self;
}
-(id)initWithCoder:(NSCoder *)aCoder
{
if(self = [super initWithCoder:aCoder])
{
for (UIView *v in self.subviews)
if ([v isKindOfClass:[UIButton class]])
defaultColor = [(UIButton *)v titleColorForState:UIControlStateNormal];
}
return self;
}
Es gibt fast unglaublich scheint, ist nicht, ein einfacher Weg, um zu „Standard Apple Control Blue "für Button- und Textfarben.
Das ist die Art von Sache, die Android-Programmierer uns über lachen:/Kennt jemand einen einfacheren Weg? Ich hoffe wirklich, dass ich etwas Offensichtliches vermisse. Prost
Ab iOS7 der "Standard blue" ist die 'tintColor' der Ansicht. Es ist absolut nicht notwendig, die Standardfarbe überall in Ihrer App zu verwenden. Und nein, Apple wird die tintColor Ihrer App nicht ändern. –