Skip to content

Simple UITextView with customizable placeholder and counter characters.

License

Notifications You must be signed in to change notification settings

aguilarpgc/PGCTextView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PGCTextView

Swift License Platform

Simple Customizable UITextView

Works in xib file and code.

Installation

Manual

Add PGCTextView folder into your project.

Example Usage

Code

let customTextView = PGCTextView()

customTextView.counterColor = .blue
customTextView.counterFont = UIFont.italicSystemFont(ofSize: 11)
customTextView.font = UIFont.systemFont(ofSize: 25)
customTextView.frame = CGRect(x: 20.0, y: 100.0, width: 150.0, height: 200.0)
customTextView.isCounterAscending = true
customTextView.isCounterVisible = true
customTextView.maxCharacters = 50
customTextView.placeholderColor = .darkGray
customTextView.placeholderFont = UIFont.italicSystemFont(ofSize: 25)
customTextView.placeholderText = "Placeholder"
customTextView.text = ""
customTextView.textColor = .black

self.view.addSubview(customTextView)

Xib file

Add PGCTextView in Identity inspector > Custom Class > Class.

Class

Modify custom properties for placeholder and counter.

Xib

License

PGCTextView is released under the MIT license.

About

Simple UITextView with customizable placeholder and counter characters.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages