views:

18

answers:

1

Hi guys,

I'm trying to work with ARKit in order to enable Augmented Reality in one of my applications.

I'm able to add the ARViewController by doing this :

ParkingAppDelegate *appDelegate = (ParkingAppDelegate *)[[UIApplication sharedApplication] delegate];
arvc = [[ARViewController alloc] initWithDelegate:self];
//add the button to the view
[arvc.view addSubview:button];
[[appDelegate window] addSubview:arvc.view];

But I can't removing it and go back to my app ...

Do you have any ideas ?

Thanks

A: 

Are you putting it in a conditional loop? You can set the conditions for it to appear when you want and then kill it. However, it's been a while since I've worked with iPhone code, so I'm a bit hazy on how that would actually work. (I'd love to put this in the comment part, but i don't have enough rep. tell me if you want it removed, just don't down vote)

Nick H
Don't worry, I'm understanding comments limitations. Have you any piece of code illustrating your explanations ? I'm perhaps doing it the bad way ... Thanks
Rob
I can't really express it in anything other than pseudocode, sorry :(. I would create the ARViewController, but i'd wait to implement it. I'd make a method that would keep checking for the condition from which to start the ARViewController, and then check for a condition in which the method would "break". It may be a rough landing, but it should do the trick. Once again, I haven't programmed in Xcode since last summer, so this is all based on memory. Hope it helps!
Nick H