開発に Vuforia を使用して、iOS での拡張現実に関するプロジェクトを行っています。
開始前にビューを作成しましたFrameMarkerAppDelegate
(AR ビューをスキャン)。UIButton
オンビューページを押すFrameMarkerAppDelegate
と起動します。FrameMarkerAppDalegate
背景は実行終了後のカメラ背景です。次に、カメラの背景に触れて、[ビュー ページに戻る] を選択すると、再びビュー ページに戻ります。
私の問題は、UIButton
もう一度押した後、カメラの背景が表示されないことです。まだビューページですが、カメラは有効になっています。
ViewController.mm
- (IBAction)btnSelect:(id)sender {
FrameMarkersAppDelegate *appDelegate = [[FrameMarkersAppDelegate alloc] init];
[appDelegate startFrameAppDelegate];
}
FrameMarkerAppDelegate.mm
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
CGRect screenBounds = [[UIScreen mainScreen] bounds];
window = [[UIWindow alloc] initWithFrame: screenBounds];
[self setupSplashContinuation];
[QCARutils getInstance].targetType = TYPE_FRAMEMARKERS;
arParentViewController = [[ARParentViewController alloc] init];
arParentViewController.arViewRect = screenBounds;
[window insertSubview:arParentViewController.view atIndex:0];
[window makeKeyAndVisible];
return YES;
}
-(void)startFrameAppDelegate
{
CGRect screenBounds = [[UIScreen mainScreen] bounds];
window = [[UIWindow alloc] initWithFrame: screenBounds];
[self setupSplashContinuation];
[QCARutils getInstance].targetType = TYPE_FRAMEMARKERS;
arParentViewController = [[ARParentViewController alloc] init];
arParentViewController.arViewRect = screenBounds;
[window insertSubview:arParentViewController.view atIndex:0];
[window makeKeyAndVisible];
}