Yes , I do use storyboard.
first of all, i have a startViewCotnroller associated with storyboard StartViewController
for CRParentViewController, I do not map it into storyboard.
in the StartViewController .m file, i create CRParentViewController in ViewDidLoad
- (void)viewDidLoad {
..
_cameraViewController = [[ImageRecoViewController alloc] initWithNibName:nil bundle:nil];
self.searchData2=nil;
// need to set this so subsequent view controllers know the size
_cameraViewController.arViewSize = self.view.bounds.size;
...
}
also in StartViewContoller, i set a button that can be pressed to push CRParentViewController
- (IBAction)CamReco:(id)sender {
if([self isInternetActive]==YES && [self isPlaceTypeSelected]==YES)
{
_cameraViewController.searchData2a=self.searchData2;
[self.navigationController pushViewController:self.cameraViewController animated:YES];
}
}
in CRParentViewContoller, i do not implement any ViewDidUnload, ViewWillDisappear or ViewDidDisappear
let me restate that problem, it work fine for pushing CRParentViewController and run image recognition, but after leave CRParenViewController and come back to StartViewController, at this time, you and me suppose that the CRParentViewController is stopped wholly, right ? But it still running in the background.
any suggestion can you give me to stop CRParetViewController running in the background after leave that view ?
Hmmm, for it to work properly the AR kind of needs to be running in the background i.e. it should be doing a pauseAR() and resumeAR().
Is it currently doing this? i.e. does the XCode log show this?
The reason this is required at present is because repeated init() and deinit() may cause problems.
This is along the lines of the storyboard / cloudReco solution I posted elsewhere. Note that this case I suggest creating the cameraViewController only once.
N