Latest 1.3
Homepage https://github.com/nsnull0/YWNamePlaceholder
License MIT
Platforms ios 9.0, requires ARC
Frameworks UIKit
Authors

YWNamePlaceHolder

CI Status
Version
License
Platform

Profile Picture place Holder

Availability

⚠️ This Library only Available to Swift > 3.0 ⚠️

Screenshot V1.1

Demo

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
pod 'YWNamePlaceHolder'
end

Then, run the following command:

$ pod install

Initialization

YWNamePlaceHolder is UIView descent


//initiate with default length characters based on text received
let yourProfileContainer:YWNamePlaceHolder = YWNamePlaceHolder(originLocation: <CGPoint> ,
_withSize: <CGFloat> ,
_yourPlaceholder :<String> ,
_fontPlaceHolder: <UIFont>)

//initiate with your preferred length of characters
let yourProfileContainer:YWNamePlaceHolder = YWNamePlaceHolder(originLocation: <CGPoint> ,
_withSize: <CGFloat> ,
_yourPlaceholder :<String> ,
_fontPlaceHolder: <UIFont>,
_constraintTextResultCount: <Int>)

Functionality


func setFont(UIFont)

/*
TextColor: setting the text profile color
ContentColor: setting the circle background content
*/
func setColor(TextColor<UIColor>, ContentColor<UIColor>)

/*
fontSize: setting the text size spesificly and static
*/
func setFontSize(fontSize<CGFloat>)

/*
to list font that used in the device
*/
func debugListFontDevice() -> Array<String>

/*
change text and color to corresponding placeholder which is already initialize
size param is optional
*/
func setUpdate(str<String>, color<UIColor>, contentColor<UIColor>)
func setUpdate(str<String>, color<UIColor>, contentColor<UIColor>, size<CGFloat?>)

/*
change your placeholder text with your preferred length of characters which is already initialize
*/
setUpdateTextLength(count<Int>)

see Example project for more detail in initialization

Support

  • Updated occasionally for more functionality

Credits

  • Creator Yoseph Wijaya (Swift 3.0)
  • BMInitialPlaceHoldersView (Objective-C)

Latest podspec

{
    "name": "YWNamePlaceholder",
    "version": "1.3",
    "summary": "YWNamePlaceholder Generic Place holder profile",
    "description": "Place holder of every empty profile picture. Lightweight circular profile initial for placeholder before adding images",
    "requires_arc": true,
    "homepage": "https://github.com/nsnull0/YWNamePlaceholder",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "yoseph_wijaya": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/nsnull0/YWNamePlaceholder.git",
        "tag": "1.3"
    },
    "source_files": "YWNamePlaceholder/**/*.{swift}",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This