For number 1, if this is not an Xcode question, you have an application located in /Applications/Utilities on your Mac, which allows you to get the color of something displayed on your screen. (Sorry, I do not know the name of the application in English, but it may have a "color"). Then install UIColor just like you: [UIColor colorWithRed: 100.0/255.0f green:200.0/255.0f blue:150.0/255.0f alpha:1.0];
For number 2, the font name is not always the file name. Once you have added your font to the project, use it to register a list of all the font names available in your application:
for (NSString* family in [UIFont familyNames]) { NSLog(@"%@", family); for (NSString* name in [UIFont fontNamesForFamilyName: family]) { NSLog(@" %@", name); } }
Put this code in AppDelegate in application:didFinishLaunchingWithOptions:
Once you find your font name, use myLabel.font = [UIFont fontWithName:@"My-Font-Name" size:10]; to install the font.
source share