iOS 电话输入视图 PhoneNumberPicker

jopen 9年前

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.open-open.com/lib/view/home/1442670167196