菜鸟教程小白 发表于 2022-12-11 18:27:19

ios - 段框架使 UIAlertController 与 NSInternalInconsistencyException 崩溃


                                            <p><p>我关注“<a href="https://segment.com/" rel="noreferrer noopener nofollow">https://segment.com/</a>”来实现分析。但是当我使用 UIAlertController 显示带有标题的警报时,我的应用程序崩溃了!显示错误</p>

<p>*** 由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“屏幕名称()不能为空。”</p>

<p>我正在使用 swift 进行开发。我只是在didFinishLaunchingWithOptions 处初始化AppDelegate 中的段。我没有使用任何别名、组、标识、寻呼和跟踪调用。 <a href="/image/Wxepb.png" rel="noreferrer noopener nofollow"><img src="/image/Wxepb.png" alt="enter image description here"/></a> </p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>在我的例子中,我将标题设置为空字符串,所以我没有在标题中设置空白“”,而是将标题设置为 nil。它正在运行,应用程序现在没有崩溃。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 段框架使 UIAlertController 与 NSInternalInconsistencyException 崩溃,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/41397804/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/41397804/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 段框架使 UIAlertController 与 NSInternalInconsistencyException 崩溃