Swiftpack.co - giuseppebruno/SwiftPlaceholderTextView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by giuseppebruno.
giuseppebruno/SwiftPlaceholderTextView push
A simple UITextView. But with placeholder.
⭐️ 0
🕓 19 weeks ago
.package(url: "https://github.com/giuseppebruno/SwiftPlaceholderTextView.git", from: "push")


A simple UITextView. But with placeholder.

Swift Platforms Swift Package Manager


Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Once you have your Swift package set up, add SwiftPlaceholderTextView to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/giuseppebruno/SwiftPlaceholderTextView.git", .upToNextMajor(from: "1.0.0"))


Add a UIView from the Storyboard and subclass as SwiftPlaceholderTextView or create a SwiftPlaceholderTextView view programmatically.

import SwiftPlaceholderTextView


let spt = SwiftPlaceholderTextView()
spt.placeholder = "Insert text..."

That's it.


You can customize the TextView as follow:

  • cornerRadius: TextView corner radius. Default: 8
  • borderWidth: TextView border width. Default: 1
  • borderColor: TextView border color. Default: black
  • placeholderFont: TextView placeholder font. Default: system font
  • placeholderTextColor: TextView placeholder text color. Default: #CACACC
  • font: TextView text font. Default: system font
  • textColor: TextView text color. Default: black
  • returnKeyType: TextView return button
  • keyboardType: TextView keyboard type
  • returnKeyShouldDismissKeyboard: Return key should dismiss keyboard. Default: true


We welcome all contributions. If you found a bug, feel free to open an issue. If you want to contribute, submit a pull request.

Show your support 💪

  1. ⭐️ Star the repo
  2. 🗣 Share the repo with your friends


SwiftPlaceholderTextView is developed by Giuseppe Bruno.


SwiftPlaceholderTextView is released under the MIT license. See LICENSE for details.


Stars: 0
Last commit: 19 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

19 weeks ago

Allow placeholder to wrap

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics