Skip to content

Instantly share code, notes, and snippets.

@mluton
Created August 20, 2012 22:05
Show Gist options
  • Select an option

  • Save mluton/3408357 to your computer and use it in GitHub Desktop.

Select an option

Save mluton/3408357 to your computer and use it in GitHub Desktop.
Create OHAttributedLabel With NSAttributedString
NSMutableAttributedString *attrStr1 = [NSMutableAttributedString attributedStringWithString:@"inflation"];
[attrStr1 setFont:[UIFont fontWithName:@"CortinaSlate-Regular" size:62.8]];
OHAttributedLabel *label1 = [[[OHAttributedLabel alloc] initWithFrame:CGRectMake(90, 100, 588, 90)] autorelease];
label1.attributedText = attrStr1;
label1.backgroundColor = [UIColor clearColor];
label1.textColor = [UIColor blackColor];
[self.view addSubview:label1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment