hellokenta1024 / MultilinePlaceholderTextView

TextView with multiline placeholder written in Swift
https://cocoapods.org/pods/MultilinePlaceholderTextView
MIT License
5 stars 1 forks source link
ios swift textview ui utility

MultilinePlaceholderTextView

MultilinePlaceholderTextView is TextView with multiline placeholder

Usage

let placeholderTextView = MultilinePlaceholderTextView()
placeholderTextView.textContainerInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
placeholderTextView.placeholder = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
placeholderTextView.attributedPlaceholder = configureAttributedString()

result

Installation

CocoaPods

gem install cocoapods

Add following to your Podfile

platform :ios, '8.0'
use_frameworks!

target 'Your Target Name' do
  pod 'MultilinePlaceholderTextView'
end

Run

pod install

Carthage

brew install carthage

Add following to your Cartfile

github "KEN-chan/MultilinePlaceholderTextView"

Run

carthage update --platform ios

Requirements

License

MIT license