chronotruck / FlagPhoneNumber

A formatted phone number UITextField with country flag picker.
Apache License 2.0
437 stars 317 forks source link

Flag Button , Picker view, list view not showing flag image #167

Open DanielWijono opened 4 years ago

DanielWijono commented 4 years ago

@IBOutlet weak var fpnTf: FPNTextField! fpnTf.setFlag(countryCode: .ID)

I already tried to set it like that in the documentation. But the image won't show. Is there anything that I missed ? It's like leaving a blank margin there. Please help

Screen Shot 2020-07-05 at 23 46 13
matteobianchi3 commented 3 years ago

Same here! Have someone found a solution?

matteobianchi3 commented 3 years ago

It seems to be working if I first try to directly load a dummy image from the framework's bundle, for example in my AppDelegate, using this simple line of code UIImage(named: "", in: Bundle.FlagIcons, compatibleWith: nil)... but I'm wondering why! 🤷🏻‍♂️

tahalife commented 3 years ago

It seems to be working if I first try to directly load a dummy image from the framework's bundle, for example in my AppDelegate, using this simple line of code UIImage(named: "", in: Bundle.FlagIcons, compatibleWith: nil)... but I'm wondering why! 🤷🏻‍♂️

UIImage(named: "", in: Bundle.FlagIcons, compatibleWith: nil) worked for me