override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor.whiteColor()
var showAlertBtn = UIButton(frame: CGRectMake(10, 50, 150, 20))
showAlertBtn.backgroundColor = UIColor(red: 1.0, green: 0.6, blue: 0.2, alpha: 1.0)
showAlertBtn.setTitle("ShowAlertView", forState: UIControlState.Normal)
showAlertBtn.addTarget(self, action: "showAlert", forControlEvents: UIControlEvents.TouchUpInside)
self.view.addSubview(showAlertBtn)
}
func showAlert(){
var alert = UIAlertView(title: "提示", message: "小心身后", delegate: self, cancelButtonTitle: "确定")
alert.alertViewStyle = UIAlertViewStyle.Default
alert.show()
}

