JLChen
2021-05-14 e6ecfbf5aa4cf8b35d3945954c3c21b95fa85d58
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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);
 
        }
    }
}