开发者

Extiting the ARKit view

I'm trying to work wi开发者_运维问答th 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


It should be similar to adding/removing controller & it's view.

I.e. you dispose the VC, but its' view is still keep by UIWindow.

- (void) hideController {
   //[arvc willMoveToParentViewController:nil];
   [arvc.view removeFromSuperview];
   arvc = nil; //[arvc removeFromParentViewController];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜