陈嘉乐
2020-12-02 a3f51a59941dbe3138e71328baa8f6c7a3d0f9b0
HDL-ON_iOS/Other/JLCountrycode.cs
New file
@@ -0,0 +1,44 @@
using System;
using Shared.IOS.JLCountryCode;
namespace JLCountrycode
{
    public class CountryCodeView
    {
        /// <summary>
        ///
        /// </summary>
        private static CountryCodeView m_Current = null;
        /// <summary>
        ///
        /// </summary>
        public static CountryCodeView Current
        {
            get
            {
                if (m_Current == null)
                {
                    m_Current = new CountryCodeView();
                }
                return m_Current;
            }
        }
        /// <summary>
        /// 国家区号选择
        /// </summary>
        /// <param name="action"></param>
        public void Show(Action<string, string> action)
        {
            JLCountryCodeController mJLCountryCodeController = new JLCountryCodeController();
            mJLCountryCodeController.SelectCountryCodeBlock += (countryName, code) =>
            {
                action?.Invoke(countryName, code);
            };
            Shared.Application.currentVC.NavigationController.PushViewController(mJLCountryCodeController, true);
        }
    }
}