<commit_before>UIImageView + Letters
=====================

Inspire by https://github.com/bachonk/UIImageView-Letters

An easy, helpful UIImageView extension that generates letter initials as a placeholder for user profile images, with a randomized background color if needed

![Screenshot](screen1.png)
![Screenshot](screen2.png)

### Installation

##### CocoaPods

Add this spec to your podfile:


Check out the [official guide](http://guides.cocoapods.org/using/index.html) for getting started with CocoaPods.

##### Manual

1. Drag the `UIImageView + Letters.swift` files into your project
2. Enjoy!

### Usage

##### Methods

Call the following methods on any `UIImageView` instance to set the image:

+ `func setImage(string: String?)`
+ `func setImage(string: String?, color: UIColor?)`
+ `func setImage(string: String?, color: UIColor?, circular: Bool)`
+ `func setImage(string: String?, color: UIColor?, circular: Bool, textAttributes: [String : Any]?)`

`string` is the string used to generate the initials. This should be a user's full name if available.

`color` is an optional parameter that sets the background color of the image. Pass in `nil` to have a color automatically generated for you.<commit_msg>Resize Readme images<commit_after>UIImageView + Letters
=====================

Inspire by https://github.com/bachonk/UIImageView-Letters

An easy, helpful UIImageView extension that generates letter initials as a placeholder for user profile images, with a randomized background color if needed

![Screenshot](screen1.png = 320x)
![Screenshot](screen2.png = 320x)

### Installation

##### CocoaPods

Add this spec to your podfile:


Check out the [official guide](http://guides.cocoapods.org/using/index.html) for getting started with CocoaPods.

##### Manual

1. Drag the `UIImageView + Letters.swift` files into your project
2. Enjoy!

### Usage

##### Methods

Call the following methods on any `UIImageView` instance to set the image:

+ `func setImage(string: String?)`
+ `func setImage(string: String?, color: UIColor?)`
+ `func setImage(string: String?, color: UIColor?, circular: Bool)`
+ `func setImage(string: String?, color: UIColor?, circular: Bool, textAttributes: [String : Any]?)`

`string` is the string used to generate the initials. This should be a user's full name if available.

`color` is an optional parameter that sets the background color of the image. Pass in `nil` to have a color automatically generated for you.
{'fraction_non_alphanumeric': 0.12200081333875559, 'fraction_numerical': 0.0056933712891419274, 'mean_word_length': 5.291560102301791, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4381224', 'n_tokens_mistral': 743, 'n_tokens_neox': 699, 'n_words': 285}