GSInstrumentProvider
@objc
public protocol GSInstrumentProvider
Protocol that provides functions to get instruments. Those methods should no be used from Swift.
-
Gets an instrument.
Note
This method is for Objective-C only. Swift must usefunc getInstrument:
.Declaration
Swift
@objc(getInstrument:) func getInstrument(desc: ComponentDescriptor) -> Instrument?
Parameters
desc
requested instrument. See
Instruments
api for available descriptors instances.Return Value
requested instrument
-
Gets an instrument and registers an observer notified each time it changes.
Note
This method is for Objective-C only. Swift must usefunc getInstrument:desc:observer
.Declaration
Swift
@objc(getInstrument:observer:) func getInstrumentRef(desc: ComponentDescriptor, observer: @escaping (Instrument?) -> Void) -> GSInstrumentRef
Parameters
desc
requested instrument. See
Instruments
api for available descriptors instances.observer
observer to notify when the instrument changes
Return Value
reference to the requested instrument