Hằng số
Các hằng số sau đây có sẵn trên toàn cầu.
-
Tên
Notification
để quan sát các thao tác tải mô hình xuống thành công. Từ điển thông tin người dùng sẽ chứa{ModelDownloadUserInfoKey.remoteModel : RemoteModel}
.Khai báo
Swift
static let mlkitModelDownloadDidSucceed: NSNotification.Name
-
Tên
Notification
để quan sát các tác vụ tải mô hình xuống không thành công. Từ điển thông tin người dùng sẽ chứa{ModelDownloadUserInfoKey.remoteModel : RemoteModel}
và{ModelDownloadUserInfoKey.error : NSError}
.Khai báo
Swift
static let mlkitModelDownloadDidFail: NSNotification.Name
-
Khoá để truy xuất
RemoteModel
từ từ điển thông tin người dùng.Khai báo
Swift
static let remoteModel: ModelDownloadUserInfoKey
-
Khoá để truy xuất
NSError
từ từ điển thông tin người dùng. Giá trị tương ứng lànil
nếu quá trình tải mô hình xuống hoàn tất thành công.Khai báo
Swift
static let error: ModelDownloadUserInfoKey