隐藏字

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
}

}

posted @ 2016-04-10 13:47  Wei_java  阅读(221)  评论(0编辑  收藏  举报