Updated delegate method to be optional

This commit is contained in:
Prianka Liz Kariat 2023-05-02 15:07:36 +05:30
parent 8284732874
commit 0225139a98
2 changed files with 2 additions and 3 deletions

View File

@ -29,11 +29,10 @@ NS_ASSUME_NONNULL_BEGIN
* *
* The delegate of `MPPImageClassifier` must adopt `MPPImageClassifierDelegate` protocol. * The delegate of `MPPImageClassifier` must adopt `MPPImageClassifierDelegate` protocol.
* The methods in this protocol are optional. * The methods in this protocol are optional.
* TODO: Add parameter `MPPImage` in the callback.
*/ */
NS_SWIFT_NAME(ImageClassifierDelegate) NS_SWIFT_NAME(ImageClassifierDelegate)
@protocol MPPImageClassifierDelegate <NSObject> @protocol MPPImageClassifierDelegate <NSObject>
@required @optional
- (void)imageClassifier:(MPPImageClassifier *)imageClassifier - (void)imageClassifier:(MPPImageClassifier *)imageClassifier
didFinishClassificationWithResult:(nullable MPPImageClassifierResult *)result didFinishClassificationWithResult:(nullable MPPImageClassifierResult *)result
timestampInMilliseconds:(NSInteger)timestampInMilliseconds timestampInMilliseconds:(NSInteger)timestampInMilliseconds

View File

@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
* TODO: Add parameter `MPPImage` in the callback. * TODO: Add parameter `MPPImage` in the callback.
*/ */
@protocol MPPObjectDetectorDelegate <NSObject> @protocol MPPObjectDetectorDelegate <NSObject>
@required @optional
- (void)objectDetector:(MPPObjectDetector *)objectDetector - (void)objectDetector:(MPPObjectDetector *)objectDetector
didFinishDetectionWithResult:(nullable MPPObjectDetectionResult *)result didFinishDetectionWithResult:(nullable MPPObjectDetectionResult *)result
timestampInMilliseconds:(NSInteger)timestampInMilliseconds timestampInMilliseconds:(NSInteger)timestampInMilliseconds