Latest 0.1.1
Homepage https://github.com/dhiraj/TTCountryFlagLabel
License MIT
Platforms ios 8.3
Dependencies TTEmojiFlagString
Authors

Version
License
Platform

Simple UILabel subclass that displays a country emoji flag instead of the provided 2 letter ISO_3166-1_alpha-2 NSString. This is possible because of the Regional Indicator Symbol Unicode standard.

Example

To run the example project, clone the repo, and run pod install from the Example directory first. The included example demo project shows the country flags in a UITableView. These are not images, the flag and the country name are both UILabel objects.

Image of Yaktocat

Requirements

iOS 8.3+ to get most of the countries flags, before this there were only 10 that were available in iOS.

Installation

TTCountryFlagLabel is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "TTCountryFlagLabel"

Author

Dhiraj Gupta, [email protected]

License

TTCountryFlagLabel is available under the Apache 2.0 license. See the LICENSE file for more info.

Latest podspec

{
    "name": "TTCountryFlagLabel",
    "version": "0.1.1",
    "summary": "Simple UILabel subclass that displays a country emoji flag instead of the 2 letter ISO_3166-1_alpha-2 code that is set on it",
    "description": "The idea is that instead of bundling your own version of 241 flags of all the countries, into your app bundle, at 1x, 2x and 3x sizes, you can simply use a `UILabel` where you would have used a `UIImage` object. iOS provides high quality emoji icons that you can easily scale to up to 64 point size.",
    "homepage": "https://github.com/dhiraj/TTCountryFlagLabel",
    "screenshots": "https://cloud.githubusercontent.com/assets/43901/16786172/84a4fd7a-48b0-11e6-9b92-275853107f93.png",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Dhiraj Gupta": "[email protected]"
    },
    "source": {
        "git": "https://github.com/dhiraj/TTCountryFlagLabel.git",
        "tag": "0.1.1"
    },
    "social_media_url": "https://twitter.com/dhiraj",
    "platforms": {
        "ios": "8.3"
    },
    "source_files": "TTCountryFlagLabel/Classes/**/*",
    "public_header_files": "TTCountryFlagLabel/Classes/**/*.h",
    "dependencies": {
        "TTEmojiFlagString": [
            "~> 0.1"
        ]
    }
}

Pin It on Pinterest

Share This