Skip to content

Latest commit

 

History

History
54 lines (34 loc) · 1.48 KB

README.md

File metadata and controls

54 lines (34 loc) · 1.48 KB

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.