[code4app.com]CountryPicker_10805

所属分类:界面编程
开发工具:Objective-C
文件大小:440KB
下载次数:2
上传日期:2013-06-09 16:29:22
上 传 者yang2009300847
说明:  国旗显示全部国旗滚动。十分有意思。无任何错误,永兴流程
(Show all flag flag scrolling. Very interesting. Without any errors, Yongxing process)

文件列表:
nicklockwood-CountryPicker-45f2e70 (0, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\CountryPicker (0, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\CountryPicker\Countries.plist (11275, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\CountryPicker\CountryPicker.h (3351, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\CountryPicker\CountryPicker.m (5772, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples (0, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo.xcodeproj (0, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo.xcodeproj\project.pbxproj (104650, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo (0, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo\AppDelegate.h (385, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo\AppDelegate.m (2472, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo\CountryPickerDemo-Info.plist (1215, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo\CountryPickerDemo-Prefix.pch (337, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo\ViewController.h (405, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo\ViewController.m (441, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo\en.lproj (0, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo\en.lproj\InfoPlist.strings (45, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo\en.lproj\ViewController.xib (11453, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Examples\CountryPickerDemo\main.m (357, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags (0, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AC.png (2675, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AD.png (1544, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AE.png (837, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AF.png (2155, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AG.png (2089, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AI.png (2619, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AL.png (1747, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AM.png (787, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AN.png (1125, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AO.png (1540, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AQ.png (1669, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AR.png (839, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AS.png (2554, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AT.png (628, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AU.png (2623, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AW.png (1066, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AX.png (1036, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\AZ.png (1201, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\BA.png (2343, 2012-02-10)
nicklockwood-CountryPicker-45f2e70\Flags\BB.png (1505, 2012-02-10)
... ...

Purpose -------------- CountryPicker is a custom UIPickerView subclass that provides an iOS control allowing a user to select a country from a list. It can optionally display a flag next to each country name, and the library includes a set of 249 high-quality, public domain flag images from FAMFAMFAM (http://www.famfamfam.com/lab/icons/flags/) that have been painstakingly re-named by country code to work with the library. Note that the list of countries is based on the ISO 3166 country code standard (http://en.wikipedia.org/wiki/ISO_3166-1). This list excludes certain smaller countries, regarding them as part of a larger state. For example, England, Scotland, Wales and Northern Ireland are lumped together as Great Britain. For most purposes this is fine as it matches the convention used for locales, but if you need to specify additional countries, you can add them to the Countries.plist file (making sure to invent a unique country code for each). Supported iOS & SDK Versions ----------------------------- * Supported build target - iOS 5.0 (Xcode 4.2, Apple LLVM compiler 3.0) * Earliest supported deployment target - iOS 4.3 * Earliest compatible deployment target - iOS 3.2 NOTE: 'Supported' means that the library has been tested with this version. 'Compatible' means that the library should work on this iOS version (i.e. it doesn't rely on any unavailable SDK features) but is no longer being tested for compatibility and may require tweaking or bug fixes to run correctly. ARC Compatibility ------------------ As of version 1.0.1, CountryPicker automatically works with both ARC and non-ARC projects through conditional compilation. There is no need to exclude CountryPicker files from the ARC validation process, or to convert CountryPicker using the ARC conversion tool. Installation -------------- To use the CountryPicker in an app, just drag the CountryPicker class files, and the Countries.plist file into your project. If you want to use the FAMFAMFAM flag icons, drag the Flags folder in also. CountryPicker class methods ----------------------------- The CountryPicker class includes several handy methods for retrieving country names and codes, and converting between the two: + (NSArray *)countryNames; Returns an array of all country names in alphabetical order. + (NSArray *)countryCodes; Returns an array of all country codes. The codes are sorted by country name, and their indices match the indices of their respective country name in the `countryNames` list, but note that this means that the codes themselves are not sorted alphabetically. + (NSDictionary *)countryNamesByCode; Returns a dictionary of country names, keyed by country code. + (NSDictionary *)countryCodesByName; Returns a dictionary of country codes, keyed by country name. CountryPicker properties --------------------------- Each CountryPicker view has the following properties: @property (nonatomic, assign) id delegate; The delegate. This implements the CountryPickerDelegate protocol, and is notified when a country is selected. @property (nonatomic, copy) NSString *selectedCountryName; The currently selected country name. This is a read-write property, so it can be used to set the picker value. Setting the picker to a country name that does not appear in the `countryNames` array has no effect. @property (nonatomic, copy) NSString *selectedCountryCode; The currently selected country code. This is a read-write property, so it can be used to set the picker value. Setting the picker to a country code that does not appear in the `countryCodes` array has no effect. CountryPicker instance methods ------------------------------- CountryPicker has the following utility method: - (void)setWithLocale:(NSLocale *)locale; This is a convenience method to set the picker using a locale. The picker will automatically select the correct country based on the local. To default the picker to the current device locale, you can say: [picker setWithLocale:[NSLocale currentLocale]]; CountryPickerDelegate protocol -------------------------------- The CountryPickerDelegate protocol has a single obligatory method: - (void)countryPicker:(CountryPicker *)picker didSelectCountryWithName:(NSString *)name code:(NSString *)code; This method is called whenever a country is selected in the picker.

近期下载者

相关文件


收藏者