https://github.com/nsnull0/ywnameplaceholder
Generic Profile Picture Placeholder
https://github.com/nsnull0/ywnameplaceholder
cocoapods profile-picture swift swift-library swift3
Last synced: 5 months 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 (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-28T10:56:59.000Z (almost 9 years ago)
- Last Synced: 2025-07-10T00:17:00.806Z (12 months ago)
- Topics: cocoapods, profile-picture, swift, swift-library, swift3
- Language: Shell
- Size: 115 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YWNamePlaceHolder
[](https://travis-ci.org/nsnull0/YWNamePlaceholder)
[](https://cocoapods.org/pods/YWNamePlaceholder)
[](https://cocoapods.org/pods/YWNamePlaceholder)
[](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
```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)