UIImageViewWithWords 0.3.2

UIImageViewWithWords 0.3.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jan 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Ridvan Kucuk.



  • By
  • Ridvan Kucuk

UIImageViewWithWords

Usage

UIImageViewWithWords library is written in Swift and it gives you ability to create images with word’s initials. After creating UIImageView object, you just need one line!

This will add an image with initials to your UIImageView object with random background color with circular shaped.

imageView.imageWithString(word: "Ridvan Kucuk")

or you can set your preffered color (circular shaped by default)

imageView.imageWithString(word: "Ridvan Kucuk", color: UIColor.blueColor())

or if you don’t want it to be circular, you can just set circular to false

imageView.imageWithString(word: "Ridvan Kucuk", circular: false)

or if you want to set all preferences as you like you can use this:

imageView.imageWithString(word: "Ridvan Kucuk", color: nil, circular: true)

or if you want to add attributes to text, you can set attributes like this:

let fontAttributes = [NSForegroundColorAttributeName : UIColor.blueColor(),
NSFontAttributeName : UIFont.systemFontOfSize(40)
]
self.imageView.imageWithString(word: "Ridvan Kucuk", color: UIColor.orangeColor(), circular: true, fontAttributes: fontAttributes)

Screenshots

Installation

Manually

You can just drag and drop UIImageView+Words.swift file into your project.

Author

Ridvan Kucuk, [email protected]

License

UIImageViewWithWords is available under the MIT license. See the LICENSE file for more info.