Firebase 迅捷+;选项卡视图&x2B;滚动视图+;翠鸟

Firebase 迅捷+;选项卡视图&x2B;滚动视图+;翠鸟,firebase,swiftui,uiscrollview,Firebase,Swiftui,Uiscrollview,在我将图像上传到Firebase并将img url存储在post选项卡上之后,它会转换回主提要选项卡(index=0)。直到我向下滚动并备份或切换选项卡视图,最新图像才会显示。有什么建议吗 这是我的上传,它使用@Binding var tabIndex:Int UploadPostViewModel.shared.uploadPost(info: postInfo) { (complete, msg) in if !complete {

在我将图像上传到Firebase并将img url存储在post选项卡上之后,它会转换回主提要选项卡(index=0)。直到我向下滚动并备份或切换选项卡视图,最新图像才会显示。有什么建议吗

这是我的上传,它使用@Binding var tabIndex:Int

UploadPostViewModel.shared.uploadPost(info: postInfo) { (complete, msg) in
                        if !complete {
                            alertTitle = "Upload Post Error"
                            alertMessage = "\(msg)"
                            showAlert.toggle()
                            return
                        } else {
                            caption = ""
                            image = nil
                            tabIndex = 0
                        }
在我的饲料室

if postCellVM.post.postImgUrl.isEmpty {
                Rectangle()
                    .fill(colorScheme == .dark ? Color.black : Color.white)
                    .frame(width: 100, height: 5)
            } else {
                KFImage(URL(string: postCellVM.post.postImgUrl))
                    .placeholder {
                        Image(systemName: "photo.fill")
                            .resizable()
                            .scaledToFit()
                            .foregroundColor(colorScheme == .dark ? Color.white : Color.black)
                    }.retry(maxCount: 3, interval: .seconds(5))
                    .resizable()
                    .scaledToFit()
                    .frame(maxHeight: 440)
            }