2012-01-15 2 views
1

私のiPhoneアプリケーションでサードパーティスキャンsdkを統合しました。私のアプリケーションはナビゲーションベースであり、サードパーティスキャンの統合中にsdkの最初のファイルはscannigSDKTestViewController.mmです。これはinitWithCoderメソッドを使用してのみ初期化できます。スキャニングsdkのためのナビゲーションの問題に直面

以下のように、viewControllerXからscannigSDKTestViewControllerを呼び出しています。

//in viewControllerX.h file 
scannigSDKTestViewController *overlayController; 

//in viewControllerX.m file 
    -(void) start_Scanning 
    { 

    [AppDelegate setNavigationController:self.navigationController]; 
    overlayController = [[scannigSDKTestViewController alloc] initWithCoder:nil]; 
     } 
     else { 
      [overlayController release]; 
      overlayController = nil; 

      overlayController = [[scanningSDKTestViewController alloc] initWithCoder:nil]; 
     } 

     [self.view addSubview:overlayController.view]; 
     [overlayController startScanning]; 
    } 

// navigationControllerは、私は上記のアプローチのカメラでコード

UINavigationController *myNavigationController = [AppDelegate navigationController]; 

ViewControllerZ *viewScreenZ = [[ViewControllerZ alloc] init]; 
[myNavigationController pushViewController:viewScreenZ animated:NO]; 
[viewScreenZ release]; 
[myNavigationController release]; 

以下のように他のViewController ViewControllerZを呼び出しています、scanningSDKTestViewController.mmファイルに

ファイルapplicationnameAppDelegate.hにされた宣言されていますオープンとスキャンは問題ありませんが、スキャンの後にアプリケーションがクラッシュしています。そして、UINavigationControllerハンドルのためにクラッシュが発生していると思います。myNavigationController他の画面へのナビゲーションナビゲーションが停止されます。 このナビゲーションの問題を解決する方法はありません。

答えて

0

presentModalViewControllerメソッドを使用すると、次のコードを表示することができます。

ViewControllerZ *viewScreenZ = [[ViewControllerZ alloc] init]; 
[self presentModalViewController:viewScreenZ animated:YES]; 
[viewScreenZ release]; 
関連する問題