Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fd87cc857a | |||
| 776b5738d6 | |||
| 2960e987b0 | |||
| 4408c2dab3 | |||
| ba7bb956a4 | |||
| eabd1307c8 | |||
| 0daff70461 | |||
| c024e356bf | |||
| e044a46c0e | |||
| 948c02cf92 | |||
| e0073bc421 | |||
| c024a4827c |
@@ -1,10 +1,10 @@
|
||||
language: objective-c
|
||||
osx_image: xcode8.3
|
||||
osx_image: xcode10.2
|
||||
|
||||
env:
|
||||
- "DESTINATION='platform=iOS Simulator,name=iPhone 7' ACTION=test"
|
||||
- "DESTINATION='platform=OS X' ACTION=test"
|
||||
- "DESTINATION='platform=tvOS Simulator,name=Apple TV 1080p' ACTION=test"
|
||||
- "DESTINATION='OS=12.2,platform=iOS Simulator,name=iPhone 8' ACTION=test"
|
||||
- "DESTINATION='platform=macOS' ACTION=test"
|
||||
- "DESTINATION='OS=12.2,platform=tvOS Simulator,name=Apple TV' ACTION=test"
|
||||
|
||||
script:
|
||||
- set -o pipefail && xcodebuild -project Sources/Swift/FlagKit.xcodeproj -scheme FlagKit -destination "$DESTINATION" $ACTION | xcpretty
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "MF.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "MF@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "MF@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 424 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "SH.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "SH@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "SH@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 743 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
@@ -1,5 +1,5 @@
|
||||
# Flags
|
||||
This set currently includes the 253 flags below:
|
||||
This set currently includes the 255 flags below:
|
||||
|
||||
| Flag | Code | Region |
|
||||
| :-------------: | :-------------: | ------------- |
|
||||
@@ -147,6 +147,7 @@ This set currently includes the 253 flags below:
|
||||
| <img src='PNG/MC@2x.png?raw=true' width='21' height='15'> | MC | Monaco
|
||||
| <img src='PNG/MD@2x.png?raw=true' width='21' height='15'> | MD | Moldova
|
||||
| <img src='PNG/ME@2x.png?raw=true' width='21' height='15'> | ME | Montenegro
|
||||
| <img src='PNG/MF@2x.png?raw=true' width='21' height='15'> | MF | St. Martin
|
||||
| <img src='PNG/MG@2x.png?raw=true' width='21' height='15'> | MG | Madagascar
|
||||
| <img src='PNG/MH@2x.png?raw=true' width='21' height='15'> | MH | Marshall Islands
|
||||
| <img src='PNG/MK@2x.png?raw=true' width='21' height='15'> | MK | Macedonia
|
||||
@@ -204,6 +205,7 @@ This set currently includes the 253 flags below:
|
||||
| <img src='PNG/SD@2x.png?raw=true' width='21' height='15'> | SD | Sudan
|
||||
| <img src='PNG/SE@2x.png?raw=true' width='21' height='15'> | SE | Sweden
|
||||
| <img src='PNG/SG@2x.png?raw=true' width='21' height='15'> | SG | Singapore
|
||||
| <img src='PNG/SH@2x.png?raw=true' width='21' height='15'> | SH | St. Helena
|
||||
| <img src='PNG/SI@2x.png?raw=true' width='21' height='15'> | SI | Slovenia
|
||||
| <img src='PNG/SJ@2x.png?raw=true' width='21' height='15'> | SJ | Svalbard & Jan Mayen
|
||||
| <img src='PNG/SK@2x.png?raw=true' width='21' height='15'> | SK | Slovakia
|
||||
|
||||
|
After Width: | Height: | Size: 424 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 743 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="21px" height="15px" viewBox="0 0 21 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: sketchtool 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>MF</title>
|
||||
<desc>Created with sketchtool.</desc>
|
||||
<defs>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
|
||||
<stop stop-color="#FFFFFF" offset="0%"></stop>
|
||||
<stop stop-color="#F0F0F0" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
|
||||
<stop stop-color="#F44653" offset="0%"></stop>
|
||||
<stop stop-color="#EE2A39" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-3">
|
||||
<stop stop-color="#1035BB" offset="0%"></stop>
|
||||
<stop stop-color="#042396" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="MF">
|
||||
<rect id="FlagBackground" fill="url(#linearGradient-1)" x="0" y="0" width="21" height="15"></rect>
|
||||
<rect id="Mask" fill="url(#linearGradient-2)" x="10" y="0" width="11" height="15"></rect>
|
||||
<rect id="Rectangle-2" fill="url(#linearGradient-3)" x="0" y="0" width="7" height="15"></rect>
|
||||
<rect id="Rectangle-2-Copy" fill="url(#linearGradient-1)" x="7" y="0" width="7" height="15"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="21px" height="15px" viewBox="0 0 21 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: sketchtool 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>SH</title>
|
||||
<desc>Created with sketchtool.</desc>
|
||||
<defs>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
|
||||
<stop stop-color="#FFFFFF" offset="0%"></stop>
|
||||
<stop stop-color="#F0F0F0" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
|
||||
<stop stop-color="#07319C" offset="0%"></stop>
|
||||
<stop stop-color="#00247E" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-3">
|
||||
<stop stop-color="#A7D2FF" offset="0%"></stop>
|
||||
<stop stop-color="#91C6FD" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<path d="M0,3.5 L1.54164674e-17,0.509643555 C6.90218757e-18,0.228175192 0.21484375,0 0.497698784,0 L4.50230122,0 C4.77717266,0 5,0.226606369 5,0.509643555 L5,3.5 C5,5.5 2.5,6 2.5,6 C2.5,6 0,5.5 0,3.5 Z" id="path-4"></path>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-6">
|
||||
<stop stop-color="#EE7B2D" offset="0%"></stop>
|
||||
<stop stop-color="#CC621A" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-7">
|
||||
<stop stop-color="#FFFC4B" offset="0%"></stop>
|
||||
<stop stop-color="#FFFC38" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-8">
|
||||
<stop stop-color="#DB1E36" offset="0%"></stop>
|
||||
<stop stop-color="#D51931" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="SH">
|
||||
<rect id="FlagBackground" fill="url(#linearGradient-1)" x="0" y="0" width="21" height="15"></rect>
|
||||
<rect id="Mask-Copy" fill="url(#linearGradient-2)" x="0" y="0" width="21" height="15"></rect>
|
||||
<g id="Rectangle-1105" transform="translate(13.000000, 6.000000)">
|
||||
<mask id="mask-5" fill="white">
|
||||
<use xlink:href="#path-4"></use>
|
||||
</mask>
|
||||
<use id="Combined-Shape" fill="url(#linearGradient-3)" xlink:href="#path-4"></use>
|
||||
<path d="M0.5,6.5 C1.32842712,6.5 1.5,5.1045695 1.5,4 C1.5,2.8954305 1.32842712,2.5 0.5,2.5 C-0.328427125,2.5 -1,2.8954305 -1,4 C-1,5.1045695 -0.328427125,6.5 0.5,6.5 Z" id="Oval" fill="url(#linearGradient-6)" mask="url(#mask-5)"></path>
|
||||
<ellipse id="Oval-2" fill="#A75113" mask="url(#mask-5)" cx="2.5" cy="4.5" rx="1.5" ry="1"></ellipse>
|
||||
<ellipse id="Oval-2" fill="#FFFFFF" mask="url(#mask-5)" cx="2.5" cy="3.5" rx="1" ry="1"></ellipse>
|
||||
<rect id="Rectangle" fill="url(#linearGradient-7)" mask="url(#mask-5)" x="0" y="0" width="5" height="2"></rect>
|
||||
</g>
|
||||
<path d="M3,3.22996746 L-1.3516287,-0.5 L0.660232527,-0.5 L4.16023253,2 L4.85660189,2 L9.5,-0.902123821 L9.5,0.25 C9.5,0.552509227 9.33308555,0.876533554 9.08215972,1.05576629 L6,3.25730895 L6,3.77003254 L9.13722049,6.45907867 C9.59934261,6.85518335 9.34102897,7.5 8.75,7.5 C8.50478614,7.5 8.2052751,7.40393402 8.00092153,7.25796718 L4.83976747,5 L4.14339811,5 L-0.5,7.90212382 L-0.5,6.24269105 L3,3.74269105 L3,3.22996746 Z" id="Rectangle-36" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
|
||||
<path d="M3.5,3 L-4.4408921e-16,0 L0.5,0 L4,2.5 L5,2.5 L9,0 L9,0.25 C9,0.388071187 8.91348267,0.561798096 8.79154062,0.648899555 L5.5,3 L5.5,4 L8.8118248,6.83870697 C8.91575109,6.92778665 8.8840332,7 8.75,7 L8.75,7 C8.61192881,7 8.41348267,6.9382019 8.29154062,6.85110044 L5,4.5 L4,4.5 L-4.4408921e-16,7 L-4.4408921e-16,6.5 L3.5,4 L3.5,3 Z" id="Rectangle-36" fill="url(#linearGradient-8)"></path>
|
||||
<path d="M-4.4408921e-16,2.5 L-4.4408921e-16,4.5 L3.5,4.5 L3.5,7.00461102 C3.5,7.2782068 3.71403503,7.5 4.00468445,7.5 L4.99531555,7.5 C5.27404508,7.5 5.5,7.2842474 5.5,7.00461102 L5.5,4.5 L9.00952148,4.5 C9.28040529,4.5 9.5,4.28596497 9.5,3.99531555 L9.5,3.00468445 C9.5,2.72595492 9.28494263,2.5 9.00952148,2.5 L5.5,2.5 L5.5,0 L3.5,0 L3.5,2.5 L-4.4408921e-16,2.5 Z" id="Rectangle-2" fill="url(#linearGradient-1)"></path>
|
||||
<polygon id="Rectangle-36" fill="url(#linearGradient-8)" points="-4.4408921e-16 3 4 3 4 2.5 4 0 5 0 5 2.5 5 3 9 3 9 4 5 4 5 4.5 5 7 4 7 4 4.5 4 4 -4.4408921e-16 4"></polygon>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "FlagKit"
|
||||
s.version = "2.0"
|
||||
s.version = "2.2"
|
||||
s.summary = "Beautiful flag icons for usage in apps and on the web."
|
||||
|
||||
s.homepage = "https://github.com/madebybowtie/FlagKit"
|
||||
|
||||
@@ -260,28 +260,29 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0830;
|
||||
LastUpgradeCheck = 0830;
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = Bowtie;
|
||||
TargetAttributes = {
|
||||
3A49DD801F2F63F90007E46E = {
|
||||
CreatedOnToolsVersion = 8.3.2;
|
||||
LastSwiftMigration = 0830;
|
||||
LastSwiftMigration = 1020;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
3A59879C1F306C260097DB64 = {
|
||||
CreatedOnToolsVersion = 8.3.2;
|
||||
LastSwiftMigration = 0830;
|
||||
LastSwiftMigration = 1020;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
3AF78CE01F31CE0400BD3D10 = {
|
||||
CreatedOnToolsVersion = 8.3.2;
|
||||
LastSwiftMigration = 1020;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 3A49DD5E1F2F62D10007E46E /* Build configuration list for PBXProject "FlagKit" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
@@ -393,12 +394,66 @@
|
||||
3A49DD5F1F2F62D10007E46E /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3A49DD601F2F62D10007E46E /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -464,7 +519,7 @@
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
@@ -525,7 +580,7 @@
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
@@ -585,7 +640,7 @@
|
||||
SDKROOT = macosx;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -634,7 +689,7 @@
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -692,7 +747,7 @@
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -742,7 +797,7 @@
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?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>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0830"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -15,18 +15,18 @@ public class Flag: NSObject {
|
||||
/**
|
||||
Country code of the flag
|
||||
*/
|
||||
public let countryCode: String
|
||||
@objc public let countryCode: String
|
||||
|
||||
#if os(iOS) || os(tvOS)
|
||||
/**
|
||||
Original unstyled flag image
|
||||
*/
|
||||
public let originalImage: UIImage
|
||||
@objc public let originalImage: UIImage
|
||||
|
||||
/**
|
||||
Returns a flag if the country code is supported, otherwise it returns nil
|
||||
*/
|
||||
public init?(countryCode: String) {
|
||||
@objc public init?(countryCode: String) {
|
||||
guard let image = UIImage(named: countryCode, in: FlagKit.assetBundle, compatibleWith: nil) else {
|
||||
return nil
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class Flag: NSObject {
|
||||
Returns a styled flag according to the provided style
|
||||
- parameter style: Desired flag style
|
||||
*/
|
||||
public func image(style: FlagStyle) -> UIImage {
|
||||
@objc public func image(style: FlagStyle) -> UIImage {
|
||||
return originalImage.rendereredImage(size: style.size, action: { (context) in
|
||||
switch style {
|
||||
case .none:
|
||||
@@ -60,12 +60,12 @@ public class Flag: NSObject {
|
||||
/**
|
||||
Original unstyled flag image
|
||||
*/
|
||||
public let originalImage: NSImage
|
||||
@objc public let originalImage: NSImage
|
||||
|
||||
/**
|
||||
Returns a flag if the country code is supported, otherwise it returns nil
|
||||
*/
|
||||
public init?(countryCode: String) {
|
||||
@objc public init?(countryCode: String) {
|
||||
guard let image = FlagKit.assetBundle.image(forResource: countryCode) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0</string>
|
||||
<string>2.2</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
@@ -8,7 +8,7 @@ import UIKit
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
window?.tintColor = UIColor(red: 0.02, green: 0.67, blue: 0.73, alpha: 1.0)
|
||||
window?.rootViewController = UINavigationController(rootViewController: FlagsListViewController())
|
||||
@@ -16,4 +16,3 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,11 @@
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
||||
@@ -7,15 +7,15 @@ import UIKit
|
||||
class FlagTableViewCell: UITableViewCell {
|
||||
static let identifier = "FlagTableViewCell"
|
||||
|
||||
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
|
||||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
super.init(style: .value1, reuseIdentifier: reuseIdentifier)
|
||||
|
||||
backgroundColor = UIColor.clear
|
||||
|
||||
textLabel?.font = UIFont.systemFont(ofSize: 15, weight: UIFontWeightMedium)
|
||||
textLabel?.font = UIFont.systemFont(ofSize: 15, weight: UIFont.Weight.medium)
|
||||
textLabel?.textColor = UIColor(red: 0.00, green: 0.15, blue: 0.16, alpha: 1.0)
|
||||
|
||||
detailTextLabel?.font = UIFont.systemFont(ofSize: 13, weight: UIFontWeightLight)
|
||||
detailTextLabel?.font = UIFont.systemFont(ofSize: 13, weight: UIFont.Weight.light)
|
||||
detailTextLabel?.textColor = UIColor(red: 0.00, green: 0.15, blue: 0.16, alpha: 1.0)
|
||||
|
||||
imageView?.contentMode = .center
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-circle-1.png",
|
||||
"filename" : "se-circle@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-circle.png",
|
||||
"filename" : "se-circle@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-circle-2.png",
|
||||
"filename" : "se-circle@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
|
||||
|
Before Width: | Height: | Size: 913 B |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 554 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
@@ -2,17 +2,17 @@
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-none-1.png",
|
||||
"filename" : "se-none@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-none.png",
|
||||
"filename" : "se-none@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-none-2.png",
|
||||
"filename" : "se-none@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
|
||||
|
Before Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 490 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
@@ -2,17 +2,17 @@
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-roundrect.png",
|
||||
"filename" : "se-roundedrect@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-roundedrect.png",
|
||||
"filename" : "se-roundedrect@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-roundedrect-1.png",
|
||||
"filename" : "se-roundedrect@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
|
||||
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 532 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 894 B |
@@ -2,17 +2,17 @@
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-square-1.png",
|
||||
"filename" : "se-square@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-square.png",
|
||||
"filename" : "se-square@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "se-square-2.png",
|
||||
"filename" : "se-square@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
|
||||
|
Before Width: | Height: | Size: 768 B |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 434 B |
|
After Width: | Height: | Size: 930 B |
|
After Width: | Height: | Size: 1.5 KiB |
@@ -31,7 +31,13 @@ class FlagTests: XCTestCase {
|
||||
func testRoundedRectImage() {
|
||||
let generated = Flag(countryCode: "SE")?.image(style: .roundedRect)
|
||||
XCTAssertNotNil(generated)
|
||||
|
||||
|
||||
let file = generated!.pngData()
|
||||
|
||||
let dir = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first!.appending("flag.png")
|
||||
|
||||
try! file?.write(to: URL(fileURLWithPath: dir))
|
||||
|
||||
let fixture = fixtureImage(named: "se-roundedrect")
|
||||
XCTAssertImageEqual(generated!, fixture)
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ import XCTest
|
||||
import UIKit
|
||||
|
||||
func XCTAssertImageEqual(_ lhs: UIImage, _ rhs: UIImage, file: StaticString = #file, line: UInt = #line) {
|
||||
let lhsData = UIImagePNGRepresentation(lhs)
|
||||
let rhsData = UIImagePNGRepresentation(rhs)
|
||||
let lhsData = lhs.pngData()
|
||||
let rhsData = rhs.pngData()
|
||||
XCTAssertNotNil(lhsData, file: file, line: line)
|
||||
XCTAssertNotNil(rhsData, file: file, line: line)
|
||||
XCTAssertEqual(lhsData, rhsData, file: file, line: line)
|
||||
|
||||