首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用UIAlertAction执行segue

用UIAlertAction执行segue
EN

Stack Overflow用户
提问于 2016-02-24 15:00:45
回答 1查看 1.1K关注 0票数 1

我想让“下一步”按钮执行segue以移动到"PersonalInformation“(一个UIViewController)。

但我得到了一个“信号SIGABRT”的代码..。我怎么才能修好它?

代码语言:javascript
复制
let alert = UIAlertController(title:"Confirmation", message: confirmationMessage, preferredStyle: UIAlertControllerStyle.Alert)

let confirmBtn : UIAlertAction = UIAlertAction(title: "Next", style: UIAlertActionStyle.Default, handler: {(action:UIAlertAction!)-> Void in

    self.performSegueWithIdentifier("PersonalInformation", sender: self)

})

let cancelBtn : UIAlertAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel, handler: nil)

alert.addAction(cancelBtn)
alert.addAction(confirmBtn)

self.presentViewController(alert, animated: true, completion: nil)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-02-24 15:04:57

这主要是由错误的故事板或xib/nib连接造成的,请确保您在故事板中有正确的连接,其中有next按钮或要移动的按钮。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35605623

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档