0

In my app I've three view controller embedded in a UITabBarController. The second view controller embed a table view controller. Now I've this bug: I go to the second view controller, then I press home button and the app goes in background. When the app is closed I receive a push notification, so when I open the app it shows me the second view controller with table view without any changes. How I can update the table view automatically? For now I'm using the UIRefreshControl, but I will do it automatically, how I can do that?

1 Answer 1

2

You can get your VC's instance from storyboard. First you have to set storyboard ID to your VC

UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
YourViewController *vc =  [storyBoard instantiateViewControllerWithIdentifier:@"YourViewControllerID"]; // here YourViewControllerID is storyboard Id of your VC.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.