要么是这样:
或警告,当 .none 被删除时,并非所有情况都得到处理。我怎么能治好这个?
解决了
switch(globalLAcontext?.biometryType) {
case .touchID:
titleLabel.text = Localization.string("v1_dotouch_title", "")
descriptionLabel.text = Localization.string("v1_dotouch_desc","")
let i = UIImage.image(name: "fingerprint")
authButton.setImage(i, for: .normal)
nativeAuthenticationButton.setTitle(Localization.string("v1_dotouch_title", ""), for: .normal)
showNativeAuthDupButton = true
case .faceID:
titleLabel.text = Localization.string("v1_doface_title", "")
descriptionLabel.text = Localization.string("v1_doface_desc","")
nativeAuthenticationButton.setTitle(Localization.string("v1_doface_title", ""), for: .normal)
showNativeAuthDupButton = true
case .some(.none): fallthrough
default:
titleLabel.text = nil
}