2017-02-02 21:04:31 +08:00
|
|
|
//
|
|
|
|
|
// LabelTableViewCell.swift
|
|
|
|
|
// pass
|
|
|
|
|
//
|
|
|
|
|
// Created by Mingshen Sun on 2/2/2017.
|
|
|
|
|
// Copyright © 2017 Bob Sun. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import UIKit
|
|
|
|
|
|
|
|
|
|
class LabelTableViewCell: UITableViewCell {
|
|
|
|
|
|
|
|
|
|
@IBOutlet weak var contentLabel: UILabel!
|
|
|
|
|
@IBOutlet weak var titleLabel: UILabel!
|
|
|
|
|
|
2017-02-05 00:35:23 +08:00
|
|
|
override var canBecomeFirstResponder: Bool {
|
|
|
|
|
get {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-02 21:04:31 +08:00
|
|
|
override func awakeFromNib() {
|
|
|
|
|
super.awakeFromNib()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override func setSelected(_ selected: Bool, animated: Bool) {
|
|
|
|
|
super.setSelected(selected, animated: animated)
|
|
|
|
|
}
|
2017-02-05 00:35:23 +08:00
|
|
|
|
|
|
|
|
override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool {
|
|
|
|
|
return action == #selector(copy(_:))
|
|
|
|
|
}
|
|
|
|
|
override func copy(_ sender: Any?) {
|
|
|
|
|
UIPasteboard.general.string = contentLabel.text
|
|
|
|
|
}
|
2017-02-02 21:04:31 +08:00
|
|
|
|
|
|
|
|
}
|