常數
下列常數可在全球使用。
-
Notification
名稱,用於觀察成功的模型下載工作。使用者資訊字典會包含{ModelDownloadUserInfoKey.remoteModel : RemoteModel}
。聲明
Swift
static let mlkitModelDownloadDidSucceed: NSNotification.Name
-
Notification
名稱,用於觀察失敗的模型下載工作。使用者資訊字典會包含{ModelDownloadUserInfoKey.remoteModel : RemoteModel}
和{ModelDownloadUserInfoKey.error : NSError}
。聲明
Swift
static let mlkitModelDownloadDidFail: NSNotification.Name
-
從使用者資訊字典擷取
RemoteModel
的金鑰。聲明
Swift
static let remoteModel: ModelDownloadUserInfoKey
-
從使用者資訊字典擷取
NSError
的金鑰。如果模型下載成功,對應的值會是nil
。聲明
Swift
static let error: ModelDownloadUserInfoKey