Tuesday, December 12, 2023
HomeiOS Developmentios - Empty View taken house

ios – Empty View taken house


I wish to present EmptyView() with out house if there isn’t a knowledge from sever.

If I put my code inside VStack then EmptyView() takes the house,
If I put the code with out Stack, then API is asking infinite quantity.

My code is comply with:

VStack{
            if let arr =  vm.arrMessages{
                getContent()
                    .padding(.high)
            }else if vm.isLoading {
                ProgressView()
            }else if vm.isError {
                EmptyView()
            }
        }


Outdoors of VStack:

if let arr =  vm.arrMessages{
                getContent()
                    .padding(.high)
            }else if vm.isLoading {
                ProgressView()
            }else if vm.isError {
                EmptyView()
                    
            }

then API is asking infinite time.

thanks



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments