Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Flag disappears sometimes from picker' issue #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AhmedMohamedAllam
Copy link

I fixed it by replacing flag assets by get country flag from system with country code

func getFlag(country:String) -> String { 
        let base : UInt32 = 127397
        var s = ""
        for v in country.unicodeScalars {
            s.unicodeScalars.append(UnicodeScalar(base + v.value)!)
        }
        return String(s)
    }

and the flag now is from type String so I changed the UIImageView to be UILabel and bind .text property to the new flag string.
you can check the changes in this fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant