Alert

来源:互联网 发布:药智数据库官网 编辑:程序博客网 时间:2024/05/18 22:43
class AView : UIViewController,UIAlertViewDelegate {    @IBAction func logout() {        let alertView = UIAlertView(title: "注销", message: "确定要注销吗?", delegate: self, cancelButtonTitle: "取消", otherButtonTitles: "注销");        alertView.show();    }    func alertView(alertView: UIAlertView, clickedButtonAtIndex buttonIndex: Int) {        if(buttonIndex==1) { //注销            //do some thing...        }    }}
0 0
原创粉丝点击