Swift-國家選擇區(qū)號列表

網(wǎng)上只找到了oc 版的千扔,swift的版沒找到栅葡,所以就自己照著oc的改 成了swift的畦粮,然后改代碼的時候遇見了很多坑绍填,因為之前那份代碼用的是uisearchbar. 然后因為說這個東西已經被遺棄了掌测,所以就應的新的uiserachController,這個東西坑真的多··其他文章也有介紹内贮,我就說說我自己遇到的,就是搜索框會往上便宜的問題,也就一行代碼 自己注意一下

searchController.hidesNavigationBarDuringPresentation = false

這個代碼的意思就是在打開搜索視圖的時候隱藏導航欄汞斧,api里面上這么說的

99814D30-9DBF-4CA5-B6E7-239E443CF482.png

默認屬性是true


10782DD9-3C5E-48D8-8F1C-56D10D82ACFB.png

直接上代碼


//
//  ChonsenCountryViewController.swift
//  RegisUI
//
//  Created by Ender on 2017/10/16.
//  Copyright ? 2017年 Chris. All rights reserved.
//

import UIKit

let CURR_LANG = NSLocale.preferredLanguages.first!
let LanguageisEnglish = "en-US".elementsEqual(CURR_LANG) || "en-CA".elementsEqual(CURR_LANG) || "en-GB".elementsEqual(CURR_LANG) || "en-CN".elementsEqual(CURR_LANG) || "en".elementsEqual(CURR_LANG)
//設置代理夜郁,用來往界面?zhèn)髦?protocol CountryCodeDelegate{
    func returnCountyrCode(countryCode:String)
    func returnCountryName(countryName:String)
}

class ChonsenCountryViewController: BasicViewController,UITableViewDataSource,UITableViewDelegate,UISearchBarDelegate,UISearchControllerDelegate,UISearchResultsUpdating {
    
    
    var delegate:CountryCodeDelegate! = nil
    var countryCodeTableView = UITableView();
    //搜索
    var searchController = UISearchController();
    //代碼字典
    var sortedNameDict = Dictionary<String, NSArray>(); //代碼字典
    var indexArray = Array<String>();//索引列表
    var searchResultValuesArray = NSMutableArray();//搜索結果集國家名
    var searchResultValuesCode = NSMutableArray();//搜索結果集國家區(qū)號
    
    
    
    override func viewDidLoad() {
        self.titleName = "選擇分區(qū)號"
        super.viewDidLoad()
        //背景
        self.view.backgroundColor = UIColor.white
        createSubview()
        //注冊cell
        self.countryCodeTableView.register(UITableViewCell.classForCoder(), forCellReuseIdentifier: "cellIdentifier1")
        self.countryCodeTableView.register(UITableViewCell.classForCoder(), forCellReuseIdentifier: "cellIdentifier2")
        
        // Do any additional setup after loading the view.
    }
    
    func createSubview(){
        searchResultValuesArray = NSMutableArray()
        let tableFrame = CGRect(x: 0, y: 66, width: self.view.bounds.size.width, height: self.view.bounds.size.height - 20)
        countryCodeTableView = UITableView(frame: tableFrame, style: .plain)
        self.view.addSubview(countryCodeTableView)
        countryCodeTableView.autoresizingMask = .flexibleWidth
        countryCodeTableView.delegate = self
        countryCodeTableView.dataSource = self
        countryCodeTableView.sectionIndexColor = UIColor.cyan
        
        
        
        //searchController
        searchController = UISearchController(searchResultsController: nil)
        searchController.dimsBackgroundDuringPresentation = false
        searchController.hidesNavigationBarDuringPresentation = false
        searchController.searchBar.delegate = self
        searchController.searchBar.backgroundColor = UIColor.white
        //searchController.searchBar.autocapitalizationType = .none
        searchController.delegate = self
        searchController.searchResultsUpdater = self
        self.definesPresentationContext = true
        searchController.searchBar.searchBarStyle = .minimal
        
        countryCodeTableView.tableHeaderView = self.searchController.searchBar
        //searchController.searchBar
        
        //加載plist文件
        let plistPathCh = Bundle.main.path(forResource: "sortedChname", ofType: "plist")
        
        
        if LanguageisEnglish {
            sortedNameDict = NSDictionary(contentsOfFile: plistPathCh!) as! [String : NSArray]
        }else{
            sortedNameDict = NSDictionary(contentsOfFile: plistPathCh!) as! [String : NSArray]
            
        }
        let arr = sortedNameDict.keys.sorted(){ $0 < $1 }
        indexArray = Array(arr)
        
    }
    //mark ----UISearchController
    //將搜索數(shù)據(jù)添加到搜索集
    func updateSearchResults(for searchController: UISearchController) {
        searchResultValuesCode.removeAllObjects()
        searchResultValuesArray.removeAllObjects()
        for array in sortedNameDict.values{
            //country list
            let arr = array.value(forKey: "country") as! Array<String>
            let arrCode = array.value(forKey: "code") as! Array<String>
            
            let Interval = 1
            for i in stride(from: 0, to: arr.count, by: Interval) {
                let val = arr[i]
                if (val.range(of: searchController.searchBar.text!) != nil){
                    searchResultValuesArray.add(val)
                    searchResultValuesCode.add(arrCode[i])
                }
            }
            
            
            
        }
        self.countryCodeTableView.reloadData()
    }
    //結束編輯
    func searchBarShouldEndEditing(_ searchBar: UISearchBar) -> Bool {
        return true
    }
    
    func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool {
        return true
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    //mark - UITableView
    
    func numberOfSections(in tableView: UITableView) -> Int {
        if self.searchController.isActive {
            return 1
        }
        return sortedNameDict.keys.count
    }
    //the row in section
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        if self.searchController.isActive {
            return searchResultValuesArray.count
        }
        return sortedNameDict[indexArray[section]]!.count
        
    }
    
    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        return 44
    }
    //cell
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        var cell:UITableViewCell! = nil
        if  self.searchController.isActive  {
            let ID2:String = "cellIdentifier2"
            cell = tableView.dequeueReusableCell(withIdentifier: ID2)!
            if cell == nil {
                cell = UITableViewCell(style: .value1, reuseIdentifier: ID2)
            }else{
                cell = UITableViewCell(style: .value1, reuseIdentifier: nil)
            }
           
            let index = indexPath.row
            if searchResultValuesArray.count > 0 {
                print(index)
                cell.textLabel?.text = searchResultValuesArray[index] as? String
                cell.detailTextLabel?.text = "+\(searchResultValuesCode[index])"
            }
            return cell
        } else {
            let ID1 = "cellIdentifier1"
            cell = tableView.dequeueReusableCell(withIdentifier: ID1)
            if cell == nil {
                cell = UITableViewCell(style: .value1, reuseIdentifier: ID1)
            }else{
                cell = UITableViewCell(style: .value1, reuseIdentifier: nil)
            }
            //初始化cell
            let section = indexPath.section
            let row = indexPath.row
            let countryCode = (sortedNameDict[indexArray[section]]?[row] as AnyObject).value(forKey: "country") as? String
            let code =  (sortedNameDict[indexArray[section]]?[row] as AnyObject).value(forKey: "code") as! String
            
            cell!.textLabel?.text = "\(countryCode!)"
            cell!.detailTextLabel?.text = "+" + code
            cell!.textLabel?.font = UIFont.boldSystemFont(ofSize: 16)
            return cell!
        }
    }
    //設置右側索引
    func sectionIndexTitles(for tableView: UITableView) -> [String]? {
        if tableView == countryCodeTableView {
            return indexArray
        }else{
            return nil
        }
    }
    func tableView(_ tableView: UITableView, sectionForSectionIndexTitle title: String, at index: Int) -> Int {
        if tableView == countryCodeTableView {
            return index
        }else{
            return 0
        }
    }
    //設置header高度
    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        if tableView == countryCodeTableView {
            if section == 0{
                return 30
            }
            return 30
        }else{
            return 0
        }
    }
    func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
        return indexArray[section]
    }
    //----選擇國際獲取代碼,并用委托傳值粘勒,
    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let cell = tableView.cellForRow(at: indexPath)
        if self.searchController.isActive {
            print("searchBar")
            let areaCode = cell?.detailTextLabel?.text
            self.delegate?.returnCountryName(countryName: (cell?.textLabel?.text)!)
            self.delegate.returnCountyrCode(countryCode:areaCode!)
            self.dismiss(animated: true, completion: nil)
            self.dismiss(animated: true, completion: nil)
            self.searchController.searchBar.text = ""
        }else{
            self.delegate?.returnCountyrCode(countryCode: (cell?.detailTextLabel?.text)!)
            self.delegate?.returnCountryName(countryName: (cell?.textLabel?.text)!)
            self.dismiss(animated: true, completion: nil)
        }
    }
    
      
}

調用的代碼


   let chonsenCountryCodeVC = ChonsenCountryViewController()
        chonsenCountryCodeVC.delegate = self
        self.present(chonsenCountryCodeVC, animated: true, completion: nil)

然后還有份plist文件竞端,你新建一個plist文件,復制進去就可以了

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>A</key>
    <array>
        <dict>
            <key>country</key>
            <string>阿爾巴尼亞</string>
            <key>code</key>
            <string>355</string>
        </dict>
        <dict>
            <key>country</key>
            <string>阿爾及利亞</string>
            <key>code</key>
            <string>213</string>
        </dict>
        <dict>
            <key>country</key>
            <string>阿富汗</string>
            <key>code</key>
            <string>93</string>
        </dict>
        <dict>
            <key>country</key>
            <string>阿根廷</string>
            <key>code</key>
            <string>54</string>
        </dict>
        <dict>
            <key>country</key>
            <string>愛爾蘭</string>
            <key>code</key>
            <string>353</string>
        </dict>
        <dict>
            <key>country</key>
            <string>埃及</string>
            <key>code</key>
            <string>20</string>
        </dict>
        <dict>
            <key>country</key>
            <string>埃塞俄比亞</string>
            <key>code</key>
            <string>372</string>
        </dict>
        <dict>
            <key>country</key>
            <string>愛沙尼亞</string>
            <key>code</key>
            <string>372</string>
        </dict>
        <dict>
            <key>country</key>
            <string>阿拉伯聯(lián)合酋長國</string>
            <key>code</key>
            <string>971</string>
        </dict>
        <dict>
            <key>country</key>
            <string>阿魯巴</string>
            <key>code</key>
            <string>297</string>
        </dict>
        <dict>
            <key>country</key>
            <string>阿曼</string>
            <key>code</key>
            <string>968</string>
        </dict>
        <dict>
            <key>country</key>
            <string>安道爾</string>
            <key>code</key>
            <string>376</string>
        </dict>
        <dict>
            <key>country</key>
            <string>安哥拉</string>
            <key>code</key>
            <string>244</string>
        </dict>
        <dict>
            <key>country</key>
            <string>安圭拉</string>
            <key>code</key>
            <string>1264</string>
        </dict>
        <dict>
            <key>country</key>
            <string>阿提瓜和巴布達</string>
            <key>code</key>
            <string>1268</string>
        </dict>
        <dict>
            <key>country</key>
            <string>澳大利亞</string>
            <key>code</key>
            <string>61</string>
        </dict>
        <dict>
            <key>country</key>
            <string>奧地利</string>
            <key>code</key>
            <string>43</string>
        </dict>
        <dict>
            <key>country</key>
            <string>阿塞拜疆</string>
            <key>code</key>
            <string>994</string>
        </dict>
    </array>
    <key>B</key>
    <array>
        <dict>
            <key>country</key>
            <string>巴巴多斯</string>
            <key>code</key>
            <string>1246</string>
        </dict>
        <dict>
            <key>country</key>
            <string>巴布亞新幾內亞</string>
            <key>code</key>
            <string>675</string>
        </dict>
        <dict>
            <key>country</key>
            <string>巴哈馬</string>
            <key>code</key>
            <string>1242</string>
        </dict>
        <dict>
            <key>country</key>
            <string>白俄羅斯</string>
            <key>code</key>
            <string>375</string>
        </dict>
        <dict>
            <key>country</key>
            <string>百慕大</string>
            <key>code</key>
            <string>1441</string>
        </dict>
        <dict>
            <key>country</key>
            <string>巴基斯坦</string>
            <key>code</key>
            <string>92</string>
        </dict>
        <dict>
            <key>country</key>
            <string>巴拉圭</string>
            <key>code</key>
            <string>595</string>
        </dict>
        <dict>
            <key>country</key>
            <string>巴林</string>
            <key>code</key>
            <string>973</string>
        </dict>
        <dict>
            <key>country</key>
            <string>巴拿馬</string>
            <key>code</key>
            <string>507</string>
        </dict>
        <dict>
            <key>country</key>
            <string>保加利亞</string>
            <key>code</key>
            <string>359</string>
        </dict>
        <dict>
            <key>country</key>
            <string>巴西</string>
            <key>code</key>
            <string>55</string>
        </dict>
        <dict>
            <key>country</key>
            <string>北馬里亞納群島</string>
            <key>code</key>
            <string>1670</string>
        </dict>
        <dict>
            <key>country</key>
            <string>貝寧</string>
            <key>code</key>
            <string>229</string>
        </dict>
        <dict>
            <key>country</key>
            <string>比利時</string>
            <key>code</key>
            <string>32</string>
        </dict>
        <dict>
            <key>country</key>
            <string>冰島</string>
            <key>code</key>
            <string>354</string>
        </dict>
        <dict>
            <key>country</key>
            <string>博茨瓦納</string>
            <key>code</key>
            <string>267</string>
        </dict>
        <dict>
            <key>country</key>
            <string>波多黎各</string>
            <key>code</key>
            <string>1787</string>
        </dict>
        <dict>
            <key>country</key>
            <string>波蘭</string>
            <key>code</key>
            <string>48</string>
        </dict>
        <dict>
            <key>country</key>
            <string>玻利維亞</string>
            <key>code</key>
            <string>591</string>
        </dict>
        <dict>
            <key>country</key>
            <string>伯利茲</string>
            <key>code</key>
            <string>501</string>
        </dict>
        <dict>
            <key>country</key>
            <string>波斯尼亞和黑塞哥維那</string>
            <key>code</key>
            <string>387</string>
        </dict>
        <dict>
            <key>country</key>
            <string>不丹</string>
            <key>code</key>
            <string>975</string>
        </dict>
        <dict>
            <key>country</key>
            <string>布基納法索</string>
            <key>code</key>
            <string>226</string>
        </dict>
        <dict>
            <key>country</key>
            <string>布隆迪</string>
            <key>code</key>
            <string>257</string>
        </dict>
    </array>
    <key>C</key>
    <array>
        <dict>
            <key>country</key>
            <string>朝鮮</string>
            <key>code</key>
            <string>850</string>
        </dict>
        <dict>
            <key>country</key>
            <string>赤道幾內亞</string>
            <key>code</key>
            <string>240</string>
        </dict>
    </array>
    <key>D</key>
    <array>
        <dict>
            <key>country</key>
            <string>丹麥</string>
            <key>code</key>
            <string>45</string>
        </dict>
        <dict>
            <key>country</key>
            <string>德國</string>
            <key>code</key>
            <string>49</string>
        </dict>
        <dict>
            <key>country</key>
            <string>東帝汶</string>
            <key>code</key>
            <string>670</string>
        </dict>
        <dict>
            <key>country</key>
            <string>多哥</string>
            <key>code</key>
            <string>228</string>
        </dict>
        <dict>
            <key>country</key>
            <string>多尼米加共和國</string>
            <key>code</key>
            <string>1809</string>
        </dict>
        <dict>
            <key>country</key>
            <string>多米尼克</string>
            <key>code</key>
            <string>1767</string>
        </dict>
    </array>
    <key>E</key>
    <array>
        <dict>
            <key>country</key>
            <string>厄瓜多爾</string>
            <key>code</key>
            <string>593</string>
        </dict>
        <dict>
            <key>country</key>
            <string>厄立特里亞</string>
            <key>code</key>
            <string>291</string>
        </dict>
        <dict>
            <key>country</key>
            <string>俄羅斯</string>
            <key>code</key>
            <string>7</string>
        </dict>
    </array>
    <key>F</key>
    <array>
        <dict>
            <key>country</key>
            <string>法國</string>
            <key>code</key>
            <string>33</string>
        </dict>
        <dict>
            <key>country</key>
            <string>法羅群島</string>
            <key>code</key>
            <string>298</string>
        </dict>
        <dict>
            <key>country</key>
            <string>梵蒂岡</string>
            <key>code</key>
            <string>379</string>
        </dict>
        <dict>
            <key>country</key>
            <string>法屬波利尼西亞</string>
            <key>code</key>
            <string>689</string>
        </dict>
        <dict>
            <key>country</key>
            <string>法屬圣馬丁</string>
            <key>code</key>
            <string>1599</string>
        </dict>
        <dict>
            <key>country</key>
            <string>斐濟</string>
            <key>code</key>
            <string>679</string>
        </dict>
        <dict>
            <key>country</key>
            <string>菲律賓</string>
            <key>code</key>
            <string>63</string>
        </dict>
        <dict>
            <key>country</key>
            <string>芬蘭</string>
            <key>code</key>
            <string>358</string>
        </dict>
        <dict>
            <key>country</key>
            <string>佛得角</string>
            <key>code</key>
            <string>238</string>
        </dict>
        <dict>
            <key>country</key>
            <string>该硭克蘭群島</string>
            <key>code</key>
            <string>500</string>
        </dict>
    </array>
    <key>G</key>
    <array>
        <dict>
            <key>country</key>
            <string>岡比亞</string>
            <key>code</key>
            <string>220</string>
        </dict>
        <dict>
            <key>country</key>
            <string>剛果(布)</string>
            <key>code</key>
            <string>242</string>
        </dict>
        <dict>
            <key>country</key>
            <string>剛果(金)</string>
            <key>code</key>
            <string>243</string>
        </dict>
        <dict>
            <key>country</key>
            <string>格陵蘭</string>
            <key>code</key>
            <string>299</string>
        </dict>
        <dict>
            <key>country</key>
            <string>格林納達</string>
            <key>code</key>
            <string>1473</string>
        </dict>
        <dict>
            <key>country</key>
            <string>格魯吉亞</string>
            <key>code</key>
            <string>995</string>
        </dict>
        <dict>
            <key>country</key>
            <string>哥倫比亞</string>
            <key>code</key>
            <string>57</string>
        </dict>
        <dict>
            <key>country</key>
            <string>哥斯達黎加</string>
            <key>code</key>
            <string>506</string>
        </dict>
        <dict>
            <key>country</key>
            <string>關島</string>
            <key>code</key>
            <string>1671</string>
        </dict>
        <dict>
            <key>country</key>
            <string>古巴</string>
            <key>code</key>
            <string>53</string>
        </dict>
        <dict>
            <key>country</key>
            <string>圭亞那</string>
            <key>code</key>
            <string>592</string>
        </dict>
    </array>
    <key>H</key>
    <array>
        <dict>
            <key>country</key>
            <string>海地</string>
            <key>code</key>
            <string>509</string>
        </dict>
        <dict>
            <key>country</key>
            <string>韓國</string>
            <key>code</key>
            <string>82</string>
        </dict>
        <dict>
            <key>country</key>
            <string>哈薩克斯坦</string>
            <key>code</key>
            <string>7</string>
        </dict>
        <dict>
            <key>country</key>
            <string>黑山</string>
            <key>code</key>
            <string>382</string>
        </dict>
        <dict>
            <key>country</key>
            <string>荷蘭</string>
            <key>code</key>
            <string>31</string>
        </dict>
        <dict>
            <key>country</key>
            <string>荷屬安地列斯群島</string>
            <key>code</key>
            <string>599</string>
        </dict>
        <dict>
            <key>country</key>
            <string>洪都拉斯</string>
            <key>code</key>
            <string>504</string>
        </dict>
    </array>
    <key>J</key>
    <array>
        <dict>
            <key>country</key>
            <string>加納</string>
            <key>code</key>
            <string>233</string>
        </dict>
        <dict>
            <key>country</key>
            <string>加拿大</string>
            <key>code</key>
            <string>1</string>
        </dict>
        <dict>
            <key>country</key>
            <string>柬埔寨</string>
            <key>code</key>
            <string>855</string>
        </dict>
        <dict>
            <key>country</key>
            <string>加蓬</string>
            <key>code</key>
            <string>241</string>
        </dict>
        <dict>
            <key>country</key>
            <string>吉布提</string>
            <key>code</key>
            <string>253</string>
        </dict>
        <dict>
            <key>country</key>
            <string>捷克共和國</string>
            <key>code</key>
            <string>420</string>
        </dict>
        <dict>
            <key>country</key>
            <string>吉爾吉斯斯坦</string>
            <key>code</key>
            <string>996</string>
        </dict>
        <dict>
            <key>country</key>
            <string>基里巴斯</string>
            <key>code</key>
            <string>686</string>
        </dict>
        <dict>
            <key>country</key>
            <string>津巴布韋</string>
            <key>code</key>
            <string>263</string>
        </dict>
        <dict>
            <key>country</key>
            <string>幾內亞</string>
            <key>code</key>
            <string>224</string>
        </dict>
        <dict>
            <key>country</key>
            <string>幾內亞比紹</string>
            <key>code</key>
            <string>245</string>
        </dict>
    </array>
    <key>K</key>
    <array>
        <dict>
            <key>country</key>
            <string>開曼群島</string>
            <key>code</key>
            <string>1345</string>
        </dict>
        <dict>
            <key>country</key>
            <string>喀麥隆</string>
            <key>code</key>
            <string>237</string>
        </dict>
        <dict>
            <key>country</key>
            <string>卡塔爾</string>
            <key>code</key>
            <string>974</string>
        </dict>
        <dict>
            <key>country</key>
            <string>科科斯(基林)群島</string>
            <key>code</key>
            <string>61</string>
        </dict>
        <dict>
            <key>country</key>
            <string>克羅地亞</string>
            <key>code</key>
            <string>385</string>
        </dict>
        <dict>
            <key>country</key>
            <string>科摩羅</string>
            <key>code</key>
            <string>269</string>
        </dict>
        <dict>
            <key>country</key>
            <string>肯尼亞</string>
            <key>code</key>
            <string>254</string>
        </dict>
        <dict>
            <key>country</key>
            <string>科特迪瓦</string>
            <key>code</key>
            <string>225</string>
        </dict>
        <dict>
            <key>country</key>
            <string>科威特</string>
            <key>code</key>
            <string>965</string>
        </dict>
        <dict>
            <key>country</key>
            <string>庫克群島</string>
            <key>code</key>
            <string>682</string>
        </dict>
    </array>
    <key>L</key>
    <array>
        <dict>
            <key>country</key>
            <string>萊索托</string>
            <key>code</key>
            <string>266</string>
        </dict>
        <dict>
            <key>country</key>
            <string>老撾</string>
            <key>code</key>
            <string>856</string>
        </dict>
        <dict>
            <key>country</key>
            <string>拉脫維亞</string>
            <key>code</key>
            <string>371</string>
        </dict>
        <dict>
            <key>country</key>
            <string>黎巴嫩</string>
            <key>code</key>
            <string>961</string>
        </dict>
        <dict>
            <key>country</key>
            <string>利比里亞</string>
            <key>code</key>
            <string>231</string>
        </dict>
        <dict>
            <key>country</key>
            <string>利比亞</string>
            <key>code</key>
            <string>218</string>
        </dict>
        <dict>
            <key>country</key>
            <string>列支敦士登</string>
            <key>code</key>
            <string>423</string>
        </dict>
        <dict>
            <key>country</key>
            <string>立陶宛</string>
            <key>code</key>
            <string>370</string>
        </dict>
        <dict>
            <key>country</key>
            <string>羅馬尼亞</string>
            <key>code</key>
            <string>40</string>
        </dict>
        <dict>
            <key>country</key>
            <string>盧森堡</string>
            <key>code</key>
            <string>352</string>
        </dict>
        <dict>
            <key>country</key>
            <string>盧旺達</string>
            <key>code</key>
            <string>250</string>
        </dict>
    </array>
    <key>M</key>
    <array>
        <dict>
            <key>country</key>
            <string>馬達加斯加</string>
            <key>code</key>
            <string>261</string>
        </dict>
        <dict>
            <key>country</key>
            <string>馬爾代夫</string>
            <key>code</key>
            <string>960</string>
        </dict>
        <dict>
            <key>country</key>
            <string>馬耳他</string>
            <key>code</key>
            <string>356</string>
        </dict>
        <dict>
            <key>country</key>
            <string>馬來西亞</string>
            <key>code</key>
            <string>60</string>
        </dict>
        <dict>
            <key>country</key>
            <string>馬拉維</string>
            <key>code</key>
            <string>265</string>
        </dict>
        <dict>
            <key>country</key>
            <string>馬里</string>
            <key>code</key>
            <string>223</string>
        </dict>
        <dict>
            <key>country</key>
            <string>曼島</string>
            <key>code</key>
            <string>44</string>
        </dict>
        <dict>
            <key>country</key>
            <string>毛里求斯</string>
            <key>code</key>
            <string>230</string>
        </dict>
        <dict>
            <key>country</key>
            <string>毛里塔尼亞</string>
            <key>code</key>
            <string>222</string>
        </dict>
        <dict>
            <key>country</key>
            <string>馬其頓</string>
            <key>code</key>
            <string>389</string>
        </dict>
        <dict>
            <key>country</key>
            <string>馬紹爾群島</string>
            <key>code</key>
            <string>692</string>
        </dict>
        <dict>
            <key>country</key>
            <string>馬約特</string>
            <key>code</key>
            <string>262</string>
        </dict>
        <dict>
            <key>country</key>
            <string>美國</string>
            <key>code</key>
            <string>1</string>
        </dict>
        <dict>
            <key>country</key>
            <string>美屬薩摩亞</string>
            <key>code</key>
            <string>1684</string>
        </dict>
        <dict>
            <key>country</key>
            <string>美屬維京群島</string>
            <key>code</key>
            <string>1340</string>
        </dict>
        <dict>
            <key>country</key>
            <string>蒙古</string>
            <key>code</key>
            <string>976</string>
        </dict>
        <dict>
            <key>country</key>
            <string>孟加拉國</string>
            <key>code</key>
            <string>880</string>
        </dict>
        <dict>
            <key>country</key>
            <string>蒙特塞拉特</string>
            <key>code</key>
            <string>1664</string>
        </dict>
        <dict>
            <key>country</key>
            <string>緬甸</string>
            <key>code</key>
            <string>95</string>
        </dict>
        <dict>
            <key>country</key>
            <string>密克羅尼西亞</string>
            <key>code</key>
            <string>691</string>
        </dict>
        <dict>
            <key>country</key>
            <string>秘魯</string>
            <key>code</key>
            <string>51</string>
        </dict>
        <dict>
            <key>country</key>
            <string>摩爾多瓦</string>
            <key>code</key>
            <string>373</string>
        </dict>
        <dict>
            <key>country</key>
            <string>摩洛哥</string>
            <key>code</key>
            <string>212</string>
        </dict>
        <dict>
            <key>country</key>
            <string>摩納哥</string>
            <key>code</key>
            <string>377</string>
        </dict>
        <dict>
            <key>country</key>
            <string>莫桑比克</string>
            <key>code</key>
            <string>258</string>
        </dict>
        <dict>
            <key>country</key>
            <string>墨西哥</string>
            <key>code</key>
            <string>52</string>
        </dict>
    </array>
    <key>N</key>
    <array>
        <dict>
            <key>country</key>
            <string>納米比亞</string>
            <key>code</key>
            <string>264</string>
        </dict>
        <dict>
            <key>country</key>
            <string>南非</string>
            <key>code</key>
            <string>27</string>
        </dict>
        <dict>
            <key>country</key>
            <string>南極洲</string>
            <key>code</key>
            <string>672</string>
        </dict>
        <dict>
            <key>country</key>
            <string>瑙魯</string>
            <key>code</key>
            <string>674</string>
        </dict>
        <dict>
            <key>country</key>
            <string>尼泊爾</string>
            <key>code</key>
            <string>977</string>
        </dict>
        <dict>
            <key>country</key>
            <string>尼加拉瓜</string>
            <key>code</key>
            <string>505</string>
        </dict>
        <dict>
            <key>country</key>
            <string>尼日爾</string>
            <key>code</key>
            <string>227</string>
        </dict>
        <dict>
            <key>country</key>
            <string>尼日利亞</string>
            <key>code</key>
            <string>234</string>
        </dict>
        <dict>
            <key>country</key>
            <string>紐埃</string>
            <key>code</key>
            <string>683</string>
        </dict>
        <dict>
            <key>country</key>
            <string>挪威</string>
            <key>code</key>
            <string>47</string>
        </dict>
    </array>
    <key>P</key>
    <array>
        <dict>
            <key>country</key>
            <string>帕勞</string>
            <key>code</key>
            <string>680</string>
        </dict>
        <dict>
            <key>country</key>
            <string>皮特凱恩群島</string>
            <key>code</key>
            <string>870</string>
        </dict>
        <dict>
            <key>country</key>
            <string>葡萄牙</string>
            <key>code</key>
            <string>351</string>
        </dict>
    </array>
    <key>R</key>
    <array>
        <dict>
            <key>country</key>
            <string>日本</string>
            <key>code</key>
            <string>81</string>
        </dict>
        <dict>
            <key>country</key>
            <string>瑞典</string>
            <key>code</key>
            <string>46</string>
        </dict>
        <dict>
            <key>country</key>
            <string>瑞士</string>
            <key>code</key>
            <string>41</string>
        </dict>
    </array>
    <key>S</key>
    <array>
        <dict>
            <key>country</key>
            <string>薩爾瓦多</string>
            <key>code</key>
            <string>503</string>
        </dict>
        <dict>
            <key>country</key>
            <string>塞爾維亞</string>
            <key>code</key>
            <string>381</string>
        </dict>
        <dict>
            <key>country</key>
            <string>塞拉利昂</string>
            <key>code</key>
            <string>232</string>
        </dict>
        <dict>
            <key>country</key>
            <string>塞內加爾</string>
            <key>code</key>
            <string>221</string>
        </dict>
        <dict>
            <key>country</key>
            <string>塞浦路斯</string>
            <key>code</key>
            <string>357</string>
        </dict>
        <dict>
            <key>country</key>
            <string>塞舌爾</string>
            <key>code</key>
            <string>248</string>
        </dict>
        <dict>
            <key>country</key>
            <string>薩摩亞</string>
            <key>code</key>
            <string>685</string>
        </dict>
        <dict>
            <key>country</key>
            <string>沙特阿拉伯</string>
            <key>code</key>
            <string>966</string>
        </dict>
        <dict>
            <key>country</key>
            <string>圣巴泰勒米</string>
            <key>code</key>
            <string>590</string>
        </dict>
        <dict>
            <key>country</key>
            <string>圣誕島</string>
            <key>code</key>
            <string>61</string>
        </dict>
        <dict>
            <key>country</key>
            <string>圣多美和普林西比</string>
            <key>code</key>
            <string>239</string>
        </dict>
        <dict>
            <key>country</key>
            <string>圣赫勒拿</string>
            <key>code</key>
            <string>290</string>
        </dict>
        <dict>
            <key>country</key>
            <string>圣基茨和尼維斯</string>
            <key>code</key>
            <string>1869</string>
        </dict>
        <dict>
            <key>country</key>
            <string>圣盧西亞</string>
            <key>code</key>
            <string>1758</string>
        </dict>
        <dict>
            <key>country</key>
            <string>圣馬力諾</string>
            <key>code</key>
            <string>378</string>
        </dict>
        <dict>
            <key>country</key>
            <string>圣皮埃爾和密克隆群島</string>
            <key>code</key>
            <string>508</string>
        </dict>
        <dict>
            <key>country</key>
            <string>圣文森特和格林納丁斯</string>
            <key>code</key>
            <string>1784</string>
        </dict>
        <dict>
            <key>country</key>
            <string>斯里蘭卡</string>
            <key>code</key>
            <string>94</string>
        </dict>
        <dict>
            <key>country</key>
            <string>斯洛伐克</string>
            <key>code</key>
            <string>421</string>
        </dict>
        <dict>
            <key>country</key>
            <string>斯洛文尼亞</string>
            <key>code</key>
            <string>386</string>
        </dict>
        <dict>
            <key>country</key>
            <string>斯威士蘭</string>
            <key>code</key>
            <string>268</string>
        </dict>
        <dict>
            <key>country</key>
            <string>蘇丹</string>
            <key>code</key>
            <string>249</string>
        </dict>
        <dict>
            <key>country</key>
            <string>蘇里南</string>
            <key>code</key>
            <string>597</string>
        </dict>
        <dict>
            <key>country</key>
            <string>所羅門群島</string>
            <key>code</key>
            <string>677</string>
        </dict>
        <dict>
            <key>country</key>
            <string>索馬里</string>
            <key>code</key>
            <string>252</string>
        </dict>
    </array>
    <key>T</key>
    <array>
        <dict>
            <key>country</key>
            <string>泰國</string>
            <key>code</key>
            <string>66</string>
        </dict>
        <dict>
            <key>country</key>
            <string>臺灣</string>
            <key>code</key>
            <string>886</string>
        </dict>
        <dict>
            <key>country</key>
            <string>塔吉克斯坦</string>
            <key>code</key>
            <string>992</string>
        </dict>
        <dict>
            <key>country</key>
            <string>湯加</string>
            <key>code</key>
            <string>676</string>
        </dict>
        <dict>
            <key>country</key>
            <string>坦桑尼亞</string>
            <key>code</key>
            <string>255</string>
        </dict>
        <dict>
            <key>country</key>
            <string>特克斯和凱科斯群島</string>
            <key>code</key>
            <string>1649</string>
        </dict>
        <dict>
            <key>country</key>
            <string>特立尼達和多巴哥</string>
            <key>code</key>
            <string>1868</string>
        </dict>
        <dict>
            <key>country</key>
            <string>土耳其</string>
            <key>code</key>
            <string>90</string>
        </dict>
        <dict>
            <key>country</key>
            <string>土庫曼斯坦</string>
            <key>code</key>
            <string>993</string>
        </dict>
        <dict>
            <key>country</key>
            <string>突尼斯</string>
            <key>code</key>
            <string>216</string>
        </dict>
        <dict>
            <key>country</key>
            <string>托克勞</string>
            <key>code</key>
            <string>690</string>
        </dict>
        <dict>
            <key>country</key>
            <string>圖瓦盧</string>
            <key>code</key>
            <string>688</string>
        </dict>
    </array>
    <key>W</key>
    <array>
        <dict>
            <key>country</key>
            <string>瓦利斯和富圖納</string>
            <key>code</key>
            <string>681</string>
        </dict>
        <dict>
            <key>country</key>
            <string>瓦努阿圖</string>
            <key>code</key>
            <string>678</string>
        </dict>
        <dict>
            <key>country</key>
            <string>危地馬拉</string>
            <key>code</key>
            <string>502</string>
        </dict>
        <dict>
            <key>country</key>
            <string>委內瑞拉</string>
            <key>code</key>
            <string>58</string>
        </dict>
        <dict>
            <key>country</key>
            <string>文萊</string>
            <key>code</key>
            <string>673</string>
        </dict>
        <dict>
            <key>country</key>
            <string>烏干達</string>
            <key>code</key>
            <string>256</string>
        </dict>
        <dict>
            <key>country</key>
            <string>烏克蘭</string>
            <key>code</key>
            <string>380</string>
        </dict>
        <dict>
            <key>country</key>
            <string>烏拉圭</string>
            <key>code</key>
            <string>598</string>
        </dict>
        <dict>
            <key>country</key>
            <string>烏茲別克斯坦</string>
            <key>code</key>
            <string>998</string>
        </dict>
    </array>
    <key>X</key>
    <array>
        <dict>
            <key>country</key>
            <string>西班牙</string>
            <key>code</key>
            <string>34</string>
        </dict>
        <dict>
            <key>country</key>
            <string>希臘</string>
            <key>code</key>
            <string>30</string>
        </dict>
        <dict>
            <key>country</key>
            <string>新加坡</string>
            <key>code</key>
            <string>65</string>
        </dict>
        <dict>
            <key>country</key>
            <string>新喀里多尼亞</string>
            <key>code</key>
            <string>687</string>
        </dict>
        <dict>
            <key>country</key>
            <string>新西蘭</string>
            <key>code</key>
            <string>64</string>
        </dict>
        <dict>
            <key>country</key>
            <string>匈牙利</string>
            <key>code</key>
            <string>36</string>
        </dict>
        <dict>
            <key>country</key>
            <string>敘利亞</string>
            <key>code</key>
            <string>963</string>
        </dict>
    </array>
    <key>Y</key>
    <array>
        <dict>
            <key>country</key>
            <string>牙買加</string>
            <key>code</key>
            <string>1876</string>
        </dict>
        <dict>
            <key>country</key>
            <string>亞美尼亞</string>
            <key>code</key>
            <string>374</string>
        </dict>
        <dict>
            <key>country</key>
            <string>也門</string>
            <key>code</key>
            <string>967</string>
        </dict>
        <dict>
            <key>country</key>
            <string>意大利</string>
            <key>code</key>
            <string>39</string>
        </dict>
        <dict>
            <key>country</key>
            <string>伊拉克</string>
            <key>code</key>
            <string>964</string>
        </dict>
        <dict>
            <key>country</key>
            <string>伊朗</string>
            <key>code</key>
            <string>98</string>
        </dict>
        <dict>
            <key>country</key>
            <string>印度</string>
            <key>code</key>
            <string>91</string>
        </dict>
        <dict>
            <key>country</key>
            <string>印度尼西亞</string>
            <key>code</key>
            <string>62</string>
        </dict>
        <dict>
            <key>country</key>
            <string>英國</string>
            <key>code</key>
            <string>44</string>
        </dict>
        <dict>
            <key>country</key>
            <string>英屬維京群島</string>
            <key>code</key>
            <string>1284</string>
        </dict>
        <dict>
            <key>country</key>
            <string>以色列</string>
            <key>code</key>
            <string>972</string>
        </dict>
        <dict>
            <key>country</key>
            <string>約旦</string>
            <key>code</key>
            <string>962</string>
        </dict>
        <dict>
            <key>country</key>
            <string>越南</string>
            <key>code</key>
            <string>84</string>
        </dict>
    </array>
    <key>Z</key>
    <array>
        <dict>
            <key>country</key>
            <string>贊比亞</string>
            <key>code</key>
            <string>260</string>
        </dict>
        <dict>
            <key>country</key>
            <string>乍得</string>
            <key>code</key>
            <string>235</string>
        </dict>
        <dict>
            <key>country</key>
            <string>直布羅陀</string>
            <key>code</key>
            <string>350</string>
        </dict>
        <dict>
            <key>country</key>
            <string>智利</string>
            <key>code</key>
            <string>56</string>
        </dict>
        <dict>
            <key>country</key>
            <string>中非共和國</string>
            <key>code</key>
            <string>236</string>
        </dict>
        <dict>
            <key>country</key>
            <string>中國</string>
            <key>code</key>
            <string>86</string>
        </dict>
        <dict>
            <key>country</key>
            <string>中國澳門特別行政區(qū)</string>
            <key>code</key>
            <string>853</string>
        </dict>
        <dict>
            <key>country</key>
            <string>中國香港特別行政區(qū)</string>
            <key>code</key>
            <string>852</string>
        </dict>
    </array>
</dict>
</plist>

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
  • 序言:七十年代末事富,一起剝皮案震驚了整個濱河市技俐,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌统台,老刑警劉巖雕擂,帶你破解...
    沈念sama閱讀 218,386評論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異贱勃,居然都是意外死亡捂刺,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,142評論 3 394
  • 文/潘曉璐 我一進店門募寨,熙熙樓的掌柜王于貴愁眉苦臉地迎上來族展,“玉大人,你說我怎么就攤上這事拔鹰∫歉祝” “怎么了?”我有些...
    開封第一講書人閱讀 164,704評論 0 353
  • 文/不壞的土叔 我叫張陵列肢,是天一觀的道長恰画。 經常有香客問我,道長瓷马,這世上最難降的妖魔是什么拴还? 我笑而不...
    開封第一講書人閱讀 58,702評論 1 294
  • 正文 為了忘掉前任,我火速辦了婚禮欧聘,結果婚禮上片林,老公的妹妹穿的比我還像新娘。我一直安慰自己怀骤,他們只是感情好费封,可當我...
    茶點故事閱讀 67,716評論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著蒋伦,像睡著了一般弓摘。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上痕届,一...
    開封第一講書人閱讀 51,573評論 1 305
  • 那天韧献,我揣著相機與錄音,去河邊找鬼研叫。 笑死锤窑,一個胖子當著我的面吹牛,可吹牛的內容都是我干的蓝撇。 我是一名探鬼主播果复,決...
    沈念sama閱讀 40,314評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼渤昌!你這毒婦竟也來了虽抄?” 一聲冷哼從身側響起走搁,我...
    開封第一講書人閱讀 39,230評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎迈窟,沒想到半個月后私植,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經...
    沈念sama閱讀 45,680評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡车酣,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 37,873評論 3 336
  • 正文 我和宋清朗相戀三年曲稼,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片湖员。...
    茶點故事閱讀 39,991評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡贫悄,死狀恐怖,靈堂內的尸體忽然破棺而出娘摔,到底是詐尸還是另有隱情窄坦,我是刑警寧澤,帶...
    沈念sama閱讀 35,706評論 5 346
  • 正文 年R本政府宣布凳寺,位于F島的核電站鸭津,受9級特大地震影響,放射性物質發(fā)生泄漏肠缨。R本人自食惡果不足惜逆趋,卻給世界環(huán)境...
    茶點故事閱讀 41,329評論 3 330
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望晒奕。 院中可真熱鬧闻书,春花似錦、人聲如沸吴汪。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,910評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽漾橙。三九已至,卻和暖如春楞卡,著一層夾襖步出監(jiān)牢的瞬間霜运,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,038評論 1 270
  • 我被黑心中介騙來泰國打工蒋腮, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留淘捡,地道東北人。 一個月前我還...
    沈念sama閱讀 48,158評論 3 370
  • 正文 我出身青樓池摧,卻偏偏與公主長得像焦除,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子作彤,可洞房花燭夜當晚...
    茶點故事閱讀 44,941評論 2 355

推薦閱讀更多精彩內容

  • 發(fā)現(xiàn) 關注 消息 iOS 第三方庫膘魄、插件乌逐、知名博客總結 作者大灰狼的小綿羊哥哥關注 2017.06.26 09:4...
    肇東周閱讀 12,103評論 4 62
  • 消失在遠方的稻草人, 回不去的天真创葡。 像很久之前的一個夢浙踢, 重復著舊時衣,舊時天氣灿渴。 雨洛波,落成了永恒, 秋天不回來...
    春余清歌閱讀 423評論 0 1
  • 1 有棟大廈闻伶,一樓裝修時發(fā)生火災,那場事故讓50多位鮮活的生命離世够话。當時有很多住在3樓4樓甚至2樓的人都在家里失去...
    蓮道邊閱讀 280評論 5 1
  • 定諾 不語不言蓝翰,心安定歸山。 不辜不負女嘲,誠語對諾言畜份。 風和日麗話語出, 心平氣和仕途路欣尼。 連綿山雨繞爆雹, 歸意心猿生...
    m萌的原創(chuàng)小窩閱讀 156評論 0 1