- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
每次导航到另一个屏幕时,我都会在控制台中收到此消息:
[Assert] displayModeButtonItem is internally managed and not exposed for DoubleColumn style. Returning an empty, disconnected UIBarButtonItem to fulfill the non-null contract.
目前我在应用程序的入口点设置了导航 View ,就像这样
NavigationView {
KeyboardView(matrixVM: matrixVM, isNavigationBarHidden: $isNavigationBarHidden)
.background(Color("background")
.edgesIgnoringSafeArea(.all))
.navigationBarTitle("Workspace")
.navigationBarHidden(self.isNavigationBarHidden)
.onAppear {
self.isNavigationBarHidden = true
}
}
然后在 KeyboardView 里面我有导航链接
NavigationLink(destination: NotebookView(isNavigationBarHidden: $isNavigationBarHidden, saved: matrixVM), label: {
Text("Notebooks")
.font(.system(size: 14, design: .rounded))
.fontWeight(.medium)
.foregroundColor(Color("text"))
.padding(.trailing, 10)
})
在 NotebookView 中,我有一个导航链接列表(每个笔记本链接到其详细信息页面)
ScrollView(showsIndicators: false) {
ForEach(notebooks, id: \.self) { notebook in
NavigationLink(destination: ExpandedSnippet(matrixVM: saved ,notebook: notebook)
.navigationBarTitle("Notebook", displayMode: .inline)) {
SnippetCard(notebook: notebook, matrixVM: saved)
.frame(width: UIScreen.main.bounds.width)
}
.padding(.bottom, 30)
}
}
一切似乎都在工作,但就在几个小时前,它没有(我正在使用 tabbar,它在工作数周后突然开始崩溃)。我觉得这有点乱,我做错了什么。知道为什么吗?谢谢您的帮助!
最佳答案
在 iPhone 或 iPhone 模拟器上运行时,我在 Xcode 12.1 上得到了这个,但在 iPad 模拟器上没有。
将此附加到 NavigationView 为我修复了它。
.navigationViewStyle(StackNavigationViewStyle())
关于SwiftUI displayModeButtonItem 内部管理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63740788/
每次导航到另一个屏幕时,我都会在控制台中收到此消息: [Assert] displayModeButtonItem is internally managed and not exposed for
我正在学习使用 Xcode 6.3 和 iOS SDK 8.3 的基本控件和模板。在我创建了一个Master-Detail View 模板后,我尝试更改detailview 的导航栏 上的后退按钮的标
有人知道更改从 UISplitViewController 委托(delegate)返回的按钮的文本(和外观吗?)的方法: func displayModeButtonItem() -> UIBarB
我正在尝试为我的 UISplitViewController 中的 displayModeButtonItem 使用图像。我得到的项目看起来像我想要的,但在 iPhone 上点击时它没有任何作用。使用
当处于纵向模式 (iPad) 或横向模式 (iPhone 6+) 时,我无法让 iOS 显示我的按钮以显示 UISplitView 主视图。 现在我正在使用下面的代码,但它什么也没做... d
我在 xcode 6 中启动了一个 Split View 项目,它运行良好。开箱即用,我得到了一个 Split View,它在纵向模式下有一个导航按钮(左上角),这样主视图就可以弹出/弹出。 主要问题
我在 iPad 上使用 UISplitView 时遇到问题。 我使用 UISplitView 创建普通应用程序,并在我添加的 DetailViewController 中 override func
所以我的用例是在详细 View 中有一个 TabBarController,大约四个选项卡,每个选项卡都有自己的 NavigationController。都是通过 Storyboard。然后在我的
我的应用程序使用 splitViewcontroller。我删除了 DetailViewController 的导航栏。所以我不能使用: navigationItem.leftBarButtonIte
我有一个 SplitViewController 并且正在实现: myNavVC?.topViewController?.navigationItem.leftBarButtonItem = spli
我正在尝试在 iOS8 上创建一个简单的 Split View、Master/Detail 应用程序。 Storyboard 如下所示: SVC=SplitViewController TBVC=Ta
我在 iOS 9 上使用 Swift,使用 splitViewController 在我的应用中启用滑出菜单。 除了无法为我的“菜单”按钮(即 splitViewController 的 displa
我是一名优秀的程序员,十分优秀!