Skip to content

Instantly share code, notes, and snippets.

@yuvalt
yuvalt / UITextView+Placeholder.swift
Last active September 12, 2020 08:33 — forked from tijme/UITextViewPlaceholder.swift
The correct way to implement a placeholder in a UITextView (Swift). Allow the user to control the text, color, font and position of the placeholder. Everything (but font) can be modified from within Interface Builder.
//
// UITextViewPlaceholder.swift
// TextViewPlaceholder
//
// Original work Copyright (c) 2017 Tijme Gommers <[email protected]>
// Modified work Copyright (c) 2017 Yuval Tal <[email protected]>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights