Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nsnull0/ywnameplaceholder

Generic Profile Picture Placeholder
https://github.com/nsnull0/ywnameplaceholder

cocoapods profile-picture swift swift-library swift3

Last synced: about 1 month ago
JSON representation

Generic Profile Picture Placeholder

Awesome Lists containing this project

README

        

# YWNamePlaceHolder
[![CI Status](https://travis-ci.org/nsnull0/YWNamePlaceholder.svg?branch=master)](https://travis-ci.org/nsnull0/YWNamePlaceholder)
[![Version](https://img.shields.io/cocoapods/v/YWNamePlaceholder.svg?style=flat)](https://cocoapods.org/pods/YWNamePlaceholder)
[![License](https://img.shields.io/cocoapods/l/YWNamePlaceholder.svg?style=flat)](https://cocoapods.org/pods/YWNamePlaceholder)
[![Platform](https://img.shields.io/cocoapods/p/YWNamePlaceholder.svg?style=flat)](https://cocoapods.org/pods/YWNamePlaceholder)

Profile Picture place Holder

## Availability
#### ⚠️ **This Library only Available to Swift > 3.0** ⚠️

## Screenshot
iPhone6s

## Installation

### CocoaPods

[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:

```bash
$ gem install cocoapods
```

```ruby
platform :ios, '9.0'
use_frameworks!

target '' do
pod 'YWNamePlaceHolder'
end
```

Then, run the following command:

```bash
$ pod install
```

## Initialization
YWNamePlaceHolder is UIView descent
```swift

//initiate with default length characters based on text received
let yourProfileContainer:YWNamePlaceHolder = YWNamePlaceHolder(originLocation: ,
_withSize: ,
_yourPlaceholder : ,
_fontPlaceHolder: )

//initiate with your preferred length of characters
let yourProfileContainer:YWNamePlaceHolder = YWNamePlaceHolder(originLocation: ,
_withSize: ,
_yourPlaceholder : ,
_fontPlaceHolder: ,
_constraintTextResultCount: )

```

## Functionality
```swift

func setFont(UIFont)

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

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

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

/*
change text and color to corresponding placeholder which is already initialize
size param is optional
*/
func setUpdate(str, color, contentColor)
func setUpdate(str, color, contentColor, size)

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

```

see Example project for more detail in initialization

## Support
- Updated occasionally for more functionality

## Credits
- Creator Yoseph Wijaya (Swift 3.0)
- BMInitialPlaceHoldersView (Objective-C)