Coder Social home page Coder Social logo

flagkit's Introduction

FlagKit SE

Beautiful flag icons for usage in apps and on the web.

Installation (iOS/OSX)

FlagKit.xcassets

Just add FlagKit.xcassets to your target.

Carthage

Add FlagKit to your Cartfile:

github "madebybowtie/FlagKit"

Cocoapods

Add FlagKit to your Podfile:

pod 'FlagKit'

Usage (iOS/OSX)

For OSX, just replace UIImage with NSImage below

Get an icon for your locale or a world flag:

UIImage(flagImageWithCountryCode: NSLocale.autoupdatingCurrentLocale().objectForKey(NSLocaleCountryCode) as! String)
UIImage(flagImageForSpecialFlag: .World)
[UIImage flagImageWithCountryCode:[[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleCountryCode]];

If you are just adding FlagKit.xcassets to you target, you can simply use the standard UIImage/NSImage methods:

UIImage(named: NSLocale.autoupdatingCurrentLocale().objectForKey(NSLocaleCountryCode) as! String)
[UIImage imageNamed:[[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleCountryCode]];

Sketch

To be able to open the Sketch-file make sure you're running the latest version or the beta version Sketch Beta.

More Info

Have a question? Please open an issue!

Reference

This set currently includes the 206 flags below:

Flag Code Region
AD EU European Union
AE WW World
CNA CNA North America
CSA CSA South America
CEU CEU Europe
CAF CAF Africa
CAS CAS Asia
COC COC Oceania
Flag Code Country
AD AD Andorra
AE AE United Arab Emirates
AF AF Afghanistan
AG AG Antigua & Barbuda
AI AI Anguilla
AL AL Albania
AM AM Armenia
AO AO Angola
AR AR Argentina
AT AT Austria
AU AU Australia
AX AX Åland Islands
AZ AZ Azerbaijan
BA BA Bosnia & Herzegovina
BB BB Barbados
BD BD Bangladesh
BE BE Belgium
BF BF Burkina Faso
BG BG Bulgaria
BH BH Bahrain
BI BI Burundi
BJ BJ Benin
BM BM Bermuda
BN BN Brunei
BO BO Bolivia
BR BR Brazil
BS BS Bahamas
BT BT Bhutan
BW BW Botswana
BY BY Belarus
BZ BZ Belize
CA CA Canada
CD CD Congo - Kinshasa
CF CF Central African Republic
CG CG Congo - Brazzaville
CH CH Switzerland
CH2 CH2 Switzerland
CI CI Côte d’Ivoire
CL CL Chile
CM CM Cameroon
CN CN China
CO CO Colombia
CR CR Costa Rica
CU CU Cuba
CV CV Cape Verde
CY CY Cyprus
CZ CZ Czech Republic
DE DE Germany
DJ DJ Djibouti
DK DK Denmark
DM DM Dominica
DO DO Dominican Republic
DZ DZ Algeria
EC EC Ecuador
EE EE Estonia
EG EG Egypt
ER ER Eritrea
ES ES Spain
ET ET Ethiopia
FI FI Finland
FJ FJ Fiji
FM FM Micronesia
FR FR France
GA GA Gabon
GB GB United Kingdom
GD GD Grenada
GE GE Georgia
GH GH Ghana
GM GM Gambia
GN GN Guinea
GQ GQ Equatorial Guinea
GR GR Greece
GT GT Guatemala
GW GW Guinea-Bissau
GY GY Guyana
HK HK Hong Kong SAR China
HN HN Honduras
HR HR Croatia
HT HT Haiti
HU HU Hungary
ID ID Indonesia
IE IE Ireland
IL IL Israel
IN IN India
IQ IQ Iraq
IR IR Iran
IS IS Iceland
IT IT Italy
JM JM Jamaica
JO JO Jordan
JP JP Japan
KE KE Kenya
KG KG Kyrgyzstan
KH KH Cambodia
KM KM Comoros
KN KN St. Kitts & Nevis
KP KP North Korea
KR KR South Korea
KW KW Kuwait
KY KY Cayman Islands
KZ KZ Kazakhstan
LA LA Laos
LB LB Lebanon
LC LC St. Lucia
LI LI Liechtenstein
LK LK Sri Lanka
LR LR Liberia
LS LS Lesotho
LT LT Lithuania
LU LU Luxembourg
LV LV Latvia
LY LY Libya
MA MA Morocco
MC MC Monaco
MD MD Moldova
ME ME Montenegro
MG MG Madagascar
MK MK Macedonia
ML ML Mali
MM MM Myanmar (Burma)
MN MN Mongolia
MO MO Macau SAR China
MR MR Mauritania
MS MS Montserrat
MT MT Malta
MU MU Mauritius
MV MV Maldives
MW MW Malawi
MX MX Mexico
MY MY Malaysia
MZ MZ Mozambique
NA NA Namibia
NE NE Niger
NG NG Nigeria
NI NI Nicaragua
NL NL Netherlands
NO NO Norway
NP NP Nepal
NZ NZ New Zealand
OM OM Oman
PA PA Panama
PE PE Peru
PG PG Papua New Guinea
PH PH Philippines
PK PK Pakistan
PL PL Poland
PR PR Puerto Rico
PT PT Portugal
PW PW Palau
PY PY Paraguay
QA QA Qatar
RO RO Romania
RS RS Serbia
RU RU Russia
RW RW Rwanda
SA SA Saudi Arabia
SB SB Solomon Islands
SC SC Seychelles
SD SD Sudan
SE SE Sweden
SG SG Singapore
SI SI Slovenia
SK SK Slovakia
SL SL Sierra Leone
SM SM San Marino
SN SN Senegal
SO SO Somalia
SR SR Suriname
ST ST São Tomé & Príncipe
SV SV El Salvador
SY SY Syria
SZ SZ Swaziland
TC TC Turks & Caicos Islands
TD TD Chad
TG TG Togo
TH TH Thailand
TJ TJ Tajikistan
TL TL Timor-Leste
TM TM Turkmenistan
TN TN Tunisia
TO TO Tonga
TR TR Turkey
TT TT Trinidad & Tobago
TW TW Taiwan
TZ TZ Tanzania
UA UA Ukraine
UG UG Uganda
US US United States
UY UY Uruguay
UZ UZ Uzbekistan
VC VC St. Vincent & Grenadines
VE VE Venezuela
VG VG British Virgin Islands
VN VN Vietnam
WS WS Samoa
YE YE Yemen
ZA ZA South Africa
ZW ZW Zimbabwe

License

FlagKit is released under the MIT license. See LICENSE.

flagkit's People

Contributors

blommegard avatar gellermark avatar mosheberman avatar yageek avatar

Watchers

Chew Chit Siang avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.