I have 2 controllers [TableViewController, SecondViewController]. On my TableViewController I have badges and I update them from my SecondViewController, but when I update my badge count from the SecondVC it doesn't refreshes on TableVC, for this I need to change my screen or pull up my controller and just after that it refreshes my badge view.
I tried this, in SecondVC when I update badge count:
badgeCount++
TableViewController().tableView.reloadData()
Also, this:
badgeCounter++
dispatch_async(dispatch_get_main_queue(), { () -> Void in
TableViewController().tableView.reloadData()
})
but in both cases it doesn't update my badge view. For this I need just change controllers/screens or pull up my TableVC.
How can I fix this?
And one interesting thing, when I set the timer, which updates my TableVC every second, in this case my badge counter view updates well =/