Latest 0.1.0
Homepage https://github.com/fg0815/initials-circle-swift
License MIT
Platforms ios 8.0, requires ARC
Authors

initials-circle-swift


By Feng Guo

Purpose

Initials Circle uses native Swift to generate an UIImage circle with initials by using one line of the code. The font will dynamically adjust based on the size of the circle.

Screenshot of initial circle exampe

How to use

initialIcon.image = FGInitialCircleImage.circleImage("John", lastName: "Appleseed", size: initialIcon.frame.size.width, borderWidth: 5, borderColor: UIColor.greenColor(), backgroundColor: UIColor.blueColor(), textColor: UIColor.whiteColor());

Simply pass strings of firstName, lastName, diameter of the circle, border color and width, background color and text color. It will automatically calcuate the best font size in the circle.

Latest podspec

{
    "name": "FGInitialsCircleSwift",
    "version": "0.1.0",
    "summary": "Dynamic Initial Circle",
    "description": "One line code to generate a custom circle with initial by using Swift",
    "homepage": "https://github.com/fg0815/initials-circle-swift",
    "license": "MIT",
    "authors": {
        "Feng Guo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/fg0815/initials-circle-swift.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "FGInitialCircleImage/FGInitialCircleImage/FGInitialCircleImage.swift"
}

Pin It on Pinterest

Share This