https://github.com/gazolla/gzcountrytableview
A GzCountryTableView is a UITableView preload with appStore Countries and flags. The objective of this is to provide a way to pick one country from a list with a search mechanism.
https://github.com/gazolla/gzcountrytableview
Last synced: 6 months ago
JSON representation
A GzCountryTableView is a UITableView preload with appStore Countries and flags. The objective of this is to provide a way to pick one country from a list with a search mechanism.
- Host: GitHub
- URL: https://github.com/gazolla/gzcountrytableview
- Owner: gazolla
- Created: 2013-05-02T20:22:23.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-05-28T22:42:39.000Z (about 9 years ago)
- Last Synced: 2023-03-28T01:13:53.630Z (about 2 years ago)
- Language: Objective-C
- Homepage:
- Size: 1 MB
- Stars: 28
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#GzCountryTableView
A `GzCountryTableView` is a UITableView preload with appStore Countries and flags. The objective of this is to provide a way to pick one country from a list with a Search mechanism.

##Supported Platforms
- iOS 6+
##Installing
In order to install `GzCountryTableView`, you'll need to copy the GzCountryTableViewController folder into your Xcode project.
###Usage
In order to use `GzCountryTableView`, you'll need to include the following code in your project:
CountryViewController *countryViewController = [[CountryViewController alloc] initWithStyle:UITableViewStyleGrouped];
countryViewController.title = @"Countries";
countryViewController.currentItemString = _country;
[countryViewController addObserver:self forKeyPath:@"currentItemString" options:0 context:nil];
[self.navigationController pushViewController:_countryViewController animated:YES];
And implement the KVO method:-(void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{
if ([keyPath isEqual:@"currentItemString"]) {
_country = [_countryViewController currentItemString];
[self.tableView reloadData];
Countries *c = [Countries sharedInstance];
[c loadCountries];
}
}if you want to add or remove a country from the tableView, just edit the `appstore_countries.txt` file locate at flags directory `/GzCountryTableViewController/flags`
##Credits & Contributors`GzCountryTableView` was written by Sebastian Gazolla Jr.
* [http://about.me/gazolla](http://about.me/gazolla)
##License`GzCountryTableView` is licensed under the MIT license, which is reproduced in its entirety here:
>Copyright (c) 2013 Sebastian Gazolla Jr
>
>Permission is hereby granted, free of charge, to any person obtaining a copy
>of this software and associated documentation files (the "Software"), to deal
>in the Software without restriction, including without limitation the rights
>to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
>copies of the Software, and to permit persons to whom the Software is
>furnished to do so, subject to the following conditions:
>
>The above copyright notice and this permission notice shall be included in
>all copies or substantial portions of the Software.
>
>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
>IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
>AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
>LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
>OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
>THE SOFTWARE.[](https://bitdeli.com/free "Bitdeli Badge")