Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 151eea4bfb | |||
| 08fb58b597 | |||
| 4a30475939 | |||
| 2900b04c39 | |||
| f760ba493b | |||
| 2f69353f68 | |||
| f8b97a0ee5 | |||
| bddd3074d9 | |||
| 243b4d0cef | |||
| 5adeaf2c72 | |||
| 75a89d9931 | |||
| dcda2bdacc | |||
| 8fc7f748a7 | |||
| 529a5fac86 | |||
| 6e03f0eac1 | |||
| 91ca533b08 |
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
@@ -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"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
@@ -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"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
@@ -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>
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
@@ -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 | Greece |
|
||||
|  | GT | Guatemala |
|
||||
|  | GW | Guinea-Bissau |
|
||||
|  | HK | Hong Kong |
|
||||
|  | HN | Honduras |
|
||||
|  | HR | Croatia |
|
||||
|  | HT | Haiti |
|
||||
@@ -148,6 +153,7 @@ This set currentry includes the 181 flags below:
|
||||
|  | LB | Lebanon |
|
||||
|  | LC | Saint Lucia |
|
||||
|  | LI | Liechtenstein |
|
||||
|  | LK | Sri Lanka |
|
||||
|  | LR | Liberia |
|
||||
|  | LS | Lesotho |
|
||||
|  | LT | Lithuania |
|
||||
@@ -177,6 +183,7 @@ This set currentry includes the 181 flags below:
|
||||
|  | NI | Nicaragua |
|
||||
|  | NL | Netherlands |
|
||||
|  | NO | Norway |
|
||||
|  | NP | Nepal |
|
||||
|  | NZ | New Zealand |
|
||||
|  | OM | Oman |
|
||||
|  | PA | Panama |
|
||||
@@ -229,3 +236,8 @@ This set currentry includes the 181 flags below:
|
||||
|  | WS | Samoa |
|
||||
|  | YE | Yemen |
|
||||
|  | ZA | South Africa |
|
||||
|
||||
## License
|
||||
|
||||
FlagKit is released under the MIT license. See
|
||||
[LICENSE](https://github.com/madebybowtie/FlagKit/blob/master/LICENSE).
|
||||
|
||||