Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/nsnull0/ywnameplaceholder
- Owner: nsnull0
- License: mit
- Created: 2017-07-03T12:15:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-28T10:56:59.000Z (over 7 years ago)
- Last Synced: 2024-12-02T03:40:48.625Z (about 1 month ago)
- Topics: cocoapods, profile-picture, swift, swift-library, swift3
- Language: Shell
- Size: 115 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
## 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
```swiftfunc 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)