English 中文(简体)
NS InternalInconsistencyException,êt: Layout requested forprofile Navigation bar Xcode 15.0 Crash
原标题: NSInternalInconsistencyException , reason: Layout requested for visible navigation bar Xcode 15.0 Crash

我将我的X代码更新为15.0,并运行应用。 在SOS17号申请上,我与这架飞机相撞:

遗嘱失效—— Barpuout Subviews], UINavigation Bar.m:3 849 NS InternalInconsistency Exception,êt: Layout requested forprofile Navigation bar

It happens only on iOS 17 with Xcode 15.0. With Xcode 14.3 and iOS 17 - no. With Xcode 15 and iOS 16.4 - no.

*** 因无一例外而终止妊娠 Layout requested for醒目的航行驳船; <UINavigation Bar: 0x15bd34ee0;frame = (0 47; 428 44); autoresize = W; tintColor = UIExGrayColor Space 0 1;tier = <CALayer: 0x2813b9f40>> delegation=0x15c049e00 standardAppearance=0x2837b03c0 人口指数=0x2837b020 合同Appearance=0x2837b0540, 合同ScrollEdgeAppearance=0x2837b0240, 顶级物品属于不同的航道。 页: 1 项目 = <UINavigation 项目:0x15bf26070> 标题View=0x160f04840 风格=navigator reBarButtonItem=0x15bf5f4d0 右BarButtonItems=0x281c93f90,导航条=1 <UINavigation Bar: 0x15bd05d60; 框架=0 47; 428 44); 自动=W; tintColor = UIExprGrayor Space 0;上层 = ;CALayer: 0x2813be&380;> 代表=0x15c056800标准Appearance=0x2837fd5c0c 人口指数 缩略语=0x2837fd080 紧凑式ScrollEdgeAppearance=0x2837ff780,可能来自客户试图打上最包装的导航控制器。

需要帮助:

我已在<条码>中设置了,载于view WillLayoutSubviews (,但并未帮助

最佳回答

在我撤走/处理这条线后,坠毁事件已经发生。

self.navigationController?.setNavigationBarHidden(false, animated: animated)

www.un.org/Depts/DGACM/index_spanish.htm YOU NEED TO REMOVE/COMMENT ONLY

  • I moved this line to the viewWillLayoutSubviews but this didn t help
  • I wrote setNeedsLayout() and layoutIfNeeded() but this also
    didn t help
问题回答

I had the same issue, and the reason was in UISplitViewController s delegate: in splitViewController(_:collapseSecondary:onto:) when I moved the view controllers from a secondary navigation controller to the primary one I didn t remove them from the secondary navigation controller. After I started to remove them, the crash has gone. So try to check the places where you change the view controllers parents.

对我们来说,当用X编码15.0.1进行计算并用SOS 17(用X代码14.x进行工作罚款)进行计算时,我们也会经历同样的坠毁。 我们用以下代码把控制器从一个导航控制器转移到另一个导航控制器:

self.navigationController?.viewControllers = oldNavigationController.viewControllers
oldNavigationController.dismiss(animated: false, completion: nil)

坠机是在我们撤走旧的纳吉斯冷却机前插入以下编码线之后立即发生的:

oldNavigationController.viewControllers = [UIViewController]()

Modern UISplitViewController can also have this crash

还可使用现代<代码> UI SplitViewController/code>,该编码使用init(e:)。

在此情况下,对<条码>的改动 在其他答复中建议不可能奏效,因为这种代表方法(假定)不能与现代风格的分裂观点合作。

在我的案件中,我发现,与这里提到的相同之处:从Xcode 15+ 和OS 17+ 装置中仅建构。 坠毁只是当次点火时,才发生。 单单确定这不足以造成坠毁。

如错误信息中所述,这是由于“......客户试图打上包罗的导航控制器”。

Solution: ensure the split view is not inside a UINavigationController

登船是由于我的<条码>、用户电报/密码>上报的:inside导航控制器。 提出分裂观点控制器是该表的基础,解决了这一问题。

Finding it: ruling out auto-wrapping

我设立了儿童导航控制员,而不是依靠https://developer.apple.com/documentation/uikit/uisplitview Controller#1653114” rel=“nofollow noretinger”>auto-wrapping in a NavigationController,并确保这些灯塔双管齐下。

自动拆船造成其他问题,包括导航堵塞,即先前选定的实体在倒塌时不希望航行,而不是回到主要观察控制器。 我确实试图利用这一系统解决坠毁问题,把一个便衣非航行观点控制员带往setViewController(_ for:)打电话,坠毁事件也发生。

you need bring forward : [self setNavigationBarHidden:YES animated:NO]; if you custom NavigationBar because xcode15 excute timing bring forward





相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签