├── .gitignore
├── PaymentFont.xcworkspace
└── contents.xcworkspacedata
├── PaymentFont
├── PaymentFont.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── PaymentFont.xcscheme
├── PaymentFont
│ ├── Info.plist
│ ├── PaymentFont.h
│ ├── PaymentFont.swift
│ └── paymentfont-webfont.ttf
└── PaymentFontTests
│ ├── Info.plist
│ └── PaymentFontTests.swift
├── PaymentFontExample
├── PaymentFontExample.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── PaymentFontExample
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── IconCell.swift
│ ├── Info.plist
│ └── ViewController.swift
├── README.md
└── demo@2x.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | .DS_Store
11 | *.pbxuser
12 | !default.pbxuser
13 | *.mode1v3
14 | !default.mode1v3
15 | *.mode2v3
16 | !default.mode2v3
17 | *.perspectivev3
18 | !default.perspectivev3
19 | xcuserdata/
20 |
21 | ## Other
22 | *.moved-aside
23 | *.xcuserstate
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | ## Playgrounds
32 | timeline.xctimeline
33 | playground.xcworkspace
34 |
35 | # Swift Package Manager
36 | #
37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
38 | # Packages/
39 | .build/
40 |
41 | # CocoaPods
42 | #
43 | # We recommend against adding the Pods directory to your .gitignore. However
44 | # you should judge for yourself, the pros and cons are mentioned at:
45 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
46 | #
47 | # Pods/
48 |
49 | # Carthage
50 | #
51 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
52 | # Carthage/Checkouts
53 |
54 | Carthage/Build
55 |
56 | # fastlane
57 | #
58 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
59 | # screenshots whenever they are needed.
60 | # For more information about the recommended setup visit:
61 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
62 |
63 | fastlane/report.xml
64 | fastlane/Preview.html
65 | fastlane/screenshots
66 | fastlane/test_output
67 |
--------------------------------------------------------------------------------
/PaymentFont.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/PaymentFont/PaymentFont.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 4B4AC6661D3399250048A0D6 /* PaymentFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B4AC6651D3399250048A0D6 /* PaymentFont.h */; settings = {ATTRIBUTES = (Public, ); }; };
11 | 4B4AC66D1D3399260048A0D6 /* PaymentFont.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B4AC6621D3399250048A0D6 /* PaymentFont.framework */; };
12 | 4B4AC6721D3399260048A0D6 /* PaymentFontTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4AC6711D3399260048A0D6 /* PaymentFontTests.swift */; };
13 | 4B4AC67D1D3399420048A0D6 /* PaymentFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4AC67C1D3399420048A0D6 /* PaymentFont.swift */; };
14 | 4B4AC67F1D33995A0048A0D6 /* paymentfont-webfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4B4AC67E1D33995A0048A0D6 /* paymentfont-webfont.ttf */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXContainerItemProxy section */
18 | 4B4AC66E1D3399260048A0D6 /* PBXContainerItemProxy */ = {
19 | isa = PBXContainerItemProxy;
20 | containerPortal = 4B4AC6591D3399250048A0D6 /* Project object */;
21 | proxyType = 1;
22 | remoteGlobalIDString = 4B4AC6611D3399250048A0D6;
23 | remoteInfo = PaymentFont;
24 | };
25 | /* End PBXContainerItemProxy section */
26 |
27 | /* Begin PBXFileReference section */
28 | 4B4AC6621D3399250048A0D6 /* PaymentFont.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PaymentFont.framework; sourceTree = BUILT_PRODUCTS_DIR; };
29 | 4B4AC6651D3399250048A0D6 /* PaymentFont.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentFont.h; sourceTree = ""; };
30 | 4B4AC6671D3399250048A0D6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
31 | 4B4AC66C1D3399260048A0D6 /* PaymentFontTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PaymentFontTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
32 | 4B4AC6711D3399260048A0D6 /* PaymentFontTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentFontTests.swift; sourceTree = ""; };
33 | 4B4AC6731D3399260048A0D6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
34 | 4B4AC67C1D3399420048A0D6 /* PaymentFont.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PaymentFont.swift; sourceTree = ""; };
35 | 4B4AC67E1D33995A0048A0D6 /* paymentfont-webfont.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "paymentfont-webfont.ttf"; sourceTree = ""; };
36 | /* End PBXFileReference section */
37 |
38 | /* Begin PBXFrameworksBuildPhase section */
39 | 4B4AC65E1D3399250048A0D6 /* Frameworks */ = {
40 | isa = PBXFrameworksBuildPhase;
41 | buildActionMask = 2147483647;
42 | files = (
43 | );
44 | runOnlyForDeploymentPostprocessing = 0;
45 | };
46 | 4B4AC6691D3399260048A0D6 /* Frameworks */ = {
47 | isa = PBXFrameworksBuildPhase;
48 | buildActionMask = 2147483647;
49 | files = (
50 | 4B4AC66D1D3399260048A0D6 /* PaymentFont.framework in Frameworks */,
51 | );
52 | runOnlyForDeploymentPostprocessing = 0;
53 | };
54 | /* End PBXFrameworksBuildPhase section */
55 |
56 | /* Begin PBXGroup section */
57 | 4B4AC6581D3399250048A0D6 = {
58 | isa = PBXGroup;
59 | children = (
60 | 4B4AC6641D3399250048A0D6 /* PaymentFont */,
61 | 4B4AC6701D3399260048A0D6 /* PaymentFontTests */,
62 | 4B4AC6631D3399250048A0D6 /* Products */,
63 | );
64 | sourceTree = "";
65 | };
66 | 4B4AC6631D3399250048A0D6 /* Products */ = {
67 | isa = PBXGroup;
68 | children = (
69 | 4B4AC6621D3399250048A0D6 /* PaymentFont.framework */,
70 | 4B4AC66C1D3399260048A0D6 /* PaymentFontTests.xctest */,
71 | );
72 | name = Products;
73 | sourceTree = "";
74 | };
75 | 4B4AC6641D3399250048A0D6 /* PaymentFont */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 4B4AC6651D3399250048A0D6 /* PaymentFont.h */,
79 | 4B4AC67C1D3399420048A0D6 /* PaymentFont.swift */,
80 | 4B4AC67E1D33995A0048A0D6 /* paymentfont-webfont.ttf */,
81 | 4B4AC6671D3399250048A0D6 /* Info.plist */,
82 | );
83 | path = PaymentFont;
84 | sourceTree = "";
85 | };
86 | 4B4AC6701D3399260048A0D6 /* PaymentFontTests */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 4B4AC6711D3399260048A0D6 /* PaymentFontTests.swift */,
90 | 4B4AC6731D3399260048A0D6 /* Info.plist */,
91 | );
92 | path = PaymentFontTests;
93 | sourceTree = "";
94 | };
95 | /* End PBXGroup section */
96 |
97 | /* Begin PBXHeadersBuildPhase section */
98 | 4B4AC65F1D3399250048A0D6 /* Headers */ = {
99 | isa = PBXHeadersBuildPhase;
100 | buildActionMask = 2147483647;
101 | files = (
102 | 4B4AC6661D3399250048A0D6 /* PaymentFont.h in Headers */,
103 | );
104 | runOnlyForDeploymentPostprocessing = 0;
105 | };
106 | /* End PBXHeadersBuildPhase section */
107 |
108 | /* Begin PBXNativeTarget section */
109 | 4B4AC6611D3399250048A0D6 /* PaymentFont */ = {
110 | isa = PBXNativeTarget;
111 | buildConfigurationList = 4B4AC6761D3399260048A0D6 /* Build configuration list for PBXNativeTarget "PaymentFont" */;
112 | buildPhases = (
113 | 4B4AC65D1D3399250048A0D6 /* Sources */,
114 | 4B4AC65E1D3399250048A0D6 /* Frameworks */,
115 | 4B4AC65F1D3399250048A0D6 /* Headers */,
116 | 4B4AC6601D3399250048A0D6 /* Resources */,
117 | );
118 | buildRules = (
119 | );
120 | dependencies = (
121 | );
122 | name = PaymentFont;
123 | productName = PaymentFont;
124 | productReference = 4B4AC6621D3399250048A0D6 /* PaymentFont.framework */;
125 | productType = "com.apple.product-type.framework";
126 | };
127 | 4B4AC66B1D3399260048A0D6 /* PaymentFontTests */ = {
128 | isa = PBXNativeTarget;
129 | buildConfigurationList = 4B4AC6791D3399260048A0D6 /* Build configuration list for PBXNativeTarget "PaymentFontTests" */;
130 | buildPhases = (
131 | 4B4AC6681D3399260048A0D6 /* Sources */,
132 | 4B4AC6691D3399260048A0D6 /* Frameworks */,
133 | 4B4AC66A1D3399260048A0D6 /* Resources */,
134 | );
135 | buildRules = (
136 | );
137 | dependencies = (
138 | 4B4AC66F1D3399260048A0D6 /* PBXTargetDependency */,
139 | );
140 | name = PaymentFontTests;
141 | productName = PaymentFontTests;
142 | productReference = 4B4AC66C1D3399260048A0D6 /* PaymentFontTests.xctest */;
143 | productType = "com.apple.product-type.bundle.unit-test";
144 | };
145 | /* End PBXNativeTarget section */
146 |
147 | /* Begin PBXProject section */
148 | 4B4AC6591D3399250048A0D6 /* Project object */ = {
149 | isa = PBXProject;
150 | attributes = {
151 | LastSwiftUpdateCheck = 0730;
152 | LastUpgradeCheck = 0800;
153 | ORGANIZATIONNAME = "Grigory Avdyushin";
154 | TargetAttributes = {
155 | 4B4AC6611D3399250048A0D6 = {
156 | CreatedOnToolsVersion = 7.3.1;
157 | DevelopmentTeam = Q4HEW2JVA9;
158 | DevelopmentTeamName = "GRIGORY AVDYUSHIN";
159 | LastSwiftMigration = 0800;
160 | };
161 | 4B4AC66B1D3399260048A0D6 = {
162 | CreatedOnToolsVersion = 7.3.1;
163 | DevelopmentTeam = Q4HEW2JVA9;
164 | DevelopmentTeamName = "GRIGORY AVDYUSHIN";
165 | LastSwiftMigration = 0800;
166 | };
167 | };
168 | };
169 | buildConfigurationList = 4B4AC65C1D3399250048A0D6 /* Build configuration list for PBXProject "PaymentFont" */;
170 | compatibilityVersion = "Xcode 3.2";
171 | developmentRegion = English;
172 | hasScannedForEncodings = 0;
173 | knownRegions = (
174 | en,
175 | );
176 | mainGroup = 4B4AC6581D3399250048A0D6;
177 | productRefGroup = 4B4AC6631D3399250048A0D6 /* Products */;
178 | projectDirPath = "";
179 | projectRoot = "";
180 | targets = (
181 | 4B4AC6611D3399250048A0D6 /* PaymentFont */,
182 | 4B4AC66B1D3399260048A0D6 /* PaymentFontTests */,
183 | );
184 | };
185 | /* End PBXProject section */
186 |
187 | /* Begin PBXResourcesBuildPhase section */
188 | 4B4AC6601D3399250048A0D6 /* Resources */ = {
189 | isa = PBXResourcesBuildPhase;
190 | buildActionMask = 2147483647;
191 | files = (
192 | 4B4AC67F1D33995A0048A0D6 /* paymentfont-webfont.ttf in Resources */,
193 | );
194 | runOnlyForDeploymentPostprocessing = 0;
195 | };
196 | 4B4AC66A1D3399260048A0D6 /* Resources */ = {
197 | isa = PBXResourcesBuildPhase;
198 | buildActionMask = 2147483647;
199 | files = (
200 | );
201 | runOnlyForDeploymentPostprocessing = 0;
202 | };
203 | /* End PBXResourcesBuildPhase section */
204 |
205 | /* Begin PBXSourcesBuildPhase section */
206 | 4B4AC65D1D3399250048A0D6 /* Sources */ = {
207 | isa = PBXSourcesBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | 4B4AC67D1D3399420048A0D6 /* PaymentFont.swift in Sources */,
211 | );
212 | runOnlyForDeploymentPostprocessing = 0;
213 | };
214 | 4B4AC6681D3399260048A0D6 /* Sources */ = {
215 | isa = PBXSourcesBuildPhase;
216 | buildActionMask = 2147483647;
217 | files = (
218 | 4B4AC6721D3399260048A0D6 /* PaymentFontTests.swift in Sources */,
219 | );
220 | runOnlyForDeploymentPostprocessing = 0;
221 | };
222 | /* End PBXSourcesBuildPhase section */
223 |
224 | /* Begin PBXTargetDependency section */
225 | 4B4AC66F1D3399260048A0D6 /* PBXTargetDependency */ = {
226 | isa = PBXTargetDependency;
227 | target = 4B4AC6611D3399250048A0D6 /* PaymentFont */;
228 | targetProxy = 4B4AC66E1D3399260048A0D6 /* PBXContainerItemProxy */;
229 | };
230 | /* End PBXTargetDependency section */
231 |
232 | /* Begin XCBuildConfiguration section */
233 | 4B4AC6741D3399260048A0D6 /* Debug */ = {
234 | isa = XCBuildConfiguration;
235 | buildSettings = {
236 | ALWAYS_SEARCH_USER_PATHS = NO;
237 | CLANG_ANALYZER_NONNULL = YES;
238 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
239 | CLANG_CXX_LIBRARY = "libc++";
240 | CLANG_ENABLE_MODULES = YES;
241 | CLANG_ENABLE_OBJC_ARC = YES;
242 | CLANG_WARN_BOOL_CONVERSION = YES;
243 | CLANG_WARN_CONSTANT_CONVERSION = YES;
244 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
245 | CLANG_WARN_EMPTY_BODY = YES;
246 | CLANG_WARN_ENUM_CONVERSION = YES;
247 | CLANG_WARN_INT_CONVERSION = YES;
248 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
249 | CLANG_WARN_UNREACHABLE_CODE = YES;
250 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
251 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
252 | COPY_PHASE_STRIP = NO;
253 | CURRENT_PROJECT_VERSION = 1;
254 | DEBUG_INFORMATION_FORMAT = dwarf;
255 | ENABLE_STRICT_OBJC_MSGSEND = YES;
256 | ENABLE_TESTABILITY = YES;
257 | GCC_C_LANGUAGE_STANDARD = gnu99;
258 | GCC_DYNAMIC_NO_PIC = NO;
259 | GCC_NO_COMMON_BLOCKS = YES;
260 | GCC_OPTIMIZATION_LEVEL = 0;
261 | GCC_PREPROCESSOR_DEFINITIONS = (
262 | "DEBUG=1",
263 | "$(inherited)",
264 | );
265 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
266 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
267 | GCC_WARN_UNDECLARED_SELECTOR = YES;
268 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
269 | GCC_WARN_UNUSED_FUNCTION = YES;
270 | GCC_WARN_UNUSED_VARIABLE = YES;
271 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
272 | MTL_ENABLE_DEBUG_INFO = YES;
273 | ONLY_ACTIVE_ARCH = YES;
274 | SDKROOT = iphoneos;
275 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
276 | TARGETED_DEVICE_FAMILY = "1,2";
277 | VERSIONING_SYSTEM = "apple-generic";
278 | VERSION_INFO_PREFIX = "";
279 | };
280 | name = Debug;
281 | };
282 | 4B4AC6751D3399260048A0D6 /* Release */ = {
283 | isa = XCBuildConfiguration;
284 | buildSettings = {
285 | ALWAYS_SEARCH_USER_PATHS = NO;
286 | CLANG_ANALYZER_NONNULL = YES;
287 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
288 | CLANG_CXX_LIBRARY = "libc++";
289 | CLANG_ENABLE_MODULES = YES;
290 | CLANG_ENABLE_OBJC_ARC = YES;
291 | CLANG_WARN_BOOL_CONVERSION = YES;
292 | CLANG_WARN_CONSTANT_CONVERSION = YES;
293 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
294 | CLANG_WARN_EMPTY_BODY = YES;
295 | CLANG_WARN_ENUM_CONVERSION = YES;
296 | CLANG_WARN_INT_CONVERSION = YES;
297 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
298 | CLANG_WARN_UNREACHABLE_CODE = YES;
299 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
300 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
301 | COPY_PHASE_STRIP = NO;
302 | CURRENT_PROJECT_VERSION = 1;
303 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
304 | ENABLE_NS_ASSERTIONS = NO;
305 | ENABLE_STRICT_OBJC_MSGSEND = YES;
306 | GCC_C_LANGUAGE_STANDARD = gnu99;
307 | GCC_NO_COMMON_BLOCKS = YES;
308 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
309 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
310 | GCC_WARN_UNDECLARED_SELECTOR = YES;
311 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
312 | GCC_WARN_UNUSED_FUNCTION = YES;
313 | GCC_WARN_UNUSED_VARIABLE = YES;
314 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
315 | MTL_ENABLE_DEBUG_INFO = NO;
316 | SDKROOT = iphoneos;
317 | TARGETED_DEVICE_FAMILY = "1,2";
318 | VALIDATE_PRODUCT = YES;
319 | VERSIONING_SYSTEM = "apple-generic";
320 | VERSION_INFO_PREFIX = "";
321 | };
322 | name = Release;
323 | };
324 | 4B4AC6771D3399260048A0D6 /* Debug */ = {
325 | isa = XCBuildConfiguration;
326 | buildSettings = {
327 | CLANG_ENABLE_MODULES = YES;
328 | DEFINES_MODULE = YES;
329 | DYLIB_COMPATIBILITY_VERSION = 1;
330 | DYLIB_CURRENT_VERSION = 1;
331 | DYLIB_INSTALL_NAME_BASE = "@rpath";
332 | INFOPLIST_FILE = PaymentFont/Info.plist;
333 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
334 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
335 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
336 | PRODUCT_BUNDLE_IDENTIFIER = ru.avdyushin.PaymentFont;
337 | PRODUCT_NAME = "$(TARGET_NAME)";
338 | SKIP_INSTALL = YES;
339 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
340 | SWIFT_VERSION = 3.0;
341 | };
342 | name = Debug;
343 | };
344 | 4B4AC6781D3399260048A0D6 /* Release */ = {
345 | isa = XCBuildConfiguration;
346 | buildSettings = {
347 | CLANG_ENABLE_MODULES = YES;
348 | DEFINES_MODULE = YES;
349 | DYLIB_COMPATIBILITY_VERSION = 1;
350 | DYLIB_CURRENT_VERSION = 1;
351 | DYLIB_INSTALL_NAME_BASE = "@rpath";
352 | INFOPLIST_FILE = PaymentFont/Info.plist;
353 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
354 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
355 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
356 | PRODUCT_BUNDLE_IDENTIFIER = ru.avdyushin.PaymentFont;
357 | PRODUCT_NAME = "$(TARGET_NAME)";
358 | SKIP_INSTALL = YES;
359 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
360 | SWIFT_VERSION = 3.0;
361 | };
362 | name = Release;
363 | };
364 | 4B4AC67A1D3399260048A0D6 /* Debug */ = {
365 | isa = XCBuildConfiguration;
366 | buildSettings = {
367 | INFOPLIST_FILE = PaymentFontTests/Info.plist;
368 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
369 | PRODUCT_BUNDLE_IDENTIFIER = ru.avdyushin.PaymentFontTests;
370 | PRODUCT_NAME = "$(TARGET_NAME)";
371 | SWIFT_VERSION = 3.0;
372 | };
373 | name = Debug;
374 | };
375 | 4B4AC67B1D3399260048A0D6 /* Release */ = {
376 | isa = XCBuildConfiguration;
377 | buildSettings = {
378 | INFOPLIST_FILE = PaymentFontTests/Info.plist;
379 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
380 | PRODUCT_BUNDLE_IDENTIFIER = ru.avdyushin.PaymentFontTests;
381 | PRODUCT_NAME = "$(TARGET_NAME)";
382 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
383 | SWIFT_VERSION = 3.0;
384 | };
385 | name = Release;
386 | };
387 | /* End XCBuildConfiguration section */
388 |
389 | /* Begin XCConfigurationList section */
390 | 4B4AC65C1D3399250048A0D6 /* Build configuration list for PBXProject "PaymentFont" */ = {
391 | isa = XCConfigurationList;
392 | buildConfigurations = (
393 | 4B4AC6741D3399260048A0D6 /* Debug */,
394 | 4B4AC6751D3399260048A0D6 /* Release */,
395 | );
396 | defaultConfigurationIsVisible = 0;
397 | defaultConfigurationName = Release;
398 | };
399 | 4B4AC6761D3399260048A0D6 /* Build configuration list for PBXNativeTarget "PaymentFont" */ = {
400 | isa = XCConfigurationList;
401 | buildConfigurations = (
402 | 4B4AC6771D3399260048A0D6 /* Debug */,
403 | 4B4AC6781D3399260048A0D6 /* Release */,
404 | );
405 | defaultConfigurationIsVisible = 0;
406 | defaultConfigurationName = Release;
407 | };
408 | 4B4AC6791D3399260048A0D6 /* Build configuration list for PBXNativeTarget "PaymentFontTests" */ = {
409 | isa = XCConfigurationList;
410 | buildConfigurations = (
411 | 4B4AC67A1D3399260048A0D6 /* Debug */,
412 | 4B4AC67B1D3399260048A0D6 /* Release */,
413 | );
414 | defaultConfigurationIsVisible = 0;
415 | defaultConfigurationName = Release;
416 | };
417 | /* End XCConfigurationList section */
418 | };
419 | rootObject = 4B4AC6591D3399250048A0D6 /* Project object */;
420 | }
421 |
--------------------------------------------------------------------------------
/PaymentFont/PaymentFont.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PaymentFont/PaymentFont.xcodeproj/xcshareddata/xcschemes/PaymentFont.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
65 |
71 |
72 |
73 |
74 |
75 |
76 |
82 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/PaymentFont/PaymentFont/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/PaymentFont/PaymentFont/PaymentFont.h:
--------------------------------------------------------------------------------
1 | //
2 | // PaymentFont.h
3 | // PaymentFont
4 | //
5 | // Created by Grigory Avdyushin on 11.07.16.
6 | // Copyright © 2016 Grigory Avdyushin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for PaymentFont.
12 | FOUNDATION_EXPORT double PaymentFontVersionNumber;
13 |
14 | //! Project version string for PaymentFont.
15 | FOUNDATION_EXPORT const unsigned char PaymentFontVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/PaymentFont/PaymentFont/PaymentFont.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PaymentFont.swift
3 | // PaymentFont
4 | //
5 | // Created by Grigory Avdyushin on 11.07.16.
6 | // Copyright © 2016 Grigory Avdyushin. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | open class PaymentFont {
12 |
13 | fileprivate static var preloaded: Bool = {
14 |
15 | let bundle = Bundle(for: PaymentFont.self)
16 |
17 | guard let URL = bundle.url(forResource: PaymentFont.fontName, withExtension: "ttf"),
18 | let data = try? Data(contentsOf: URL) as CFData else {
19 |
20 | return false
21 | }
22 |
23 | guard let provider = CGDataProvider(data: data) else {
24 | return false
25 | }
26 |
27 | let font = CGFont(provider)
28 | return CTFontManagerRegisterGraphicsFont(font, nil)
29 |
30 | }()
31 |
32 | open static let fontName = "paymentfont-webfont"
33 |
34 | public enum Symbols: String {
35 |
36 | case amazon = "\u{f000}"
37 | case americanExpress = "\u{f001}"
38 | case americanExpressAlt = "\u{f002}"
39 | case atm = "\u{f003}"
40 | case bankomat = "\u{f004}"
41 | case bankTransfer = "\u{f005}"
42 | case bitcoin = "\u{f006}"
43 | case bitcoinSign = "\u{f007}"
44 | case braintree = "\u{f008}"
45 | case btc = "\u{f009}"
46 | case card = "\u{f00a}"
47 | case cartaSi = "\u{f00b}"
48 | case cash = "\u{f00c}"
49 | case cashOnDelivery = "\u{f00d}"
50 | case cb = "\u{f00e}"
51 | case cirrus = "\u{f00f}"
52 | case cirrusAlt = "\u{f010}"
53 | case clickandbuy = "\u{f011}"
54 | case creditCard = "\u{f012}"
55 | case diners = "\u{f013}"
56 | case discover = "\u{f014}"
57 | case ec = "\u{f015}"
58 | case eps = "\u{f016}"
59 | case eur = "\u{f017}"
60 | case facture = "\u{f018}"
61 | case fattura = "\u{f019}"
62 | case flattr = "\u{f01a}"
63 | case giropay = "\u{f01b}"
64 | case gratipay = "\u{f01c}"
65 | case googleWallet = "\u{f01d}"
66 | case googleWalletAlt = "\u{f01e}"
67 | case gbp = "\u{f01f}"
68 | case ideal = "\u{f020}"
69 | case ils = "\u{f021}"
70 | case inr = "\u{f022}"
71 | case invoice = "\u{f023}"
72 | case invoiceSign = "\u{f024}"
73 | case invoiceSignAlt = "\u{f025}"
74 | case invoiceSignAltO = "\u{f026}"
75 | case invoiceSignO = "\u{f027}"
76 | case jcb = "\u{f028}"
77 | case jpy = "\u{f029}"
78 | case krw = "\u{f02a}"
79 | case maestro = "\u{f02b}"
80 | case maestroAlt = "\u{f02c}"
81 | case mastercard = "\u{f02d}"
82 | case mastercardAlt = "\u{f02e}"
83 | case mastercardSecurecode = "\u{f02f}"
84 | case ogone = "\u{f030}"
85 | case paybox = "\u{f031}"
86 | case paylife = "\u{f032}"
87 | case paypal = "\u{f033}"
88 | case paypalAlt = "\u{f034}"
89 | case paysafecard = "\u{f035}"
90 | case postepay = "\u{f036}"
91 | case quick = "\u{f037}"
92 | case rechnung = "\u{f038}"
93 | case ripple = "\u{f039}"
94 | case rub = "\u{f03a}"
95 | case skrill = "\u{f03b}"
96 | case sofort = "\u{f03c}"
97 | case square = "\u{f03d}"
98 | case stripe = "\u{f03e}"
99 | case truste = "\u{f03f}"
100 | case try_ = "\u{f040}"
101 | case unionpay = "\u{f041}"
102 | case usd = "\u{f042}"
103 | case verifiedByVisa = "\u{f043}"
104 | case verisign = "\u{f044}"
105 | case visa = "\u{f045}"
106 | case visaElectron = "\u{f046}"
107 | case westernUnion = "\u{f047}"
108 | case westernUnionAlt = "\u{f048}"
109 | case wirecard = "\u{f049}"
110 | case sepa = "\u{f04a}"
111 | case sepaAlt = "\u{f04b}"
112 | case applePay = "\u{f04c}"
113 | case interac = "\u{f04d}"
114 | case paymill = "\u{f04e}"
115 | case dankort = "\u{f04f}"
116 | case bancontactMisterCash = "\u{f050}"
117 | case moip = "\u{f051}"
118 | case pagseguro = "\u{f052}"
119 | case cashOnPickup = "\u{f053}"
120 | case sage = "\u{f054}"
121 | case elo = "\u{f055}"
122 | case eloAlt = "\u{f056}"
123 | case payu = "\u{f057}"
124 | case mercadoPago = "\u{f058}"
125 | case mercadoPagoSign = "\u{f059}"
126 | case payshop = "\u{f05a}"
127 | case multibanco = "\u{f05b}"
128 | case gratipaySign = "\u{f05c}"
129 | case six = "\u{f05d}"
130 | case cashcloud = "\u{f05e}"
131 |
132 | var stringValue: String? { return self.rawValue }
133 |
134 | }
135 |
136 | open static func preloadFont() {
137 |
138 | guard UIFont.fontNames(forFamilyName: PaymentFont.fontName).count == 0 else { return }
139 | guard PaymentFont.preloaded else {
140 | print("Payment font was not loaded.")
141 | return
142 | }
143 |
144 | }
145 |
146 | open static func font(_ size: CGFloat) -> UIFont? {
147 | PaymentFont.preloadFont()
148 | return UIFont(name: PaymentFont.fontName, size: size)
149 | }
150 |
151 | open static func icon(_ icon: Symbols) -> String? {
152 | return icon.stringValue
153 | }
154 |
155 | }
156 |
--------------------------------------------------------------------------------
/PaymentFont/PaymentFont/paymentfont-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avdyushin/PaymentFont/911a0c8e318903582785d2725a6f253f0b183177/PaymentFont/PaymentFont/paymentfont-webfont.ttf
--------------------------------------------------------------------------------
/PaymentFont/PaymentFontTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/PaymentFont/PaymentFontTests/PaymentFontTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PaymentFontTests.swift
3 | // PaymentFontTests
4 | //
5 | // Created by Grigory Avdyushin on 11.07.16.
6 | // Copyright © 2016 Grigory Avdyushin. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import PaymentFont
11 |
12 | class PaymentFontTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | XCTAssertTrue(PaymentFont.preloadFont())
18 | }
19 |
20 | override func tearDown() {
21 | // Put teardown code here. This method is called after the invocation of each test method in the class.
22 | super.tearDown()
23 | }
24 |
25 | func testExample() {
26 | // This is an example of a functional test case.
27 | // Use XCTAssert and related functions to verify your tests produce the correct results.
28 | XCTAssertEqual(PaymentFont.Icons.usd.stringValue, "\u{f042}")
29 | XCTAssertEqual(PaymentFont.icon(.usd), "\u{f042}")
30 | }
31 |
32 | func testPerformanceExample() {
33 | // This is an example of a performance test case.
34 | self.measureBlock {
35 | // Put the code you want to measure the time of here.
36 | }
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/PaymentFontExample/PaymentFontExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 4B4AC68D1D33A8C70048A0D6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4AC68C1D33A8C70048A0D6 /* AppDelegate.swift */; };
11 | 4B4AC68F1D33A8C70048A0D6 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4AC68E1D33A8C70048A0D6 /* ViewController.swift */; };
12 | 4B4AC6921D33A8C70048A0D6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B4AC6901D33A8C70048A0D6 /* Main.storyboard */; };
13 | 4B4AC6941D33A8C70048A0D6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B4AC6931D33A8C70048A0D6 /* Assets.xcassets */; };
14 | 4B4AC6971D33A8C70048A0D6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B4AC6951D33A8C70048A0D6 /* LaunchScreen.storyboard */; };
15 | 4B4AC6A71D33A9590048A0D6 /* PaymentFont.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4B4AC6A41D33A94E0048A0D6 /* PaymentFont.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
16 | 4B4AC6AA1D33AA3C0048A0D6 /* IconCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4AC6A91D33AA3C0048A0D6 /* IconCell.swift */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXCopyFilesBuildPhase section */
20 | 4B4AC6A81D33A9590048A0D6 /* Embed Frameworks */ = {
21 | isa = PBXCopyFilesBuildPhase;
22 | buildActionMask = 2147483647;
23 | dstPath = "";
24 | dstSubfolderSpec = 10;
25 | files = (
26 | 4B4AC6A71D33A9590048A0D6 /* PaymentFont.framework in Embed Frameworks */,
27 | );
28 | name = "Embed Frameworks";
29 | runOnlyForDeploymentPostprocessing = 0;
30 | };
31 | /* End PBXCopyFilesBuildPhase section */
32 |
33 | /* Begin PBXFileReference section */
34 | 4B4AC6891D33A8C70048A0D6 /* PaymentFontExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PaymentFontExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
35 | 4B4AC68C1D33A8C70048A0D6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
36 | 4B4AC68E1D33A8C70048A0D6 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
37 | 4B4AC6911D33A8C70048A0D6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
38 | 4B4AC6931D33A8C70048A0D6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
39 | 4B4AC6961D33A8C70048A0D6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
40 | 4B4AC6981D33A8C70048A0D6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
41 | 4B4AC6A41D33A94E0048A0D6 /* PaymentFont.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PaymentFont.framework; path = "../../../../Library/Developer/Xcode/DerivedData/PaymentFont-hhdkarmdcgidlwcwhvgukjlitakx/Build/Products/Debug-iphonesimulator/PaymentFont.framework"; sourceTree = ""; };
42 | 4B4AC6A91D33AA3C0048A0D6 /* IconCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IconCell.swift; sourceTree = ""; };
43 | /* End PBXFileReference section */
44 |
45 | /* Begin PBXFrameworksBuildPhase section */
46 | 4B4AC6861D33A8C70048A0D6 /* Frameworks */ = {
47 | isa = PBXFrameworksBuildPhase;
48 | buildActionMask = 2147483647;
49 | files = (
50 | );
51 | runOnlyForDeploymentPostprocessing = 0;
52 | };
53 | /* End PBXFrameworksBuildPhase section */
54 |
55 | /* Begin PBXGroup section */
56 | 4B4AC6801D33A8C70048A0D6 = {
57 | isa = PBXGroup;
58 | children = (
59 | 4B4AC6A41D33A94E0048A0D6 /* PaymentFont.framework */,
60 | 4B4AC68B1D33A8C70048A0D6 /* PaymentFontExample */,
61 | 4B4AC68A1D33A8C70048A0D6 /* Products */,
62 | );
63 | sourceTree = "";
64 | };
65 | 4B4AC68A1D33A8C70048A0D6 /* Products */ = {
66 | isa = PBXGroup;
67 | children = (
68 | 4B4AC6891D33A8C70048A0D6 /* PaymentFontExample.app */,
69 | );
70 | name = Products;
71 | sourceTree = "";
72 | };
73 | 4B4AC68B1D33A8C70048A0D6 /* PaymentFontExample */ = {
74 | isa = PBXGroup;
75 | children = (
76 | 4B4AC68C1D33A8C70048A0D6 /* AppDelegate.swift */,
77 | 4B4AC68E1D33A8C70048A0D6 /* ViewController.swift */,
78 | 4B4AC6901D33A8C70048A0D6 /* Main.storyboard */,
79 | 4B4AC6931D33A8C70048A0D6 /* Assets.xcassets */,
80 | 4B4AC6951D33A8C70048A0D6 /* LaunchScreen.storyboard */,
81 | 4B4AC6981D33A8C70048A0D6 /* Info.plist */,
82 | 4B4AC6A91D33AA3C0048A0D6 /* IconCell.swift */,
83 | );
84 | path = PaymentFontExample;
85 | sourceTree = "";
86 | };
87 | /* End PBXGroup section */
88 |
89 | /* Begin PBXNativeTarget section */
90 | 4B4AC6881D33A8C70048A0D6 /* PaymentFontExample */ = {
91 | isa = PBXNativeTarget;
92 | buildConfigurationList = 4B4AC69B1D33A8C70048A0D6 /* Build configuration list for PBXNativeTarget "PaymentFontExample" */;
93 | buildPhases = (
94 | 4B4AC6851D33A8C70048A0D6 /* Sources */,
95 | 4B4AC6861D33A8C70048A0D6 /* Frameworks */,
96 | 4B4AC6871D33A8C70048A0D6 /* Resources */,
97 | 4B4AC6A81D33A9590048A0D6 /* Embed Frameworks */,
98 | );
99 | buildRules = (
100 | );
101 | dependencies = (
102 | );
103 | name = PaymentFontExample;
104 | productName = PaymentFontExample;
105 | productReference = 4B4AC6891D33A8C70048A0D6 /* PaymentFontExample.app */;
106 | productType = "com.apple.product-type.application";
107 | };
108 | /* End PBXNativeTarget section */
109 |
110 | /* Begin PBXProject section */
111 | 4B4AC6811D33A8C70048A0D6 /* Project object */ = {
112 | isa = PBXProject;
113 | attributes = {
114 | LastSwiftUpdateCheck = 0730;
115 | LastUpgradeCheck = 0800;
116 | ORGANIZATIONNAME = "Grigory Avdyushin";
117 | TargetAttributes = {
118 | 4B4AC6881D33A8C70048A0D6 = {
119 | CreatedOnToolsVersion = 7.3.1;
120 | DevelopmentTeam = Q4HEW2JVA9;
121 | DevelopmentTeamName = "GRIGORY AVDYUSHIN";
122 | LastSwiftMigration = 0800;
123 | };
124 | };
125 | };
126 | buildConfigurationList = 4B4AC6841D33A8C70048A0D6 /* Build configuration list for PBXProject "PaymentFontExample" */;
127 | compatibilityVersion = "Xcode 3.2";
128 | developmentRegion = English;
129 | hasScannedForEncodings = 0;
130 | knownRegions = (
131 | en,
132 | Base,
133 | );
134 | mainGroup = 4B4AC6801D33A8C70048A0D6;
135 | productRefGroup = 4B4AC68A1D33A8C70048A0D6 /* Products */;
136 | projectDirPath = "";
137 | projectRoot = "";
138 | targets = (
139 | 4B4AC6881D33A8C70048A0D6 /* PaymentFontExample */,
140 | );
141 | };
142 | /* End PBXProject section */
143 |
144 | /* Begin PBXResourcesBuildPhase section */
145 | 4B4AC6871D33A8C70048A0D6 /* Resources */ = {
146 | isa = PBXResourcesBuildPhase;
147 | buildActionMask = 2147483647;
148 | files = (
149 | 4B4AC6971D33A8C70048A0D6 /* LaunchScreen.storyboard in Resources */,
150 | 4B4AC6941D33A8C70048A0D6 /* Assets.xcassets in Resources */,
151 | 4B4AC6921D33A8C70048A0D6 /* Main.storyboard in Resources */,
152 | );
153 | runOnlyForDeploymentPostprocessing = 0;
154 | };
155 | /* End PBXResourcesBuildPhase section */
156 |
157 | /* Begin PBXSourcesBuildPhase section */
158 | 4B4AC6851D33A8C70048A0D6 /* Sources */ = {
159 | isa = PBXSourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 4B4AC68F1D33A8C70048A0D6 /* ViewController.swift in Sources */,
163 | 4B4AC68D1D33A8C70048A0D6 /* AppDelegate.swift in Sources */,
164 | 4B4AC6AA1D33AA3C0048A0D6 /* IconCell.swift in Sources */,
165 | );
166 | runOnlyForDeploymentPostprocessing = 0;
167 | };
168 | /* End PBXSourcesBuildPhase section */
169 |
170 | /* Begin PBXVariantGroup section */
171 | 4B4AC6901D33A8C70048A0D6 /* Main.storyboard */ = {
172 | isa = PBXVariantGroup;
173 | children = (
174 | 4B4AC6911D33A8C70048A0D6 /* Base */,
175 | );
176 | name = Main.storyboard;
177 | sourceTree = "";
178 | };
179 | 4B4AC6951D33A8C70048A0D6 /* LaunchScreen.storyboard */ = {
180 | isa = PBXVariantGroup;
181 | children = (
182 | 4B4AC6961D33A8C70048A0D6 /* Base */,
183 | );
184 | name = LaunchScreen.storyboard;
185 | sourceTree = "";
186 | };
187 | /* End PBXVariantGroup section */
188 |
189 | /* Begin XCBuildConfiguration section */
190 | 4B4AC6991D33A8C70048A0D6 /* Debug */ = {
191 | isa = XCBuildConfiguration;
192 | buildSettings = {
193 | ALWAYS_SEARCH_USER_PATHS = NO;
194 | CLANG_ANALYZER_NONNULL = YES;
195 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
196 | CLANG_CXX_LIBRARY = "libc++";
197 | CLANG_ENABLE_MODULES = YES;
198 | CLANG_ENABLE_OBJC_ARC = YES;
199 | CLANG_WARN_BOOL_CONVERSION = YES;
200 | CLANG_WARN_CONSTANT_CONVERSION = YES;
201 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
202 | CLANG_WARN_EMPTY_BODY = YES;
203 | CLANG_WARN_ENUM_CONVERSION = YES;
204 | CLANG_WARN_INT_CONVERSION = YES;
205 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
206 | CLANG_WARN_UNREACHABLE_CODE = YES;
207 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
208 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
209 | COPY_PHASE_STRIP = NO;
210 | DEBUG_INFORMATION_FORMAT = dwarf;
211 | ENABLE_STRICT_OBJC_MSGSEND = YES;
212 | ENABLE_TESTABILITY = YES;
213 | GCC_C_LANGUAGE_STANDARD = gnu99;
214 | GCC_DYNAMIC_NO_PIC = NO;
215 | GCC_NO_COMMON_BLOCKS = YES;
216 | GCC_OPTIMIZATION_LEVEL = 0;
217 | GCC_PREPROCESSOR_DEFINITIONS = (
218 | "DEBUG=1",
219 | "$(inherited)",
220 | );
221 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
222 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
223 | GCC_WARN_UNDECLARED_SELECTOR = YES;
224 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
225 | GCC_WARN_UNUSED_FUNCTION = YES;
226 | GCC_WARN_UNUSED_VARIABLE = YES;
227 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
228 | MTL_ENABLE_DEBUG_INFO = YES;
229 | ONLY_ACTIVE_ARCH = YES;
230 | SDKROOT = iphoneos;
231 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
232 | };
233 | name = Debug;
234 | };
235 | 4B4AC69A1D33A8C70048A0D6 /* Release */ = {
236 | isa = XCBuildConfiguration;
237 | buildSettings = {
238 | ALWAYS_SEARCH_USER_PATHS = NO;
239 | CLANG_ANALYZER_NONNULL = YES;
240 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
241 | CLANG_CXX_LIBRARY = "libc++";
242 | CLANG_ENABLE_MODULES = YES;
243 | CLANG_ENABLE_OBJC_ARC = YES;
244 | CLANG_WARN_BOOL_CONVERSION = YES;
245 | CLANG_WARN_CONSTANT_CONVERSION = YES;
246 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
247 | CLANG_WARN_EMPTY_BODY = YES;
248 | CLANG_WARN_ENUM_CONVERSION = YES;
249 | CLANG_WARN_INT_CONVERSION = YES;
250 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
251 | CLANG_WARN_UNREACHABLE_CODE = YES;
252 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
253 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
254 | COPY_PHASE_STRIP = NO;
255 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
256 | ENABLE_NS_ASSERTIONS = NO;
257 | ENABLE_STRICT_OBJC_MSGSEND = YES;
258 | GCC_C_LANGUAGE_STANDARD = gnu99;
259 | GCC_NO_COMMON_BLOCKS = YES;
260 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
261 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
262 | GCC_WARN_UNDECLARED_SELECTOR = YES;
263 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
264 | GCC_WARN_UNUSED_FUNCTION = YES;
265 | GCC_WARN_UNUSED_VARIABLE = YES;
266 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
267 | MTL_ENABLE_DEBUG_INFO = NO;
268 | SDKROOT = iphoneos;
269 | VALIDATE_PRODUCT = YES;
270 | };
271 | name = Release;
272 | };
273 | 4B4AC69C1D33A8C70048A0D6 /* Debug */ = {
274 | isa = XCBuildConfiguration;
275 | buildSettings = {
276 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
277 | INFOPLIST_FILE = PaymentFontExample/Info.plist;
278 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
279 | PRODUCT_BUNDLE_IDENTIFIER = ru.avdyushin.PaymentFontExample;
280 | PRODUCT_NAME = "$(TARGET_NAME)";
281 | SWIFT_VERSION = 3.0;
282 | };
283 | name = Debug;
284 | };
285 | 4B4AC69D1D33A8C70048A0D6 /* Release */ = {
286 | isa = XCBuildConfiguration;
287 | buildSettings = {
288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289 | INFOPLIST_FILE = PaymentFontExample/Info.plist;
290 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
291 | PRODUCT_BUNDLE_IDENTIFIER = ru.avdyushin.PaymentFontExample;
292 | PRODUCT_NAME = "$(TARGET_NAME)";
293 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
294 | SWIFT_VERSION = 3.0;
295 | };
296 | name = Release;
297 | };
298 | /* End XCBuildConfiguration section */
299 |
300 | /* Begin XCConfigurationList section */
301 | 4B4AC6841D33A8C70048A0D6 /* Build configuration list for PBXProject "PaymentFontExample" */ = {
302 | isa = XCConfigurationList;
303 | buildConfigurations = (
304 | 4B4AC6991D33A8C70048A0D6 /* Debug */,
305 | 4B4AC69A1D33A8C70048A0D6 /* Release */,
306 | );
307 | defaultConfigurationIsVisible = 0;
308 | defaultConfigurationName = Release;
309 | };
310 | 4B4AC69B1D33A8C70048A0D6 /* Build configuration list for PBXNativeTarget "PaymentFontExample" */ = {
311 | isa = XCConfigurationList;
312 | buildConfigurations = (
313 | 4B4AC69C1D33A8C70048A0D6 /* Debug */,
314 | 4B4AC69D1D33A8C70048A0D6 /* Release */,
315 | );
316 | defaultConfigurationIsVisible = 0;
317 | defaultConfigurationName = Release;
318 | };
319 | /* End XCConfigurationList section */
320 | };
321 | rootObject = 4B4AC6811D33A8C70048A0D6 /* Project object */;
322 | }
323 |
--------------------------------------------------------------------------------
/PaymentFontExample/PaymentFontExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PaymentFontExample/PaymentFontExample/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // PaymentFontExample
4 | //
5 | // Created by Grigory Avdyushin on 11.07.16.
6 | // Copyright © 2016 Grigory Avdyushin. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = [:]) -> Bool {
17 | return true
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/PaymentFontExample/PaymentFontExample/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/PaymentFontExample/PaymentFontExample/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/PaymentFontExample/PaymentFontExample/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/PaymentFontExample/PaymentFontExample/IconCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // IconCell.swift
3 | // PaymentFontExample
4 | //
5 | // Created by Grigory Avdyushin on 11.07.16.
6 | // Copyright © 2016 Grigory Avdyushin. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import PaymentFont
11 |
12 | class IconCell: UITableViewCell {
13 |
14 | @IBOutlet weak var iconLabel: UILabel! {
15 | didSet {
16 | iconLabel.font = PaymentFont.font(32)
17 | }
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/PaymentFontExample/PaymentFontExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/PaymentFontExample/PaymentFontExample/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // PaymentFontExample
4 | //
5 | // Created by Grigory Avdyushin on 11.07.16.
6 | // Copyright © 2016 Grigory Avdyushin. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import PaymentFont
11 |
12 | class ViewController: UITableViewController {
13 |
14 | let model = [
15 | PaymentFont.Symbols.eur,
16 | PaymentFont.Symbols.visa,
17 | PaymentFont.Symbols.creditCard,
18 | PaymentFont.Symbols.unionpay,
19 | PaymentFont.Symbols.bankTransfer,
20 | PaymentFont.Symbols.amazon,
21 | PaymentFont.Symbols.atm
22 | ]
23 |
24 | override func viewDidLoad() {
25 | super.viewDidLoad()
26 | // Do any additional setup after loading the view, typically from a nib.
27 | PaymentFont.preloadFont()
28 | }
29 |
30 | override func didReceiveMemoryWarning() {
31 | super.didReceiveMemoryWarning()
32 | // Dispose of any resources that can be recreated.
33 | }
34 |
35 | }
36 |
37 | extension ViewController {
38 |
39 | override func numberOfSections(in tableView: UITableView) -> Int {
40 | return 1
41 | }
42 |
43 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
44 | return model.count
45 | }
46 |
47 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
48 | let cell = tableView.dequeueReusableCell(withIdentifier: "IconCell", for: indexPath) as! IconCell
49 | cell.iconLabel.text = model[indexPath.row].rawValue
50 | return cell
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PaymentFont
2 | PaymentFont iOS framework
3 |
4 | Wrapper for [paymentfont.io](http://paymentfont.io)
5 |
6 | 
7 |
8 | Usage:
9 |
10 | PaymentFont.font(size: 32) // Returns UIFont with size
11 | PaymentFont.icon(.creditCard) // Returns icon text
12 |
13 | Carthage:
14 |
15 | $ echo "github \"avdyushin/PaymentFont\"" > Cartfile
16 | $ carthage update
17 |
--------------------------------------------------------------------------------
/demo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/avdyushin/PaymentFont/911a0c8e318903582785d2725a6f253f0b183177/demo@2x.png
--------------------------------------------------------------------------------