passforios/pass/Views/TextViewTableViewCell.swift

29 lines
640 B
Swift
Raw Normal View History

//
// TextViewTableViewCell.swift
// pass
//
// Created by Mingshen Sun on 11/2/2017.
// Copyright © 2017 Bob Sun. All rights reserved.
//
import UIKit
class TextViewTableViewCell: UITableViewCell, ContentProvider {
@IBOutlet weak var contentTextView: UITextView!
override func awakeFromNib() {
super.awakeFromNib()
2017-04-07 10:05:30 -07:00
self.contentTextView.textContainer.lineFragmentPadding = 0
self.contentTextView.textContainerInset = .zero
}
2018-12-09 16:59:07 -08:00
func getContent() -> String? {
2017-02-13 01:15:42 +08:00
return contentTextView.text
}
2018-12-09 16:59:07 -08:00
func setContent(content: String?) {
2017-02-13 01:15:42 +08:00
contentTextView.text = content
}
}