美文网首页
iOS错误UIAlertController can only

iOS错误UIAlertController can only

作者: 范特森 | 来源:发表于2018-07-06 14:18 被阅读48次

错误提示:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIAlertController can only have one action with a style of UIAlertActionStyleCancel'

错误原因:

同一个UIAlertController里使用了两个UIAlertActionStyleCancel类型的UIAlertAction,取消按钮只能有一个!和很多代码错误一样,这个错误常常是因为直接复制导致的,所以建议同学能手打代码尽量手打,不要copy paste.

此问题SEO其他关键词入口:(同学们不用管这个,这个是方便其他碰到此问题的人用别的提问方式也能搜索到此答案,解决他们的提问效率)

Xcode报错UIAlertController can only have one action with a style of UIAlertActionStyleCancel

iOS开发UIAlertController can only have one action with a style of UIAlertActionStyleCancel

UIAlertController问题崩溃UIAlertActionStyleCancel

相关文章

网友评论

      本文标题:iOS错误UIAlertController can only

      本文链接:https://www.haomeiwen.com/subject/llovuftx.html