gpt4 book ai didi

ios - 带有链接的警报消息,用于导航到 Swift 应用程序中的不同场景

转载 作者:行者123 更新时间:2023-11-29 01:49:15 25 4
gpt4 key购买 nike

我需要开发一个带有链接的警报消息以导航到 Swift 应用程序中的不同场景。

请建议我好的技术或示例代码

谢谢

最佳答案

您可以像这样实现警报:

let alertController = UIAlertController(title: "Hi", message: "...", preferredStyle: .Alert)

let cancelAction = UIAlertAction(title: "Cancel", style: .Cancel) { (action) in
self.performSegueWithIdentifier("SegueTitle", sender: self)
}
alertController.addAction(cancelAction)

let oKAction = UIAlertAction(title: "OK", style: .Default) { (action) in
self.performSegueWithIdentifier("SegueTitle", sender: self)
}
alertController.addAction(oKAction)

self.presentViewController(alertController, animated: true) {
// ...
}

关于ios - 带有链接的警报消息,用于导航到 Swift 应用程序中的不同场景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31588862/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com