ARGear SDK Documentations
  • Introduction
  • Android
    • 1. Quickstart
    • 2. Configuration Settings
    • 3. ARGear Overview
    • 4. ARGSession
    • 5. Camera
    • 6. Rendering
    • 7. CMS Service
    • 8. Download Contents
    • 9. Set Contents
    • 10. Media
    • 11. Switch Camera Face
    • 12. Enable Debugging Mode
    • 13. ARCore Connect API
    • 14. API Reference
  • iOS
    • 1. Quickstart
    • 2. Configuration Settings
    • 3. ARGear Overview
    • 4. ARGSession
    • 5. Camera
    • 6. Rendering
    • 7. CMS Service
    • 8. Download Contents
    • 9. Set Contents
    • 10. Media
    • 11. Switch Camera Face
    • 12. Enable Debugging Mode
    • 13. ARKit Connect API
    • 14. API Reference
  • Unity
    • 1. Quickstart
    • 2. Configuration Settings
    • 3. ARGear Plugin Overview
    • 4. ARGearManager
    • 5. ARGearCamera
    • 6. CMS Service
    • 7. Download Contents
    • 8. Set Contents
    • 9. Switch Camera Face
    • 10. Enable Debugging Mode
    • 11. API Reference
Powered by GitBook
On this page

Was this helpful?

  1. iOS

11. Switch Camera Face

To switch camera face from front to rear or vice versa, ARGSession must be paused before changing the camera face, and then resume the ARGSession in this order.

Sample code of flipping camera face is written below.

// Sample Code. Flip Camera Face

ARGSession *argSession = [[ARGSession alloc] initWithARGConfig:argConfig error:&error];
ARGCamera *camera = [[ARGCamera alloc] init];
…
 
// ARGSession Pause
[argSession pause];

[camera toggleCamera:^{
    // ARGSession Resume
    [argSession run];
}];
// Sample Code. Flip Camera Face

if let session = argSession {

    // ARGSession Pause
    session.pause()
    arCamera.toggleCamera(with: .back) {
    
        // ARGSession Resume
        session.run()
    }
}

Previous10. MediaNext12. Enable Debugging Mode

Last updated 5 years ago

Was this helpful?