Pages

Tuesday, May 27, 2014

EMCCountryPickerController: A Country Picker View Controller for iOS

EMCCountryPickerController is a view controller I've built that lets you choose a country from a searchable list that includes all the countries assigned an ISO 3166-1 alpha-2 two-letter country codes.



EMCCountryPickerController is extremely simple to use:
  • It just has to be presented.
  • The user interacts with the user interface and selects a country.
  • The selection is communicated to a delegate, which dismisses the view controller and uses the results.
Comprehensive usage details, as well as a complete demo project, can be found in its GitHub repository.

This component features also has the following additional features:
  • Country name can be localised (some localisations are already provided, such as English and Italian).
  • Flag borders can be drawn and customised.
  • Flags can be optionally turned off.

The controller includes the flag of all the available countries, rasterised from a SVG file in the public domain. The controller is distributed with the BSD 3-clause license.

Installation

Besides grabbing the sources and the resource files from its GitHub repository, the quickest way to use the controller is using CocoaPods and adding a reference to the EMCCountryPickerController pod to your project Podfile:

pod 'EMCCountryPickerController', '~> 1.1'

Enjoy.