w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Pass data from one view controller to another without transitioning

In this case, it's best if you assign the role of fetching the data to a separate DataFetcher object. Don't make your UIViewControllers responsible for fetching the data.

Implement a DataFetcherDelegate or a completion block that will notify the ViewControllers when the data has been fetched.

See this answer for an example implementation of the delegate approach.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.