4taras4/CountryCode

Initial create is very slow

Closed this issue · 1 comments

Hey,

I'm using the CountryCode picker after tapping on a button, but it seems to take ages (at least 5 seconds) on it's initial var countryPicker = CountryPicker() call. Any ideas how to accelerate that?

var countryPicker = CountryPicker()
countryPicker.frame = CGRect(x: 0, y: self.keyboardToolbar.frame.size.height, width: self.frame.size.width, height: pickerViewHeight)
countryPicker.showPhoneNumbers = true
countryPicker.countryPickerDelegate = self
countryPicker.backgroundColor = UIColor.vrPaleGreyColor()
countryPicker.setCountry(((Locale.current as NSLocale).object(forKey: NSLocale.Key.countryCode) as! String?)!)

@patreu22 Hey Patrick, I had the same issue, I've fixed it here: #13