If I’m using a storyboard and the entry point is for viewController1.
Is there a way to have the App Delegate run the conditional and then chose the storyboard entry point – either viewController1 or viewController2?
I want to make a choice from App Delegate on where location services are turned on or not and then do something like:
(![CLLocationManager locationServicesEnabled])
{
self.viewController = [[viewController1 alloc] init];
NSLog(@"vc is viewController2 from app del. loc svcs off");
}
else if ([CLLocationManager locationServicesEnabled])
{
// alert location services denied
self.viewController = [[viewController2 alloc] init];
NSLog(@"vc is viewController2 from app del. loc svcs on");
NSLog(@"core location is on");
}
Yes You can do that.
write your condition in following method:
Do something like this