16 Commits

Author SHA1 Message Date
Simon Blommegård 151eea4bfb Adding Cocoapods support. 2015-10-21 16:34:31 +02:00
Simon Blommegård 08fb58b597 Adding note on Cocoapods 2015-10-21 16:21:05 +02:00
Simon Blommegård 4a30475939 Adding notes for OSX. 2015-10-21 15:50:26 +02:00
Simon Blommegård 2900b04c39 Grab image from the asset catalog on OSX. 2015-10-21 15:31:50 +02:00
Simon Blommegård f760ba493b Merge pull request #16 from madebybowtie/yageek-feature/ns-image
Support for OSX frameworks.
2015-10-21 14:39:36 +02:00
Simon Blommegård 2f69353f68 Support for OSX frameworks. 2015-10-21 14:26:04 +02:00
Yannick Heinrich f8b97a0ee5 Support for NSImage
Create two separated frameworks
Add extension to NSImage

To preserve the API, I needed to use kind of new initialisers (declared
in Objective-C). I don’t know if it is the correct way to perform it.

Any suggestion is welcomed
2015-10-21 11:29:47 +02:00
Simon Blommegård bddd3074d9 Merge pull request #14 from MosheBerman/master
Fixed a typo in "currently" (was "currentry")
2015-10-20 10:48:58 +02:00
Moshe 243b4d0cef Fixed a typo in "currently" (was "currentry") 2015-10-19 13:34:32 -04:00
Simon Blommegård 5adeaf2c72 Update README.md 2015-10-14 10:01:54 +02:00
Simon Blommegård 75a89d9931 Update README.md 2015-10-14 09:30:04 +02:00
Simon Blommegård dcda2bdacc Update README.md 2015-10-14 09:29:22 +02:00
marcusgellermark 8fc7f748a7 New flag added
Added Sri Lanka (LK)
2015-10-12 10:12:27 +02:00
Simon Blommegård 529a5fac86 Update README.md 2015-10-09 08:57:07 +02:00
Simon Blommegård 6e03f0eac1 Update README.md 2015-10-09 08:56:07 +02:00
marcusgellermark 91ca533b08 Two new Flags
Nepal and Hong Kong
2015-10-08 16:55:30 +02:00
33 changed files with 808 additions and 105 deletions
+22
View File
@@ -0,0 +1,22 @@
//
// UIImage+FlagKit.swift
// FlagKit
//
// Created by Simon Blommegård on 22/09/15.
// Copyright © 2015 Bowtie. All rights reserved.
//
import Foundation
public class FlagKit {
public enum SpecialFlag: String {
case World = "WW"
case EuropeanUnion = "EU"
}
public class var assetBundle: NSBundle {
get {
return NSBundle(forClass: FlagKit.self)
}
}
}
@@ -0,0 +1,299 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
F46199081BD7B576001260A9 /* FlagKit.h in Headers */ = {isa = PBXBuildFile; fileRef = F46199071BD7B576001260A9 /* FlagKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
F46199101BD7B735001260A9 /* FlagKit.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F461990F1BD7B735001260A9 /* FlagKit.xcassets */; settings = {ASSET_TAGS = (); }; };
F46199161BD7B754001260A9 /* NSImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = F46199151BD7B754001260A9 /* NSImage.swift */; settings = {ASSET_TAGS = (); }; };
F46199181BD7B75A001260A9 /* FlagKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = F46199171BD7B75A001260A9 /* FlagKit.swift */; settings = {ASSET_TAGS = (); }; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
F46199041BD7B576001260A9 /* FlagKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FlagKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F46199071BD7B576001260A9 /* FlagKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FlagKit.h; sourceTree = "<group>"; };
F46199091BD7B576001260A9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F461990F1BD7B735001260A9 /* FlagKit.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = FlagKit.xcassets; path = ../../FlagKit.xcassets; sourceTree = "<group>"; };
F46199151BD7B754001260A9 /* NSImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSImage.swift; sourceTree = "<group>"; };
F46199171BD7B75A001260A9 /* FlagKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FlagKit.swift; path = "../../FlagKit-Common/FlagKit.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
F46199001BD7B576001260A9 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
F46198FA1BD7B576001260A9 = {
isa = PBXGroup;
children = (
F46199061BD7B576001260A9 /* FlagKit */,
F46199051BD7B576001260A9 /* Products */,
);
sourceTree = "<group>";
};
F46199051BD7B576001260A9 /* Products */ = {
isa = PBXGroup;
children = (
F46199041BD7B576001260A9 /* FlagKit.framework */,
);
name = Products;
sourceTree = "<group>";
};
F46199061BD7B576001260A9 /* FlagKit */ = {
isa = PBXGroup;
children = (
F46199171BD7B75A001260A9 /* FlagKit.swift */,
F46199151BD7B754001260A9 /* NSImage.swift */,
F461990F1BD7B735001260A9 /* FlagKit.xcassets */,
F46199071BD7B576001260A9 /* FlagKit.h */,
F46199091BD7B576001260A9 /* Info.plist */,
);
path = FlagKit;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
F46199011BD7B576001260A9 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
F46199081BD7B576001260A9 /* FlagKit.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
F46199031BD7B576001260A9 /* FlagKit */ = {
isa = PBXNativeTarget;
buildConfigurationList = F461990C1BD7B576001260A9 /* Build configuration list for PBXNativeTarget "FlagKit" */;
buildPhases = (
F46198FF1BD7B576001260A9 /* Sources */,
F46199001BD7B576001260A9 /* Frameworks */,
F46199011BD7B576001260A9 /* Headers */,
F46199021BD7B576001260A9 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = FlagKit;
productName = FlagKit;
productReference = F46199041BD7B576001260A9 /* FlagKit.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
F46198FB1BD7B576001260A9 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
ORGANIZATIONNAME = Bowtie;
TargetAttributes = {
F46199031BD7B576001260A9 = {
CreatedOnToolsVersion = 7.0;
};
};
};
buildConfigurationList = F46198FE1BD7B576001260A9 /* Build configuration list for PBXProject "FlagKit-OSX" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = F46198FA1BD7B576001260A9;
productRefGroup = F46199051BD7B576001260A9 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
F46199031BD7B576001260A9 /* FlagKit */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
F46199021BD7B576001260A9 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F46199101BD7B735001260A9 /* FlagKit.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
F46198FF1BD7B576001260A9 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F46199181BD7B75A001260A9 /* FlagKit.swift in Sources */,
F46199161BD7B754001260A9 /* NSImage.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
F461990A1BD7B576001260A9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
F461990B1BD7B576001260A9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
F461990D1BD7B576001260A9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = FlagKit/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.madebybowtie.FlagKit-OSX";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
F461990E1BD7B576001260A9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = FlagKit/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.madebybowtie.FlagKit-OSX";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
F46198FE1BD7B576001260A9 /* Build configuration list for PBXProject "FlagKit-OSX" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F461990A1BD7B576001260A9 /* Debug */,
F461990B1BD7B576001260A9 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F461990C1BD7B576001260A9 /* Build configuration list for PBXNativeTarget "FlagKit" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F461990D1BD7B576001260A9 /* Debug */,
F461990E1BD7B576001260A9 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = F46198FB1BD7B576001260A9 /* Project object */;
}
@@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F4CEA2551BB1233300CFBC87"
BlueprintIdentifier = "F46199031BD7B576001260A9"
BuildableName = "FlagKit.framework"
BlueprintName = "FlagKit"
ReferencedContainer = "container:FlagKit.xcodeproj">
ReferencedContainer = "container:FlagKit-OSX.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@@ -45,10 +45,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F4CEA2551BB1233300CFBC87"
BlueprintIdentifier = "F46199031BD7B576001260A9"
BuildableName = "FlagKit.framework"
BlueprintName = "FlagKit"
ReferencedContainer = "container:FlagKit.xcodeproj">
ReferencedContainer = "container:FlagKit-OSX.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
@@ -63,10 +63,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F4CEA2551BB1233300CFBC87"
BlueprintIdentifier = "F46199031BD7B576001260A9"
BuildableName = "FlagKit.framework"
BlueprintName = "FlagKit"
ReferencedContainer = "container:FlagKit.xcodeproj">
ReferencedContainer = "container:FlagKit-OSX.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
+19
View File
@@ -0,0 +1,19 @@
//
// FlagKit.h
// FlagKit
//
// Created by Simon Blommegård on 21/10/15.
// Copyright © 2015 Bowtie. All rights reserved.
//
#import <Cocoa/Cocoa.h>
//! Project version number for FlagKit.
FOUNDATION_EXPORT double FlagKitVersionNumber;
//! Project version string for FlagKit.
FOUNDATION_EXPORT const unsigned char FlagKitVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <FlagKit/PublicHeader.h>
+28
View File
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Bowtie. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
+22
View File
@@ -0,0 +1,22 @@
//
// NSImage.swift
// FlagKit
//
// Created by Simon Blommegård on 21/10/15.
// Copyright © 2015 Bowtie. All rights reserved.
//
import Cocoa
public extension NSImage {
public convenience init?(flagImageWithCountryCode countryCode: String) {
guard let image = FlagKit.assetBundle.imageForResource(countryCode) else {return nil}
guard let CGImage = image.CGImageForProposedRect(nil, context: nil, hints: nil) else {return nil}
self.init(CGImage:CGImage, size:image.size)
}
public convenience init?(flagImageForSpecialFlag specialFlag: FlagKit.SpecialFlag) {
self.init(flagImageWithCountryCode:specialFlag.rawValue)
}
}
@@ -7,21 +7,23 @@
objects = {
/* Begin PBXBuildFile section */
F4CEA25A1BB1233300CFBC87 /* FlagKit.h in Headers */ = {isa = PBXBuildFile; fileRef = F4CEA2591BB1233300CFBC87 /* FlagKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
F4DC1CA31BB124910052A411 /* FlagKit.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4DC1CA21BB124910052A411 /* FlagKit.xcassets */; settings = {ASSET_TAGS = (); }; };
F4DC1CA51BB1252C0052A411 /* FlagKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4DC1CA41BB1252C0052A411 /* FlagKit.swift */; settings = {ASSET_TAGS = (); }; };
F46198F31BD7B50D001260A9 /* FlagKit.h in Headers */ = {isa = PBXBuildFile; fileRef = F46198F21BD7B50D001260A9 /* FlagKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
F46199121BD7B73C001260A9 /* FlagKit.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F46199111BD7B73C001260A9 /* FlagKit.xcassets */; settings = {ASSET_TAGS = (); }; };
F46199141BD7B74B001260A9 /* UIImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = F46199131BD7B74B001260A9 /* UIImage.swift */; settings = {ASSET_TAGS = (); }; };
F461991A1BD7B75F001260A9 /* FlagKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = F46199191BD7B75F001260A9 /* FlagKit.swift */; settings = {ASSET_TAGS = (); }; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
F4CEA2561BB1233300CFBC87 /* FlagKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FlagKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F4CEA2591BB1233300CFBC87 /* FlagKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FlagKit.h; sourceTree = "<group>"; };
F4CEA25B1BB1233300CFBC87 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F4DC1CA21BB124910052A411 /* FlagKit.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = FlagKit.xcassets; sourceTree = SOURCE_ROOT; };
F4DC1CA41BB1252C0052A411 /* FlagKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlagKit.swift; sourceTree = "<group>"; };
F46198EF1BD7B50D001260A9 /* FlagKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FlagKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F46198F21BD7B50D001260A9 /* FlagKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FlagKit.h; sourceTree = "<group>"; };
F46198F41BD7B50D001260A9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F46199111BD7B73C001260A9 /* FlagKit.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = FlagKit.xcassets; path = ../../FlagKit.xcassets; sourceTree = "<group>"; };
F46199131BD7B74B001260A9 /* UIImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImage.swift; sourceTree = "<group>"; };
F46199191BD7B75F001260A9 /* FlagKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FlagKit.swift; path = "../../FlagKit-Common/FlagKit.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
F4CEA2521BB1233300CFBC87 /* Frameworks */ = {
F46198EB1BD7B50D001260A9 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -31,29 +33,30 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
F4CEA24C1BB1233300CFBC87 = {
F46198E51BD7B50D001260A9 = {
isa = PBXGroup;
children = (
F4CEA2581BB1233300CFBC87 /* FlagKit */,
F4CEA2571BB1233300CFBC87 /* Products */,
F46198F11BD7B50D001260A9 /* FlagKit */,
F46198F01BD7B50D001260A9 /* Products */,
);
sourceTree = "<group>";
};
F4CEA2571BB1233300CFBC87 /* Products */ = {
F46198F01BD7B50D001260A9 /* Products */ = {
isa = PBXGroup;
children = (
F4CEA2561BB1233300CFBC87 /* FlagKit.framework */,
F46198EF1BD7B50D001260A9 /* FlagKit.framework */,
);
name = Products;
sourceTree = "<group>";
};
F4CEA2581BB1233300CFBC87 /* FlagKit */ = {
F46198F11BD7B50D001260A9 /* FlagKit */ = {
isa = PBXGroup;
children = (
F4DC1CA21BB124910052A411 /* FlagKit.xcassets */,
F4CEA2591BB1233300CFBC87 /* FlagKit.h */,
F4CEA25B1BB1233300CFBC87 /* Info.plist */,
F4DC1CA41BB1252C0052A411 /* FlagKit.swift */,
F46199191BD7B75F001260A9 /* FlagKit.swift */,
F46199131BD7B74B001260A9 /* UIImage.swift */,
F46199111BD7B73C001260A9 /* FlagKit.xcassets */,
F46198F21BD7B50D001260A9 /* FlagKit.h */,
F46198F41BD7B50D001260A9 /* Info.plist */,
);
path = FlagKit;
sourceTree = "<group>";
@@ -61,25 +64,25 @@
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
F4CEA2531BB1233300CFBC87 /* Headers */ = {
F46198EC1BD7B50D001260A9 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
F4CEA25A1BB1233300CFBC87 /* FlagKit.h in Headers */,
F46198F31BD7B50D001260A9 /* FlagKit.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
F4CEA2551BB1233300CFBC87 /* FlagKit */ = {
F46198EE1BD7B50D001260A9 /* FlagKit */ = {
isa = PBXNativeTarget;
buildConfigurationList = F4CEA25E1BB1233300CFBC87 /* Build configuration list for PBXNativeTarget "FlagKit" */;
buildConfigurationList = F46198F71BD7B50D001260A9 /* Build configuration list for PBXNativeTarget "FlagKit" */;
buildPhases = (
F4CEA2511BB1233300CFBC87 /* Sources */,
F4CEA2521BB1233300CFBC87 /* Frameworks */,
F4CEA2531BB1233300CFBC87 /* Headers */,
F4CEA2541BB1233300CFBC87 /* Resources */,
F46198EA1BD7B50D001260A9 /* Sources */,
F46198EB1BD7B50D001260A9 /* Frameworks */,
F46198EC1BD7B50D001260A9 /* Headers */,
F46198ED1BD7B50D001260A9 /* Resources */,
);
buildRules = (
);
@@ -87,65 +90,66 @@
);
name = FlagKit;
productName = FlagKit;
productReference = F4CEA2561BB1233300CFBC87 /* FlagKit.framework */;
productReference = F46198EF1BD7B50D001260A9 /* FlagKit.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
F4CEA24D1BB1233300CFBC87 /* Project object */ = {
F46198E61BD7B50D001260A9 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
ORGANIZATIONNAME = Bowtie;
TargetAttributes = {
F4CEA2551BB1233300CFBC87 = {
F46198EE1BD7B50D001260A9 = {
CreatedOnToolsVersion = 7.0;
};
};
};
buildConfigurationList = F4CEA2501BB1233300CFBC87 /* Build configuration list for PBXProject "FlagKit" */;
buildConfigurationList = F46198E91BD7B50D001260A9 /* Build configuration list for PBXProject "FlagKit-iOS" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = F4CEA24C1BB1233300CFBC87;
productRefGroup = F4CEA2571BB1233300CFBC87 /* Products */;
mainGroup = F46198E51BD7B50D001260A9;
productRefGroup = F46198F01BD7B50D001260A9 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
F4CEA2551BB1233300CFBC87 /* FlagKit */,
F46198EE1BD7B50D001260A9 /* FlagKit */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
F4CEA2541BB1233300CFBC87 /* Resources */ = {
F46198ED1BD7B50D001260A9 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F4DC1CA31BB124910052A411 /* FlagKit.xcassets in Resources */,
F46199121BD7B73C001260A9 /* FlagKit.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
F4CEA2511BB1233300CFBC87 /* Sources */ = {
F46198EA1BD7B50D001260A9 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F4DC1CA51BB1252C0052A411 /* FlagKit.swift in Sources */,
F461991A1BD7B75F001260A9 /* FlagKit.swift in Sources */,
F46199141BD7B74B001260A9 /* UIImage.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
F4CEA25C1BB1233300CFBC87 /* Debug */ = {
F46198F51BD7B50D001260A9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -193,7 +197,7 @@
};
name = Debug;
};
F4CEA25D1BB1233300CFBC87 /* Release */ = {
F46198F61BD7B50D001260A9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -234,7 +238,7 @@
};
name = Release;
};
F4CEA25F1BB1233300CFBC87 /* Debug */ = {
F46198F81BD7B50D001260A9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
@@ -252,7 +256,7 @@
};
name = Debug;
};
F4CEA2601BB1233300CFBC87 /* Release */ = {
F46198F91BD7B50D001260A9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
@@ -272,25 +276,25 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
F4CEA2501BB1233300CFBC87 /* Build configuration list for PBXProject "FlagKit" */ = {
F46198E91BD7B50D001260A9 /* Build configuration list for PBXProject "FlagKit-iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F4CEA25C1BB1233300CFBC87 /* Debug */,
F4CEA25D1BB1233300CFBC87 /* Release */,
F46198F51BD7B50D001260A9 /* Debug */,
F46198F61BD7B50D001260A9 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F4CEA25E1BB1233300CFBC87 /* Build configuration list for PBXNativeTarget "FlagKit" */ = {
F46198F71BD7B50D001260A9 /* Build configuration list for PBXNativeTarget "FlagKit" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F4CEA25F1BB1233300CFBC87 /* Debug */,
F4CEA2601BB1233300CFBC87 /* Release */,
F46198F81BD7B50D001260A9 /* Debug */,
F46198F91BD7B50D001260A9 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = F4CEA24D1BB1233300CFBC87 /* Project object */;
rootObject = F46198E61BD7B50D001260A9 /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:FlagKit.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F46198EE1BD7B50D001260A9"
BuildableName = "FlagKit.framework"
BlueprintName = "FlagKit"
ReferencedContainer = "container:FlagKit-iOS.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F46198EE1BD7B50D001260A9"
BuildableName = "FlagKit.framework"
BlueprintName = "FlagKit"
ReferencedContainer = "container:FlagKit-iOS.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F46198EE1BD7B50D001260A9"
BuildableName = "FlagKit.framework"
BlueprintName = "FlagKit"
ReferencedContainer = "container:FlagKit-iOS.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -2,7 +2,7 @@
// FlagKit.h
// FlagKit
//
// Created by Simon Blommegård on 22/09/15.
// Created by Simon Blommegård on 21/10/15.
// Copyright © 2015 Bowtie. All rights reserved.
//
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.0.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
+20
View File
@@ -0,0 +1,20 @@
//
// UIImage.swift
// FlagKit
//
// Created by Simon Blommegård on 21/10/15.
// Copyright © 2015 Bowtie. All rights reserved.
//
import UIKit
public extension UIImage {
public convenience init?(flagImageWithCountryCode countryCode: String) {
self.init(named:countryCode, inBundle:FlagKit.assetBundle, compatibleWithTraitCollection:nil)
}
public convenience init?(flagImageForSpecialFlag specialFlag: FlagKit.SpecialFlag) {
self.init(flagImageWithCountryCode:specialFlag.rawValue)
}
}
+140
View File
@@ -0,0 +1,140 @@
#
# Be sure to run `pod spec lint FlagKit.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#
s.name = "FlagKit"
s.version = "1.0.4"
s.summary = "Beautiful flag icons for usage in apps and on the web."
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
Beautiful flag icons for usage in your apps.
Includes the vast majority of country flags out there and some special ones (World, EU).
DESC
s.homepage = "https://github.com/madebybowtie/FlagKit"
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#
#s.license = "MIT (example)"
s.license = { :type => "MIT", :file => "LICENSE" }
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
# accepts just a name if you'd rather not provide an email address.
#
# Specify a social_media_url where others can refer to, for example a twitter
# profile URL.
#
s.author = { "Bowtie" => "howdy@madebybowtie.com" }
# Or just: s.author = "Simon Blommegård"
# s.authors = { "Simon Blommegård" => "simon@blommegard.se" }
# s.social_media_url = "http://twitter.com/Simon Blommegård"
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#
# s.platform = :ios
# s.platform = :ios, "5.0"
# When using multiple platforms
s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.10"
# s.watchos.deployment_target = "2.0"
# s.tvos.deployment_target = "9.0"
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#
s.source = { :git => "https://github.com/madebybowtie/FlagKit.git", :tag => "v1.0.4" }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any swift, h, m, mm, c & cpp files.
# For header files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#
s.ios.source_files = "FlagKit-Common", "FlagKit-iOS/FlagKit/"
s.osx.source_files = "FlagKit-Common", "FlagKit-OSX/FlagKit/"
#s.exclude_files = "Classes/Exclude"
# s.public_header_files = "Classes/**/*.h"
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#
s.resource = "FlagKit.xcassets"
#s.resources = "Resources/*.png"
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#
# s.framework = "SomeFramework"
# s.frameworks = "SomeFramework", "AnotherFramework"
# s.library = "iconv"
# s.libraries = "iconv", "xml2"
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.
# s.requires_arc = true
# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
# s.dependency "JSONKit", "~> 1.4"
end
+22
View File
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "HK@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "HK@3x.png"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

+22
View File
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "LK@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "LK@3x.png"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

+22
View File
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "NP@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "NP@3x.png"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:FlagKit-OSX/FlagKit-OSX.xcodeproj">
</FileRef>
<FileRef
location = "group:FlagKit-iOS/FlagKit-iOS.xcodeproj">
</FileRef>
</Workspace>
-26
View File
@@ -1,26 +0,0 @@
//
// UIImage+FlagKit.swift
// FlagKit
//
// Created by Simon Blommegård on 22/09/15.
// Copyright © 2015 Bowtie. All rights reserved.
//
import UIKit
public class FlagKit {}
public extension UIImage {
public enum SpecialFlag: String {
case World = "WW"
case EuropeanUnion = "EU"
}
public convenience init?(flagImageWithCountryCode countryCode: String) {
self.init(named:countryCode, inBundle:NSBundle(forClass: FlagKit.self), compatibleWithTraitCollection:nil)
}
public convenience init?(flagImageForSpecialFlag specialFlag: SpecialFlag) {
self.init(flagImageWithCountryCode:specialFlag.rawValue)
}
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

+34 -22
View File
@@ -2,45 +2,49 @@
Beautiful flag icons for usage in apps and on the web.
## iOS
### Without dependency management
1. Add ```FlagKit.xcassets``` to your target.
2. Get an icon for your locale:
## 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:
```swift
UIImage(flagImageWithCountryCode: NSLocale.autoupdatingCurrentLocale().objectForKey(NSLocaleCountryCode) as! String)
UIImage(flagImageForSpecial: .World)
```
```objc
[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:
```swift
UIImage(named: NSLocale.autoupdatingCurrentLocale().objectForKey(NSLocaleCountryCode) as! String)
```
```objc
[UIImage imageNamed:[[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleCountryCode]];
```
### [Carthage](https://github.com/Carthage/Carthage)
1. Add FlagKit to your `Cartfile`:
```
github "madebybowtie/FlagKit"
```
2. Get an icon for your locale:
```swift
UIImage(flagImageWithCountryCode: NSLocale.autoupdatingCurrentLocale().objectForKey(NSLocaleCountryCode) as! String)
```
```objc
[UIImage flagImageWithCountryCode:[[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleCountryCode]];
```
## Sketch
To be able to open the Sketch-file, please use the [Sketch Beta](http://www.bohemiancoding.com/sketch/beta/).
## License
FlagKit is released under the MIT license. See
[LICENSE](https://github.com/madebybowtie/FlagKit/blob/master/LICENSE).
## More Info
Have a question? Please [open an issue](https://github.com/madebybowtie/FlagKit/issues/new)!
## Reference
This set currentry includes the 181 flags below:
This set currently includes the 184 flags below:
| Flag | Code | Region |
| :-------------: | :-------------: | ------------- |
@@ -120,6 +124,7 @@ This set currentry includes the 181 flags below:
| ![GR](https://github.com/madebybowtie/FlagKit/blob/master/Images/GR@2x.png) | GR | Greece |
| ![GT](https://github.com/madebybowtie/FlagKit/blob/master/Images/GT@2x.png) | GT | Guatemala |
| ![GW](https://github.com/madebybowtie/FlagKit/blob/master/Images/GW@2x.png) | GW | Guinea-Bissau |
| ![HN](https://github.com/madebybowtie/FlagKit/blob/master/Images/HK@2x.png) | HK | Hong Kong |
| ![HN](https://github.com/madebybowtie/FlagKit/blob/master/Images/HN@2x.png) | HN | Honduras |
| ![HR](https://github.com/madebybowtie/FlagKit/blob/master/Images/HR@2x.png) | HR | Croatia |
| ![HT](https://github.com/madebybowtie/FlagKit/blob/master/Images/HT@2x.png) | HT | Haiti |
@@ -148,6 +153,7 @@ This set currentry includes the 181 flags below:
| ![LB](https://github.com/madebybowtie/FlagKit/blob/master/Images/LB@2x.png) | LB | Lebanon |
| ![LC](https://github.com/madebybowtie/FlagKit/blob/master/Images/LC@2x.png) | LC | Saint Lucia |
| ![LI](https://github.com/madebybowtie/FlagKit/blob/master/Images/LI@2x.png) | LI | Liechtenstein |
| ![LI](https://github.com/madebybowtie/FlagKit/blob/master/Images/LK@2x.png) | LK | Sri Lanka |
| ![LR](https://github.com/madebybowtie/FlagKit/blob/master/Images/LR@2x.png) | LR | Liberia |
| ![LS](https://github.com/madebybowtie/FlagKit/blob/master/Images/LS@2x.png) | LS | Lesotho |
| ![LT](https://github.com/madebybowtie/FlagKit/blob/master/Images/LT@2x.png) | LT | Lithuania |
@@ -177,6 +183,7 @@ This set currentry includes the 181 flags below:
| ![NI](https://github.com/madebybowtie/FlagKit/blob/master/Images/NI@2x.png) | NI | Nicaragua |
| ![NL](https://github.com/madebybowtie/FlagKit/blob/master/Images/NL@2x.png) | NL | Netherlands |
| ![NO](https://github.com/madebybowtie/FlagKit/blob/master/Images/NO@2x.png) | NO | Norway |
| ![NO](https://github.com/madebybowtie/FlagKit/blob/master/Images/NP@2x.png) | NP | Nepal |
| ![NZ](https://github.com/madebybowtie/FlagKit/blob/master/Images/NZ@2x.png) | NZ | New Zealand |
| ![OM](https://github.com/madebybowtie/FlagKit/blob/master/Images/OM@2x.png) | OM | Oman |
| ![PA](https://github.com/madebybowtie/FlagKit/blob/master/Images/PA@2x.png) | PA | Panama |
@@ -229,3 +236,8 @@ This set currentry includes the 181 flags below:
| ![WS](https://github.com/madebybowtie/FlagKit/blob/master/Images/WS@2x.png) | WS | Samoa |
| ![YE](https://github.com/madebybowtie/FlagKit/blob/master/Images/YE@2x.png) | YE | Yemen |
| ![ZA](https://github.com/madebybowtie/FlagKit/blob/master/Images/ZA@2x.png) | ZA | South Africa |
## License
FlagKit is released under the MIT license. See
[LICENSE](https://github.com/madebybowtie/FlagKit/blob/master/LICENSE).
Binary file not shown.