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 {
|
2017-02-11 16:08:41 +08:00
|
|
|
|
|
|
|
|
@IBOutlet weak var contentTextView: UITextView!
|
2019-01-27 14:26:11 +01:00
|
|
|
|
2017-02-11 16:08:41 +08:00
|
|
|
override func awakeFromNib() {
|
|
|
|
|
super.awakeFromNib()
|
2017-04-07 10:05:30 -07:00
|
|
|
self.contentTextView.textContainer.lineFragmentPadding = 0
|
|
|
|
|
self.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? {
|
2017-02-13 01:15:42 +08:00
|
|
|
return contentTextView.text
|
|
|
|
|
}
|
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
|
|
|
}
|