Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
440 views
in Technique[技术] by (71.8m points)

swift - 编译器无法在合理的时间内对此表达式进行类型检查(The compiler is unable to type-check this expression in reasonable time)

How to solve this error please.

(请如何解决此错误。)

The compiler is unable to type-check this expression in reasonable time;

(编译器无法在合理的时间内对这个表达式进行类型检查。)

try breaking up the expression into distinct sub-expressions

(尝试将表达式分解为不同的子表达式)

while trying to disable the posts assigned to each groupsShortcut.

(同时尝试禁用分配给每个组快捷方式的帖子。)

this is my code:

(这是我的代码:)

    import SwiftUI
    import Firebase

    struct PostView: View {
        @EnvironmentObject var observedData : getData

        var body : some View{

            NavigationView{// Here is the error position.

                ScrollView(.vertical, showsIndicators: false) {

                    VStack(alignment: .leading){

                        ForEach(observedData.datas){i in
                            if i.groupsShortcut == "RN"{
                            tweetCellTop(name: i.name, id: i.tagId, pic: i.pic, image: i.url, msg: i.msg)
                            if i.pic != ""{

                                tweetCellMiddle(pic: i.pic).padding(.leading, 60)                            
                            }

                            tweetCellBottom().offset(x: UIScreen.main.bounds.width / 4)




  }
                }
            }

            }.padding(.bottom, 15)

                .navigationBarTitle("Posts")
                .navigationBarItems(leading:

                    Image(" user Image ").resizable().frame(width: 35, height: 35).clipShape(Circle()).onTapGesture {

                        print("slide out menu ....")
                    }

            )
        }
    }
}

struct PostView_Previews: PreviewProvider {
    @EnvironmentObject var observedData : getData

    static var previews: some View {

        PostView().environmentObject(getData())

    }

}
  ask by Alex translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...