由于某种原因,在这个非常简单的示例中,更新选择不会更新所选选项卡。我的期望是它最初会显示选项卡 1,当我按下“切换选项卡”按钮时,它应该滑到选项卡 0。相反,我必须切换选项卡 3 次才能最终滑到选项卡 0。
在 iOS 16 中测试
struct Test: View {
@State var currentTab = 1
var body: some View {
VStack {
Text("Current Tab: \(currentTab)")
TabView(selection: $currentTab) {
Text("Tab 0")
.tag(0)
Text("Tab 1")
.tag(1)
}
.tabViewStyle(.page(indexDisplayMode: .never))
Button {
withAnimation(Animation.easeIn(duration: 0.2)) {
if currentTab == 0 {
currentTab = 1
} else {
currentTab = 0
}
}
} label: {
Text("Toggle Tab")
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
尝试导航到spring社交Web模块的/ connect端点时出现以下错误。
我得到的是:
[Request processing failed; nested exception is
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'scopedTarget.connectionRepository'
defined in ServletContext resource [/WEB-INF/appContext.xml]:
Initialization of bean failed; nested exception is
org.springframework.aop.framework.AopConfigException:
Could not generate CGLIB subclass of class
[class org.springframework.social.connect.jdbc.JdbcConnectionRepository]:
Common causes of this problem include using a final class or a non-visible class;
nested exception is java.lang.IllegalArgumentException:
Superclass has no null constructors but no arguments were given]
Run Code Online (Sandbox Code Playgroud)
web.xml的相关部分:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/appContext.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>mvc-dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param> …Run Code Online (Sandbox Code Playgroud) 通过 cocoapods 将 Firebase 更新到 7.6.0 后,我收到以下链接错误,但仅在针对模拟器时出现。当针对设备时,一切都构建得很好。
"_OBJC_CLASS_$_FIRAnalytics", referenced from:
objc-class-ref in MainTabBarController.o
ld: symbol(s) not found for architecture x86_64
Run Code Online (Sandbox Code Playgroud)
我已经尝试了堆栈溢出针对此错误建议的几乎所有内容,但没有任何运气。我在整个项目中搜索了有关 x86_64 与 arm 的任何参考,以尝试理解为什么一个会链接而另一个不会。任何帮助,将不胜感激。