SCCameraKitLensPrefetcher
Objective-C
@protocol SCCameraKitLensPrefetcher <NSObject>
Swift
protocol LensPrefetcher : NSObjectProtocol
Describes the interface used to prefetch lens content
-
Queues up a new fetch task for each of the
lenses
in order to prefetch their content. A successful callback indiciates that all the content for the list oflenses
is ready to be used/applied in lens processorDeclaration
Objective-C
- (nonnull id<SCCameraKitLensPrefetcherTask>) prefetchLenses:(nonnull NSArray<id<SCCameraKitLens>> *)lenses completion:(nullable void (^)(BOOL))completion;
Parameters
lenses
lenses to prefetch content for
completion
callback on completion with success or failure
-
Add observer to observe changes in lens fetch status
Declaration
Objective-C
- (void)addStatusObserver: (nonnull id<SCCameraKitLensPrefetcherObserver>)observer forLens:(nonnull id<SCCameraKitLens>)lens;
Parameters
observer
observer instance which will receive updates
lens
lens to observe
-
Remove observer to stop observing changes in lens fetch status
Declaration
Objective-C
- (void)removeStatusObserver: (nonnull id<SCCameraKitLensPrefetcherObserver>)observer forLens:(nonnull id<SCCameraKitLens>)lens;
Parameters
observer
observer instance which will stop receiving updates
lens
lens to stop observing