Thursday, September 11, 2025
HomeiOS Developmentios - PhoneNumberKit - drawback with customized numberPlaceholderColor and countryCodePlaceholderColor being ignored

ios – PhoneNumberKit – drawback with customized numberPlaceholderColor and countryCodePlaceholderColor being ignored


I’ve a change within the settings of my app that units the visibility of the cellphone quantity prefix to true or false. I even have a customized shade for numberPlaceholderColor and countryCodePlaceholderColor.

When the prefix is about to true/seen, the customized colours work nice for each the prefix and the quantity. When the prefix is about to false/hidden the customized colours are ignored for each. The code beneath runs in viewDidLoad. I am working PhoneNumberKit 4.0.0 however this has been taking place for fairly some time. What am I doing improper?

Has anyone else run into this?

 func setTheThemeColors()
    {
        phone_Fld_Outlet.font = UIFont.systemFont(ofSize: gDefaultTextSize, weight: .common)
        
        // Set the placeholder textual content shade
        phone_Fld_Outlet.countryCodePlaceholderColor = Theme.present.placeHolderTextColor
        phone_Fld_Outlet.numberPlaceholderColor = Theme.present.placeHolderTextColor
        
        phone_Fld_Outlet.textColor = Theme.present.textColor
        phone_Fld_Outlet.layer.borderColor = Theme.present.accentColor.cgColor
        phone_Fld_Outlet.layer.backgroundColor = Theme.present.darkAccentColor.cgColor
        phone_Fld_Outlet.layer.cornerRadius = 8
        phone_Fld_Outlet.layer.borderWidth = 1.5
        
        phone_Fld_Outlet.keyboardAppearance = Theme.present.keyBoardColor
        
        // No cellphone quantity has been saved
        if phone_Number.isEmpty
        {
        // Get prefix visibility from the database
            phone_Fld_Outlet.withPrefix = ModelData.getThePrefix_Bool()
        }
        phone_Fld_Outlet.withExamplePlaceholder = true
    }

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments