iOS 電話輸入視圖 PhoneNumberPicker

jopen 9年前發布 | 10K 次閱讀 iOS開發 移動開發 PhoneNumberPicker

PhoneNumberPicker 一個簡單易用的視圖控件,類似于 WhatsApp,允許你輸入含有國家代號的電話號碼。

Setup

  • 1: Create the PhoneNumberViewControllerlet phoneNumberViewController = PhoneNumberViewController.standardController()
  • 2: Set delegate (optional)phoneNumberViewController.delegate = self
  • 3: Present the PhoneNumberViewController (Modally)presentViewController(phoneNumberViewController, animated: true, completion: nil)
  • 4: Present the PhoneNumberViewController (Navigation Controller)phoneNumberViewController.cancelBarButtonItemHidden = truenavigationController?.pushViewController(phoneNumberViewController, animated: true)

Delegate

You can respond to delegate methods using thePhoneNumberViewControllerDelegateprotocol

Country Selector

You can manually present aCountriesViewControllerto present a list of all countries and their phone extensions to the user

屏幕截圖

 iOS 電話輸入視圖 PhoneNumberPicker  iOS 電話輸入視圖 PhoneNumberPicker

項目主頁:http://www.baiduhome.net/lib/view/home/1442670167196

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!