Commit fa08e443 by Daniel Dahan

development: combining TextView with Editor

parent 689efbd7
...@@ -223,7 +223,7 @@ open class Editor: View { ...@@ -223,7 +223,7 @@ open class Editor: View {
} }
/// Reference to the TextView. /// Reference to the TextView.
open fileprivate(set) var textView: UITextView! open fileprivate(set) var textView: TextView!
/// A reference to an EditorDelegate. /// A reference to an EditorDelegate.
open weak var delegate: EditorDelegate? open weak var delegate: EditorDelegate?
...@@ -312,7 +312,7 @@ extension Editor { ...@@ -312,7 +312,7 @@ extension Editor {
/// Prepares the textView. /// Prepares the textView.
fileprivate func prepareTextView() { fileprivate func prepareTextView() {
textView = UITextView(frame: .zero, textContainer: textContainer) textView = TextView(textContainer: textContainer)
textView.delegate = self textView.delegate = self
addSubview(textView) addSubview(textView)
} }
......
...@@ -81,6 +81,15 @@ open class TextView: UITextView { ...@@ -81,6 +81,15 @@ open class TextView: UITextView {
} }
} }
open var placeholder: String? {
get {
return placeholderLabel?.text
}
set(value) {
placeholderLabel?.text = value
}
}
/// An override to the text property. /// An override to the text property.
@IBInspectable @IBInspectable
open override var text: String! { open override var text: String! {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment