PlaceholderLabel 1.1.0

PlaceholderLabel 1.1.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Aug 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Eric Chang.




  • By
  • chiahan1123

PlaceholderLabel

Gives UILabel options to set a placeholder text and placeholder text color.

Installation

PlaceholderLabel is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'PlaceholderLabel'

Example

screen shot 2017-08-13 at 10 28 24 pm

You can set the placeholder text and placeholder text color from the Storyboard or you can also do the following:

@IBOutlet weak var nameLabel: PlaceholderLabel!
@IBOutlet weak var genderLabel: PlaceholderLabel!
@IBOutlet weak var birthdayLabel: PlaceholderLabel!

override func viewDidLoad() {
  super.viewDidLoad()
  nameLabel.text = "Eric"
  genderLabel.text = "Male"
  birthdayLabel.placeholder = "n/a"
  birthdayLabel.placeholderColor = .gray
}

License

PlaceholderLabel is available under the MIT license. See the LICENSE file for more info.