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];
}];

Last updated