ios - Xamarin 的国家/地区选择器

标签 ios xamarin xamarin.ios

是否有适用于 Xamarin(尤其是 Xamarin.IOS)的 NuGet 包或国家/地区选择器组件?

我找到了一些适用于 Native IOS 的库。

CountryPicker

MRCountryPicker

我想在 Xamarin 中拥有与上述类似的东西

谢谢

最佳答案

Here是我的样本。

enter image description here

CountryPickerBind 是 BindingProject

PickerSample是一个简单的demo,使用了dll,你可以运行它看看效果。

在项目中使用 CountryPicker 的步骤。

  1. 构建 CountryPickerBind

  2. 将dll的引用添加到您的项目中。(dll位于CountryPickerBind中的bin/Debug/*.dll)

enter image description here

  • 在storyboard或xib中添加PickerView,并创建类CountryPicker
  • enter image description here

  • 按照 ViewController 中的代码分配委托(delegate)。

  • 添加图像 (Resources/CountryPicker.bundle/*.png);

  • 快跑!

  • enter image description here

    关于ios - Xamarin 的国家/地区选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46244941/

    相关文章:

    iphone - 比较两个数组的问题

    ios - 在 iOS 5.0+ 中获取捕获视频的第一帧

    javascript - Xamarin WebView Audio.Play不起作用

    .net - 情报加载永远挂起 Visual Studio Xamarin.Forms

    c# - 使用 MonoTouch 在 iOS 上自定义 Switch

    c# - 如何在 Xamarin Studio 的调试器中输入命令

    ios - 缩放 UIImage/CGImage

    android - 在 Xamarin 中获取电话状态

    c# - Mac 上的 MonoDevelop - 导出设置

    ios - CAShapeLayer 为一条路径绘制不同的线宽,Swift