错误提示:
*** 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