Skip to content

Commit

Permalink
Release 1.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
vpeschenkov committed Mar 2, 2019
1 parent f80e2d7 commit f2d1453
Show file tree
Hide file tree
Showing 27 changed files with 209 additions and 138 deletions.
2 changes: 1 addition & 1 deletion LetterAvatarKit.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|
spec.name = 'LetterAvatarKit'
spec.platform = :ios, '8.0'
spec.version = '1.1.6'
spec.version = '1.1.7'
spec.license = { :type => 'MIT' }
spec.homepage = 'https://github.com/vpeschenkov/LetterAvatarKit'
spec.authors = { 'Viktor Peschenkov' => 'v.peschenkov@gmail.com' }
Expand Down
2 changes: 1 addition & 1 deletion LetterAvatarKit/Info.plist
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.6</string>
<string>1.1.7</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
4 changes: 2 additions & 2 deletions LetterAvatarKitExample/Podfile.lock
@@ -1,5 +1,5 @@
PODS:
- LetterAvatarKit (1.1.5)
- LetterAvatarKit (1.1.7)

DEPENDENCIES:
- LetterAvatarKit (from `../`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
LetterAvatarKit: a96090fe45f99c2fec661c45260016f4667e5fb8
LetterAvatarKit: ec7c18ff8c35a522d329d120bd5fb4e9f29c1091

PODFILE CHECKSUM: 407d67c5c51bb4907e98b407342cb20aaddc7148

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions LetterAvatarKitExample/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions LetterAvatarKitObjcExample/Podfile.lock
@@ -1,5 +1,5 @@
PODS:
- LetterAvatarKit (1.1.6)
- LetterAvatarKit (1.1.7)

DEPENDENCIES:
- LetterAvatarKit (from `../`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
LetterAvatarKit: 8e10f84349688c5b04ee03b72507a2e08739010b
LetterAvatarKit: ec7c18ff8c35a522d329d120bd5fb4e9f29c1091

PODFILE CHECKSUM: acab86cc8cc5517bd2b945abae924096efac0c35

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions LetterAvatarKitObjcExample/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 35 additions & 28 deletions README.md
Expand Up @@ -2,7 +2,7 @@

![][Platform] ![][Travis] ![][Pods] ![][Swift Version] ![][Codacy Badge]

LetterAvatarKit is an ```UIImage``` extension that generates letter-based avatars. Here are some images showing what LetterAvatarKit does:
`LetterAvatarKit` provides an ```UIImage``` extension for generating letter-based avatars. There are a few images showing what you can achive by using this framework:

![][screenshots]

Expand All @@ -14,15 +14,43 @@ LetterAvatarKit is an ```UIImage``` extension that generates letter-based avatar

### CocoaPods

To install LetterAvatarKit using CocoaPods, add this line to your Podfile:
To install `LetterAvatarKit` using `CocoaPods`, add this line to your `Podfile`:
```ruby
pod "LetterAvatarKit", "1.1.6" # Swift 4.2
pod "LetterAvatarKit", "1.1.7" # Swift 4.2
pod "LetterAvatarKit", "1.1.5" # Swift 4.0
```

## Usage

You can configure the following properties of LetterAvatarBuilderConfiguration:
### Swift

By `LetterAvatarBuilderConfiguration`:
```swift
let configuration = LetterAvatarBuilderConfiguration()
configuration.username = "Letter Avatar"
avatarImageView?.image = UIImage.makeLetterAvatar(withConfiguration: configuration)
```
or simplier without the one:
```swift
avatarImageView?.image = UIImage.makeLetterAvatar(withUsername: "Letter Avatar")
```

### Objective-C

Using a configuration:
```objc
LAKLetterAvatarBuilderCongiguration *configuration = [[LAKLetterAvatarBuilderCongiguration alloc] init];
configuration.username = @"Letter Avatar";
self.avatarImageView.image = [UIImage lak_makeLetterAvatarWithConfiguration:configuration];
```
or simplier without the one:
```objc
self.avatarImageView.image = [UIImage lak_makeLetterAvatarWithUsername:@"Letter Avatar"];
```

## Customization

You can configure the following properties of `LetterAvatarBuilderConfiguration`:

```swift
/// The size of an avatar image.
Expand Down Expand Up @@ -54,35 +82,14 @@ open var lettersColor: UIColor = LAKUIColorByRGB(red: 236, green: 240, blue: 241
open var backgroundColors: [UIColor] = UIColor.colors
```

### Swift

Using a configuration:
```swift
let configuration = LetterAvatarBuilderConfiguration()
configuration.username = "Letter Avatar"
avatarImageView?.image = UIImage.makeLetterAvatar(withConfiguration: configuration)
```
or
```swift
avatarImageView?.image = UIImage.makeLetterAvatar(withUsername: "Letter Avatar")
```

### Objective-C

Using a configuration:
```objc
LAKLetterAvatarBuilderCongiguration *configuration = [[LAKLetterAvatarBuilderCongiguration alloc] init];
configuration.username = @"Letter Avatar";
self.avatarImageView.image = [UIImage lak_makeLetterAvatarWithConfiguration:configuration];
```
or
```objc
self.avatarImageView.image = [UIImage lak_makeLetterAvatarWithUsername:@"Letter Avatar"];
/// The letters font attributes.
open var lettersFontAttributes: [NSAttributedString.Key: Any]?
```

## Community

Questions, comments, issues, and pull requests are always welcome!
Questions, comments, issues, and pull requests are welcome!

## Contacts

Expand Down
2 changes: 1 addition & 1 deletion docs/Classes.html
Expand Up @@ -126,7 +126,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-02)</p>
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
8 changes: 4 additions & 4 deletions docs/Classes/LetterAvatarBuilder.html
Expand Up @@ -70,8 +70,8 @@ <h1>LetterAvatarBuilder</h1>
<div>
<code>
<a name="/c:@M@LetterAvatarKit@objc(cs)LAKLetterAvatarBuilder(im)makeAvatarWithConfiguration:"></a>
<a name="//apple_ref/swift/Method/makeAvatar(withConfiguration:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@LetterAvatarKit@objc(cs)LAKLetterAvatarBuilder(im)makeAvatarWithConfiguration:">makeAvatar(withConfiguration:)</a>
<a name="//apple_ref/swift/Method/makeAvatar(with:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@LetterAvatarKit@objc(cs)LAKLetterAvatarBuilder(im)makeAvatarWithConfiguration:">makeAvatar(with:)</a>
</code>
</div>
<div class="height-container">
Expand All @@ -87,7 +87,7 @@ <h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">@objc(makeAvatarWithConfiguration:)</span>
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">makeAvatar</span><span class="p">(</span><span class="n">withConfiguration</span> <span class="nv">configuration</span><span class="p">:</span> <span class="kt"><a href="../Classes/LetterAvatarBuilderConfiguration.html">LetterAvatarBuilderConfiguration</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UIImage</span><span class="p">?</span></code></pre>
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">makeAvatar</span><span class="p">(</span><span class="n">with</span> <span class="nv">configuration</span><span class="p">:</span> <span class="kt"><a href="../Classes/LetterAvatarBuilderConfiguration.html">LetterAvatarBuilderConfiguration</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UIImage</span><span class="p">?</span></code></pre>

</div>
</div>
Expand Down Expand Up @@ -123,7 +123,7 @@ <h4>Return Value</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-02)</p>
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
32 changes: 30 additions & 2 deletions docs/Classes/LetterAvatarBuilderConfiguration.html
Expand Up @@ -171,7 +171,7 @@ <h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">@objc(lettersFont)</span>
<span class="kd">open</span> <span class="k">var</span> <span class="nv">lettersFont</span><span class="p">:</span> <span class="kt">UIFont</span></code></pre>
<span class="kd">open</span> <span class="k">var</span> <span class="nv">lettersFont</span><span class="p">:</span> <span class="kt">UIFont</span><span class="p">?</span></code></pre>

</div>
</div>
Expand Down Expand Up @@ -229,6 +229,34 @@ <h4>Declaration</h4>
<pre class="highlight swift"><code><span class="kd">@objc(backgroundColors)</span>
<span class="kd">open</span> <span class="k">var</span> <span class="nv">backgroundColors</span><span class="p">:</span> <span class="p">[</span><span class="kt">UIColor</span><span class="p">]</span></code></pre>

</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/c:@M@LetterAvatarKit@objc(cs)LAKLetterAvatarBuilderConfiguration(py)lettersFontAttributes"></a>
<a name="//apple_ref/swift/Property/lettersFontAttributes" class="dashAnchor"></a>
<a class="token" href="#/c:@M@LetterAvatarKit@objc(cs)LAKLetterAvatarBuilderConfiguration(py)lettersFontAttributes">lettersFontAttributes</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The letters font attributes.</p>

</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">@objc(lettersFontAttributes)</span>
<span class="kd">open</span> <span class="k">var</span> <span class="nv">lettersFontAttributes</span><span class="p">:</span> <span class="p">[</span><span class="kt">NSAttributedString</span><span class="o">.</span><span class="kt">Key</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">]?</span></code></pre>

</div>
</div>
</section>
Expand All @@ -239,7 +267,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-02)</p>
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
2 changes: 1 addition & 1 deletion docs/Extensions.html
Expand Up @@ -91,7 +91,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-02)</p>
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
2 changes: 1 addition & 1 deletion docs/Extensions/UIImage.html
Expand Up @@ -239,7 +239,7 @@ <h4>Return Value</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-02)</p>
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
Expand Up @@ -126,7 +126,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-02)</p>
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
Expand Up @@ -70,8 +70,8 @@ <h1>LetterAvatarBuilder</h1>
<div>
<code>
<a name="/c:@M@LetterAvatarKit@objc(cs)LAKLetterAvatarBuilder(im)makeAvatarWithConfiguration:"></a>
<a name="//apple_ref/swift/Method/makeAvatar(withConfiguration:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@LetterAvatarKit@objc(cs)LAKLetterAvatarBuilder(im)makeAvatarWithConfiguration:">makeAvatar(withConfiguration:)</a>
<a name="//apple_ref/swift/Method/makeAvatar(with:)" class="dashAnchor"></a>
<a class="token" href="#/c:@M@LetterAvatarKit@objc(cs)LAKLetterAvatarBuilder(im)makeAvatarWithConfiguration:">makeAvatar(with:)</a>
</code>
</div>
<div class="height-container">
Expand All @@ -87,7 +87,7 @@ <h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">@objc(makeAvatarWithConfiguration:)</span>
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">makeAvatar</span><span class="p">(</span><span class="n">withConfiguration</span> <span class="nv">configuration</span><span class="p">:</span> <span class="kt"><a href="../Classes/LetterAvatarBuilderConfiguration.html">LetterAvatarBuilderConfiguration</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UIImage</span><span class="p">?</span></code></pre>
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">makeAvatar</span><span class="p">(</span><span class="n">with</span> <span class="nv">configuration</span><span class="p">:</span> <span class="kt"><a href="../Classes/LetterAvatarBuilderConfiguration.html">LetterAvatarBuilderConfiguration</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UIImage</span><span class="p">?</span></code></pre>

</div>
</div>
Expand Down Expand Up @@ -123,7 +123,7 @@ <h4>Return Value</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-02)</p>
<p>&copy; 2019 <a class="link" href="hhttps://github.com/vpeschenkov" target="_blank" rel="external">Victor</a>. All rights reserved. (Last updated: 2019-03-03)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down

0 comments on commit f2d1453

Please sign in to comment.