You can display and use the augmented reality view using
ARViewController class and it's handler
ARViewController provides an infrastructure for your application to manage
You can create instances of
ARViewController or its subclasses and use these objects to provide
the specific behavior and visual appearance you need.
recognitionTimeout- The time after that scanner will be paused. The default value of this property is 8 seconds;
scanlineColor- Customize scan line color. The default value of this property is purple color;
handler- The object conforms to
ARHandlerProtocolto control Bear scanner features;
delegate- Use your own
ARDelegateimplementation. Delegate provides a mechanism for your application to take action on events that occur in the
Note: You can create multiple instances of
ARViewControlleror its subclasses, but you can 't show them simultaneously. And keep in mind that each instance of
ARViewControlleror its subclass uses the same view for rendering. Be careful with the view states.
ARHandlerProtocol provides a mechanism for your application to handle features of
- Take screenshot of camera view, ignoring any overlapping UI elements;
- Get the current state of the scanner;
- Start/stop scanning;
- Clean augmented reality view and destroy all loaded data;
- Enable/disable and check current state of flash;
ARHandlerProtocol should not be used before
ARViewController view will be loaded. It will not trigger crash or an unexpected behavior, but triggered action will not have any effect. You will receive warning message in debug output.