UI组件:AlertView警告

来源:互联网 发布:seo搜索推广 编辑:程序博客网 时间:2024/05/17 02:10

1.定义UIAlertView类

2.实现委托

let stopDownload =UIAlertView(title: "警告", message:"正在下载,您确定要取消么?", delegate:self,cancelButtonTitle: "", otherButtonTitles:"")

stopDownload.show()

func alertView(alertView:UIAlertView, clickedButtonAtIndex buttonIndex:Int) {

        //根据buttonIndex进行判断

}


0 0