Xamarin的国家选择器
Here是我的样本。
CountryPickerBind是BindingProject。
PickerSample是一个使用dll的简单演示,您可以运行它并查看效果。
步骤在您的项目中使用CountryPicker。
构建CountryPickerBind
DLL的引用添加到您的项目。(DLL座落于斌/调试/在CountryPickerBind *。DLL)
- 在故事板或xib中添加PickerView,并使类
CountryPicker
我已经试过这个,似乎工作。但它不会在我的项目中显示标志图标。我在你的测试项目中看到了这些标志。我该如何解决它? –
@ Passionate.C可能你错过了第5步 –
不,我把所有的png都添加到我的资源文件夹中。 将您的测试项目中的Resources/CountryPicker.bundle/*。png的所有png文件复制到我的项目中的Resources/*。png中 –
您可以创建一个绑定库来创建一个本地的iOS库中的C#包装 - 看到https://developer.xamarin.com/guides/ios/advanced_topics/binding_objective-c/ – Jason
@Jason感谢您的回复。这对我来说很紧迫,我也没有创建C#包装的经验,您能为我创建它吗? –
@ Passionate.C对我有帮助吗? –