Domanda

I have the following code:

UILabel *registerLabel = [ [UILabel alloc ] initWithFrame:CGRectMake(20.0, 90.0, [self screenWidth], 43.0) ];
registerLabel.textAlignment =  NSTextAlignmentLeft;
registerLabel.textColor = [UIColor whiteColor];
registerLabel.backgroundColor = [UIColor blackColor];
registerLabel.font = [UIFont fontWithName:@"Helvetica Neue" size:(20.0)];
//registerLabel.adjustsFontSizeToFitWidth = YES;
registerLabel.text = @"Register";

But I see in some of the ios 7 demo apps (like calendar) the font is large but much thinner. I tried using Helevetica Neue Light but that doesn't work. Is there a way to make the font thinner or what font are they using?

È stato utile?

Soluzione

I found the answer to be this:

registerLabel.font = [UIFont fontWithName:@"HelveticaNeue-Light" size:(36.0)];

.font is what you need

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top