ARDelegate
@objc
public protocol ARDelegate
The ARDelegate protocol provides a mechanism for your application to take
action on events that occur in the ARViewController(Objc). You can make
use of these calls by assigning an object to the ARViewController delegate property directly,
or connect through Interface Builder.
-
Function will be executed when marker has been recognized.
Declaration
Swift
@objc optional func recognizedMarker(withId markerId: Int, assetIds: [Int])Parameters
markerIdThe id of recognized marker.
assetIdsThe array of asset ids connected to this marker.
-
Function will be executed when timeout is reached and no one marker is recognized.
Declaration
Swift
@objc optional func recognitionTimeoutReached() -
Function will be executed on click of any asset.
Declaration
Swift
@objc optional func assetClicked(with assetId: Int)Parameters
assetIdThe id of clicked asset.
-
Function will be executed when ARView has changed state.
Declaration
Swift
@objc optional func viewStateChanged(_ state: ARViewState)Parameters
stateThe state of ARView.
-
Function will be executed when an error occurs.
Declaration
Swift
@objc optional func didFail(withError error: BearError)Parameters
errorThe error that occurred.
View on GitHub
ARDelegate Protocol Reference