Skip to content

Add option to specify letters’ text attributes#14

Merged
bachonk merged 2 commits intobachonk:masterfrom
andrewsardone:text-attributes
May 31, 2015
Merged

Add option to specify letters’ text attributes#14
bachonk merged 2 commits intobachonk:masterfrom
andrewsardone:text-attributes

Conversation

@andrewsardone
Copy link
Copy Markdown
Contributor

This adds the ability for a user to specify arbitrary NSAttributedString attributes to use in the letters text.

Why

My primary interest was to set the text color of the letters, but NSAttributedString attributes add a whole plethora of options.

Example

[imageView setImageWithString:@"John Smith" color:[UIColor redColor] circular:YES textAttributes:@{
    NSFontAttributeName: [UIFont fontWithName:@"Futura-Medium" size:44.0],
    NSForegroundColorAttributeName: [UIColor yellowColor],
}];

How to test

In the absence of formal unit tests, build and run the sample project and ensure nothing looks broken.

bachonk added a commit that referenced this pull request May 31, 2015
Add option to specify letters’ text attributes
@bachonk bachonk merged commit f8a531e into bachonk:master May 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants