Hi,
I have a certain UIViewController (ViewController1), which shows contents of a database. And I want to show another view controller(ViewController2) if the database was not loaded before.
So when user enters ViewController1 and the database was not loaded before, I want to take him to ViewController2 instead of ViewController1.
Something like this:
@implementation ViewController1
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (isDatabaseLoaded) {show contents of ViewController1;}
else {take user to ViewController2;}
}
How can I do it? What is the most elegant way to do this?
Thank you in advance.