常量
以下常量可在全局范围内使用。
-
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