Assuming you mean 'Optional<LABiometryType>.none'; did you mean 'LABiometryType.none' instead?

91 views Asked by At

It's either this:

enter image description here

or a warning that not all cases are handled when .none is removed. How could I cure this?

1

There are 1 answers

0
Anton Tropashko On

solved

        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
            }