Skip to content

Refresh all section data #8

Description

@renzrz

Hello there,

I want to reload all section data because everytime i expand the section, it'll call network and put the response from network into button title.

In my viewdidload, i call a func called reloadAllData() and in my func reloadAllData() there's some code like this

func reloadAllData() {

     if dataProducts.isEmpty == true {
        
        self.requestSpinnerData()
        
    } else {
   
        oneSectionAlwaysOpen = false
        sections = allSetions()
        delegate = self
        openAnimation = .fade
        closeAnimation = .fade
    
    }
 }

When i segue into this view, it'll go to self.requestSpinnerData() because i'll use the data that i get from requestSpinnerData() for the section.title. and then it'll call reloadAllData() again for executing code inside else

And what i get is empty (there's no section inside my viewcontroller"
How i can reload all section after i call another function?

Thankyou

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions