标签:
import Foundation
import UIKit
class register1CT: UIViewController,UITextViewDelegate{
var isEmpty:Bool?
override func viewDidLoad() {
super.viewDidLoad()
isEmpty=true
self.tx_Remark.delegate=self
}
@IBOutlet var quxiao:UIButton!
@IBOutlet var tx_Remark:UITextView!
@IBAction func OnBackup(sender:AnyObject){
self.dismissViewControllerAnimated(true, completion:{})
}
func textViewShouldBeginEditing(textView: UITextView) -> Bool {
if ((isEmpty) != nil){
self.tx_Remark.text = ""
self.tx_Remark.textColor=UIColor .blackColor()
isEmpty = false;
}
return true
}
}
标签:
原文地址:http://www.cnblogs.com/to-creat/p/5373996.html