xcode7 弹出提醒等简单窗口
最简单方法
UIAlertView(title: “提醒”, message:”登陆失败,请确认账号和密码信息”, delegate: nil, cancelButtonTitle: “确定”).show()
如弹出窗口还有其他操作。
func showAlert(){ let alertController = UIAlertController(title: "系统提示", message: "账号错误", preferredStyle: UIAlertControllerStyle.Alert) let tryAction = UIAlertAction(title: "继续重试", style: UIAlertActionStyle.Cancel, handler: nil) let exitAction = UIAlertAction(title: "退出", style: UIAlertActionStyle.Default, handler: { ACTION in exit(0) }) alertController.addAction(tryAction) alertController.addAction(exitAction) self.presentViewController(alertController, animated: true, completion: nil) }
发表评论