how to refresh the view controller

243 views Asked by At

I have a Class A that when the viewwillAppear finished then I get some data after some seconds from server that according that data I change some buttons on view, is there any way how to refresh the view completely in objective -c?

1

There are 1 answers

4
Michał Kwiecień On

Just reload elements on your UI that should be reloaded. Propably you are doing something like this:

override func viewDidLoad() {
    super.viewDidLoad()
    updateUI()
}

func updateUI() {
    label1.text = "aa"
    label2.text = "bb"
}

So just call your updateUI() function again after fetching data from API