You could just present any modal controller without animation in viewDidLoad
or viewWillAppear
.
UIViewController *vc = [[UIViewController alloc] init];
vc.view.frame = [[UIScreen mainScreen] bounds];
vc.view.backgroundColor = [UIColor purpleColor]; // for testing
[self presentViewController:vc animated:NO completion:nil];
In that view controller you can do whatever you like, including starting a AVCaptureSession.
In order to return to the previously selected tab controller there are several options.
One is to switch to the desired tab when dismissing the modal view controller. Suppose it has a property or ivar called lastTab
:
self.tabBarController.selectedViewController
= [self.tabBarController.viewControllers objectAtIndex:lastTab];
Another way is to never actually activate the tab with the modal view but launch the modal view controller directly from the other tabs. The other view controller could set the selected tab back to itself and then launch the modal view.