2017-02-11 16:08:41 +08:00
|
|
|
//
|
|
|
|
|
// TextViewTableViewCell.swift
|
|
|
|
|
// pass
|
|
|
|
|
//
|
|
|
|
|
// Created by Mingshen Sun on 11/2/2017.
|
|
|
|
|
// Copyright © 2017 Bob Sun. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import UIKit
|
|
|
|
|
|
2019-01-27 14:26:11 +01:00
|
|
|
class TextViewTableViewCell: UITableViewCell, ContentProvider {
|
2020-06-28 21:25:40 +02:00
|
|
|
@IBOutlet var contentTextView: UITextView!
|
2017-02-11 16:08:41 +08:00
|
|
|
|
|
|
|
|
override func awakeFromNib() {
|
|
|
|
|
super.awakeFromNib()
|
2020-06-28 21:25:40 +02:00
|
|
|
contentTextView.textContainer.lineFragmentPadding = 0
|
|
|
|
|
contentTextView.textContainerInset = .zero
|
2017-02-11 16:08:41 +08:00
|
|
|
}
|
2018-12-09 16:59:07 -08:00
|
|
|
|
2019-01-27 14:26:11 +01:00
|
|
|
func getContent() -> String? {
|
2020-06-28 21:25:40 +02:00
|
|
|
contentTextView.text
|
2017-02-13 01:15:42 +08:00
|
|
|
}
|
2018-12-09 16:59:07 -08:00
|
|
|
|
2019-01-27 14:26:11 +01:00
|
|
|
func setContent(content: String?) {
|
2017-02-13 01:15:42 +08:00
|
|
|
contentTextView.text = content
|
|
|
|
|
}
|
2017-02-11 16:08:41 +08:00
|
|
|
}
|