swift 底部警告框
发布时间:2020-12-14 07:00:40 所属栏目:百科 来源:网络整理
导读:1. 设置页面的代理 class SecondViewController: TFBaseViewController , UIActionSheetDelegate { 2. 源码 //底部警告框 func testUIActionSheet() { let actionSheet = UIActionSheet() actionSheet.addButtonWithTitle("取消") actionSheet.addButtonWith
1. 设置页面的代理 class SecondViewController: TFBaseViewController,UIActionSheetDelegate { 2. 源码//底部警告框 func testUIActionSheet() { let actionSheet = UIActionSheet() actionSheet.addButtonWithTitle("取消") actionSheet.addButtonWithTitle("确定") actionSheet.addButtonWithTitle("选择") actionSheet.cancelButtonIndex = 0 actionSheet.delegate = self actionSheet.showInView(self.view) } func actionSheet(actionSheet: UIActionSheet,didDismissWithButtonIndex buttonIndex: Int){ print("您点击了:"+actionSheet.buttonTitleAtIndex(buttonIndex)!) } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |