Update STPAddressFieldTableViewCell.m

This commit is contained in:
AngeloGiurano 2016-10-17 21:07:08 +02:00 committed by GitHub
parent 53d7111334
commit a43067b667
1 changed files with 5 additions and 2 deletions

View File

@ -72,9 +72,12 @@
NSString *name2 = [locale displayNameForKey:NSLocaleIdentifier value:localeID2];
return [name1 compare:name2];
}];
if (countryCode != nil) {
_countryCodes = [@[@"", countryCode] arrayByAddingObjectsFromArray:otherCountryCodes];
if (countryCode) {
_countryCodes = [@[@"", countryCode] arrayByAddingObjectsFromArray:otherCountryCodes];
}
else {
_countryCodes = [@[@""] arrayByAddingObjectsFromArray:otherCountryCodes];
}
UIPickerView *pickerView = [UIPickerView new];
pickerView.dataSource = self;
pickerView.delegate = self;