After iPhone 5c announcement, i'm curious if anybody knows an API how to get an iPhone 5c colour? I'm sure everyone will find it convenient loading a corresponding UI colour scheme to the device colour.
I'm thinking about wrapping it in something like the UIDevice category, which will return a UIColor.
Update: @ColinE and @Ortwin Gentz has indicated the availability of private UIDevice instance method calls for it.
Please note, that in case of iPhone 5c, what you are really looking for is deviceEnclosureColor, as deviceColor will always return #3b3b3c, as it is a front colour.
method signature:
-(id)_deviceInfoForKey:(struct __CFString { }*)arg1
UIDevice category for it:
@interface UIDevice (deviceColour)
- (id)_deviceInfoForKey:(struct __CFString { }*)arg1;
- (NSString*)deviceColourString_UntilAppleMakesItPublic;
- (NSString*)deviceEnclosureColour_UntilAppleMakesItPublic;
@end
@implementation UIDevice (deviceColour)
- (NSString*)deviceColourString_UntilAppleMakesItPublic
{
return [self _deviceInfoForKey:@"DeviceColor"];
}
- (NSString*)deviceEnclosureColour_UntilAppleMakesItPublic
{
return [self _deviceInfoForKey:@"DeviceEnclosureColor"];
}
@end