这是一个拥有全面的语支持功能的iOS国家选择器。
要运行示例项目,请克隆仓库,然后在示例目录中先运行pod install
。
GSCountryPickerController可以通过CocoaPods获取。要安装它,只需将以下行添加到您的Podfile中
pod "GSCountryPickerController"
#import "GSCountryPickerController.h"
@interface MyViewController () <GSCountryPickerControllerDelegate>
// ...
@end
#pragma mark - GSCountryPickerControllerDelegate
- (void)countryPickerController:(GSCountryPickerController *)picker
didSelectCountryCode:(NSString *)countryCode
localizedName:(NSString *)localizedName {
// ...
}
- (void)countryPickerControllerDidCancel:(GSCountryPickerController *)picker {
// ...
}
- (void)selectCountryAction {
GSCountryPickerController *vc = [GSCountryPickerController new];
vc.countryPickerdelegate = self;
[self presentViewController:vc animated:YES completion:nil];
}
gaosen, [email protected]
GSCountryPickerController采用MIT许可证。有关更多信息,请参阅LICENSE文件。