Giter Club home page Giter Club logo

contactimageview's Introduction

codebeat badge

ContactImageView


UIImageView subclass which generates text as the placeholder for an ImageView, supports IBDesignable and code.

Installation

CocoaPods comming soon

Manual

Drag ContactImageView.swift file to your project

Usage

Storyboard / IBDesignable

IBDesignable screenshot

Programmatic / Code

Option 1

let imageView = ContactImageView(frame: CGRect(x:10, y: 50, width: 100, height: 100))
imageView.setImageText(text: "George Kye", backgroundImage: UIImage(named: "bg"), username: true, textColor: UIColor.whiteColor(), fillColor: UIColor.blackColor(), circle: true) //backgroundImage is optional

Option 2

    let imageView2 = ContactImageView(frame: CGRect(x:130, y: 50, width: 100, height: 100))
    imageView2.text = "Joe Swanson" //Default = "GK"
    imageView2.username = true //Default = false (Returns initials of username if true)
    imageView2.textColor = UIColor.purpleColor() //Default = UIColor.whiteColor()
    imageView2.circle = false //Default = true
    imageView2.textFont = UIFont.italicSystemFontOfSize(30) //Default = UIFont.systemFontOfSize(22)
    imageView2.fontSize = 11 //Default = 22
    imageView2.fillColor = UIColor.greenColor() //Default = UIColor.lightGrayColor

Author

George Kye

License

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

TODO

  • CocoaPods
  • Add more tests

contactimageview's People

Watchers

Carabineiro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.