├── .github
└── FUNDING.yml
├── .gitignore
├── LICENSE
├── README.md
├── TypeStyle.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── swiftpm
│ │ └── Package.resolved
└── xcshareddata
│ └── xcschemes
│ └── TypeStyle.xcscheme
├── TypeStyle
├── About
│ ├── Controllers
│ │ └── AboutViewController.swift
│ └── Views
│ │ ├── AboutButtonView.swift
│ │ ├── AboutLabelView.swift
│ │ ├── ConfettiView.swift
│ │ └── LoadingView.swift
├── Application
│ ├── AppDelegate.swift
│ ├── Extensions
│ │ ├── Notification.Name+Extension.swift
│ │ └── UIColor+Extension.swift
│ ├── Global.swift
│ ├── IAP
│ │ ├── IAPHelper.swift
│ │ └── Products.swift
│ ├── Log.swift
│ ├── MainTabBarController.swift
│ └── Models
│ │ ├── CustomTransforms.swift
│ │ └── Transformer.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-57x57@1x.png
│ │ ├── Icon-App-57x57@2x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-72x72@1x.png
│ │ ├── Icon-App-72x72@2x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ ├── Icon-App-83.5x83.5@2x.png
│ │ ├── Icon-Small-50x50@1x.png
│ │ ├── Icon-Small-50x50@2x.png
│ │ └── ItunesArtwork@2x.png
│ ├── Contents.json
│ └── confetti.imageset
│ │ ├── Contents.json
│ │ └── confetti.pdf
├── Base.lproj
│ └── LaunchScreen.storyboard
├── Generator
│ ├── Controllers
│ │ └── GeneratorViewController.swift
│ ├── Managers
│ │ └── TransformerManager.swift
│ ├── Transformers
│ │ ├── DecorationTransformers.swift
│ │ ├── EmoticonTransformers.swift
│ │ └── StyleTransformers.swift
│ └── Views
│ │ ├── ActionConfirmationView.swift
│ │ ├── InputContainerView.swift
│ │ └── OutputTableViewCell.swift
├── Info.plist
└── TypeStyle.entitlements
├── TypeStyleTests
├── Info.plist
└── StyleFactoryTests.swift
└── media
├── app-store-badge.svg
└── iphone-x-screenshots.png
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | ko_fi: eugeneb
2 | github: ebelinski
3 | custom: ["https://paypal.me/ebelinski"]
4 |
--------------------------------------------------------------------------------
/.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 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xcuserstate
23 |
24 | ## Obj-C/Swift specific
25 | *.hmap
26 | *.ipa
27 | *.dSYM.zip
28 | *.dSYM
29 |
30 | ## Playgrounds
31 | timeline.xctimeline
32 | playground.xcworkspace
33 |
34 | # Swift Package Manager
35 | #
36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
37 | # Packages/
38 | .build/
39 |
40 | # CocoaPods
41 | #
42 | # We recommend against adding the Pods directory to your .gitignore. However
43 | # you should judge for yourself, the pros and cons are mentioned at:
44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
45 | #
46 | Pods/
47 |
48 | # Carthage
49 | #
50 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
51 | # Carthage/Checkouts
52 |
53 | Carthage/Build
54 |
55 | # fastlane
56 | #
57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
58 | # screenshots whenever they are needed.
59 | # For more information about the recommended setup visit:
60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
61 |
62 | fastlane/report.xml
63 | fastlane/Preview.html
64 | fastlane/screenshots
65 | fastlane/test_output
66 |
67 | *.DS_Store
68 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TypeStyle
2 |
3 | [TypeStyle](https://typestyle.app/) is a handy app for iPhone and iPad that generates text using different styles and decorations. It is a native Swift iOS app.
4 |
5 | 
6 |
7 | [](https://itunes.apple.com/us/app/typestyle/id1441019779?ls=1&mt=8)
8 |
9 | ## Features
10 |
11 | * Fun styles like 𝔗𝔥𝔦𝔰, 𝕋𝕙𝕚𝕤, and even sıɥʇ
12 | * Expressive decorations like ¸,ø¤º°°º¤ø,¸ This ¸,ø¤º°°º¤ø,¸
13 | * Favorite your top styles to pin them to the top
14 | * One-click copy to your clipboard
15 | * iPad [Drag and Drop](https://developer.apple.com/ios/drag-and-drop/) support
16 |
17 | ## Getting started
18 |
19 | 1. Install [CocoaPods](http://cocoapods.org/).
20 | 2. Run `pod install` in the root folder of the repository.
21 | 5. Open `TypeStyle.xcworkspace` in Xcode.
22 |
--------------------------------------------------------------------------------
/TypeStyle.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 52;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 2498BA6E263D901700B72F3F /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2498BA6D263D901700B72F3F /* Log.swift */; };
11 | 41159515236E7D860049509F /* StyleFactoryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41159514236E7D860049509F /* StyleFactoryTests.swift */; };
12 | 41159525236E802F0049509F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B66B54912187C4770038C84A /* LaunchScreen.storyboard */; };
13 | 41187B5F245F74BA004C0958 /* LoadingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41187B5E245F74BA004C0958 /* LoadingView.swift */; };
14 | 412DB3A4245E6F3800A91314 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 412DB3A3245E6F3800A91314 /* StoreKit.framework */; };
15 | 412DB3A6245E749300A91314 /* ConfettiView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 412DB3A5245E749300A91314 /* ConfettiView.swift */; };
16 | 412DB3B3245F0FD500A91314 /* IAPHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 412DB3B2245F0FD500A91314 /* IAPHelper.swift */; };
17 | 412DB3B5245F0FEB00A91314 /* Products.swift in Sources */ = {isa = PBXBuildFile; fileRef = 412DB3B4245F0FEB00A91314 /* Products.swift */; };
18 | 412DB3B7245F10D200A91314 /* StyleTransformers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 412DB3B6245F10D200A91314 /* StyleTransformers.swift */; };
19 | 4131C16A245F7C92007626F6 /* Notification.Name+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4131C169245F7C92007626F6 /* Notification.Name+Extension.swift */; };
20 | 4141902923803FC5009D3225 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 4141902823803FC5009D3225 /* SnapKit */; };
21 | 4197FA8F2221D06F000516AA /* CustomTransforms.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4197FA8E2221D06F000516AA /* CustomTransforms.swift */; };
22 | 41D25C7E24553FFA0091F6AB /* MainTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41D25C7D24553FFA0091F6AB /* MainTabBarController.swift */; };
23 | 41D25C802455BEB20091F6AB /* EmoticonTransformers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41D25C7F2455BEB20091F6AB /* EmoticonTransformers.swift */; };
24 | B66B54892187C4750038C84A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B66B54882187C4750038C84A /* AppDelegate.swift */; };
25 | B66B548B2187C4750038C84A /* GeneratorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B66B548A2187C4750038C84A /* GeneratorViewController.swift */; };
26 | B66B54902187C4770038C84A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B66B548F2187C4770038C84A /* Assets.xcassets */; };
27 | B66B54932187C4770038C84A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B66B54912187C4770038C84A /* LaunchScreen.storyboard */; };
28 | B68C6EAB218A3493007CB17A /* TransformerManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B68C6EAA218A3493007CB17A /* TransformerManager.swift */; };
29 | B68C6EAD218A365A007CB17A /* UIColor+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B68C6EAC218A365A007CB17A /* UIColor+Extension.swift */; };
30 | B68C6EAF218A3E63007CB17A /* OutputTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B68C6EAE218A3E63007CB17A /* OutputTableViewCell.swift */; };
31 | B69D280A218A407C00A298A9 /* InputContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B69D2809218A407C00A298A9 /* InputContainerView.swift */; };
32 | B69D2813218A8ACD00A298A9 /* ActionConfirmationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B69D2812218A8ACD00A298A9 /* ActionConfirmationView.swift */; };
33 | B69D281C218BC96E00A298A9 /* DecorationTransformers.swift in Sources */ = {isa = PBXBuildFile; fileRef = B69D281B218BC96E00A298A9 /* DecorationTransformers.swift */; };
34 | B69D281F218BD2E800A298A9 /* Transformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B69D281E218BD2E800A298A9 /* Transformer.swift */; };
35 | B6E91DE621AA19B8003214C9 /* Global.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6E91DE521AA19B8003214C9 /* Global.swift */; };
36 | B6E91DE821AA2FA7003214C9 /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6E91DE721AA2FA7003214C9 /* AboutViewController.swift */; };
37 | B6E91DEA21AA32CD003214C9 /* AboutLabelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6E91DE921AA32CD003214C9 /* AboutLabelView.swift */; };
38 | B6E91DEC21AA3542003214C9 /* AboutButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6E91DEB21AA3542003214C9 /* AboutButtonView.swift */; };
39 | /* End PBXBuildFile section */
40 |
41 | /* Begin PBXContainerItemProxy section */
42 | 4115950F236E7BE40049509F /* PBXContainerItemProxy */ = {
43 | isa = PBXContainerItemProxy;
44 | containerPortal = B66B547D2187C4750038C84A /* Project object */;
45 | proxyType = 1;
46 | remoteGlobalIDString = B66B54842187C4750038C84A;
47 | remoteInfo = TypeStyle;
48 | };
49 | /* End PBXContainerItemProxy section */
50 |
51 | /* Begin PBXFileReference section */
52 | 2498BA6D263D901700B72F3F /* Log.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = ""; };
53 | 4115950A236E7BE40049509F /* TypeStyleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TypeStyleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
54 | 4115950E236E7BE40049509F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
55 | 41159514236E7D860049509F /* StyleFactoryTests.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = StyleFactoryTests.swift; sourceTree = ""; tabWidth = 2; };
56 | 41187B5E245F74BA004C0958 /* LoadingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingView.swift; sourceTree = ""; };
57 | 412DB3A3245E6F3800A91314 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
58 | 412DB3A5245E749300A91314 /* ConfettiView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfettiView.swift; sourceTree = ""; };
59 | 412DB3B0245F0FAF00A91314 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; };
60 | 412DB3B2245F0FD500A91314 /* IAPHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IAPHelper.swift; sourceTree = ""; };
61 | 412DB3B4245F0FEB00A91314 /* Products.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Products.swift; sourceTree = ""; };
62 | 412DB3B6245F10D200A91314 /* StyleTransformers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StyleTransformers.swift; sourceTree = ""; };
63 | 4131C169245F7C92007626F6 /* Notification.Name+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Notification.Name+Extension.swift"; sourceTree = ""; };
64 | 41588F6A2357CBC6004E78FD /* TypeStyle.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TypeStyle.entitlements; sourceTree = ""; };
65 | 4197FA8E2221D06F000516AA /* CustomTransforms.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = CustomTransforms.swift; sourceTree = ""; tabWidth = 2; };
66 | 41D25C7D24553FFA0091F6AB /* MainTabBarController.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = MainTabBarController.swift; sourceTree = ""; tabWidth = 2; };
67 | 41D25C7F2455BEB20091F6AB /* EmoticonTransformers.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = EmoticonTransformers.swift; sourceTree = ""; tabWidth = 2; };
68 | B66B54852187C4750038C84A /* TypeStyle.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TypeStyle.app; sourceTree = BUILT_PRODUCTS_DIR; };
69 | B66B54882187C4750038C84A /* AppDelegate.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; tabWidth = 2; };
70 | B66B548A2187C4750038C84A /* GeneratorViewController.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = GeneratorViewController.swift; sourceTree = ""; tabWidth = 2; };
71 | B66B548F2187C4770038C84A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
72 | B66B54922187C4770038C84A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
73 | B66B54942187C4770038C84A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
74 | B68C6EAA218A3493007CB17A /* TransformerManager.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = TransformerManager.swift; sourceTree = ""; tabWidth = 2; };
75 | B68C6EAC218A365A007CB17A /* UIColor+Extension.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = "UIColor+Extension.swift"; sourceTree = ""; tabWidth = 2; };
76 | B68C6EAE218A3E63007CB17A /* OutputTableViewCell.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = OutputTableViewCell.swift; sourceTree = ""; tabWidth = 2; };
77 | B69D2809218A407C00A298A9 /* InputContainerView.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = InputContainerView.swift; sourceTree = ""; tabWidth = 2; };
78 | B69D2812218A8ACD00A298A9 /* ActionConfirmationView.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = ActionConfirmationView.swift; sourceTree = ""; tabWidth = 2; };
79 | B69D281B218BC96E00A298A9 /* DecorationTransformers.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = DecorationTransformers.swift; sourceTree = ""; tabWidth = 2; };
80 | B69D281E218BD2E800A298A9 /* Transformer.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = Transformer.swift; sourceTree = ""; tabWidth = 2; };
81 | B6E91DE521AA19B8003214C9 /* Global.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = Global.swift; sourceTree = ""; tabWidth = 2; };
82 | B6E91DE721AA2FA7003214C9 /* AboutViewController.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = ""; tabWidth = 2; };
83 | B6E91DE921AA32CD003214C9 /* AboutLabelView.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = AboutLabelView.swift; sourceTree = ""; tabWidth = 2; };
84 | B6E91DEB21AA3542003214C9 /* AboutButtonView.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = AboutButtonView.swift; sourceTree = ""; tabWidth = 2; };
85 | /* End PBXFileReference section */
86 |
87 | /* Begin PBXFrameworksBuildPhase section */
88 | 41159507236E7BE40049509F /* Frameworks */ = {
89 | isa = PBXFrameworksBuildPhase;
90 | buildActionMask = 2147483647;
91 | files = (
92 | );
93 | runOnlyForDeploymentPostprocessing = 0;
94 | };
95 | B66B54822187C4750038C84A /* Frameworks */ = {
96 | isa = PBXFrameworksBuildPhase;
97 | buildActionMask = 2147483647;
98 | files = (
99 | 4141902923803FC5009D3225 /* SnapKit in Frameworks */,
100 | 412DB3A4245E6F3800A91314 /* StoreKit.framework in Frameworks */,
101 | );
102 | runOnlyForDeploymentPostprocessing = 0;
103 | };
104 | /* End PBXFrameworksBuildPhase section */
105 |
106 | /* Begin PBXGroup section */
107 | 4115950B236E7BE40049509F /* TypeStyleTests */ = {
108 | isa = PBXGroup;
109 | children = (
110 | 41159514236E7D860049509F /* StyleFactoryTests.swift */,
111 | 4115950E236E7BE40049509F /* Info.plist */,
112 | );
113 | path = TypeStyleTests;
114 | sourceTree = "";
115 | };
116 | 412DB3A2245E6F3800A91314 /* Frameworks */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 412DB3A3245E6F3800A91314 /* StoreKit.framework */,
120 | );
121 | name = Frameworks;
122 | sourceTree = "";
123 | };
124 | 412DB3A7245F0EAA00A91314 /* Application */ = {
125 | isa = PBXGroup;
126 | children = (
127 | 412DB3A8245F0EDD00A91314 /* Extensions */,
128 | 412DB3B1245F0FCB00A91314 /* IAP */,
129 | B69D280D218A7A3800A298A9 /* Models */,
130 | B66B54882187C4750038C84A /* AppDelegate.swift */,
131 | B6E91DE521AA19B8003214C9 /* Global.swift */,
132 | 2498BA6D263D901700B72F3F /* Log.swift */,
133 | 41D25C7D24553FFA0091F6AB /* MainTabBarController.swift */,
134 | );
135 | path = Application;
136 | sourceTree = "";
137 | };
138 | 412DB3A8245F0EDD00A91314 /* Extensions */ = {
139 | isa = PBXGroup;
140 | children = (
141 | B68C6EAC218A365A007CB17A /* UIColor+Extension.swift */,
142 | 4131C169245F7C92007626F6 /* Notification.Name+Extension.swift */,
143 | );
144 | path = Extensions;
145 | sourceTree = "";
146 | };
147 | 412DB3A9245F0F1F00A91314 /* Generator */ = {
148 | isa = PBXGroup;
149 | children = (
150 | 412DB3AC245F0F5700A91314 /* Controllers */,
151 | B69D281D218BCA4600A298A9 /* Transformers */,
152 | 412DB3AD245F0F6200A91314 /* Managers */,
153 | 412DB3AB245F0F5100A91314 /* Views */,
154 | );
155 | path = Generator;
156 | sourceTree = "";
157 | };
158 | 412DB3AA245F0F2200A91314 /* About */ = {
159 | isa = PBXGroup;
160 | children = (
161 | 412DB3AF245F0F7700A91314 /* Controllers */,
162 | 412DB3AE245F0F6D00A91314 /* Views */,
163 | );
164 | path = About;
165 | sourceTree = "";
166 | };
167 | 412DB3AB245F0F5100A91314 /* Views */ = {
168 | isa = PBXGroup;
169 | children = (
170 | B69D2809218A407C00A298A9 /* InputContainerView.swift */,
171 | B69D2812218A8ACD00A298A9 /* ActionConfirmationView.swift */,
172 | B68C6EAE218A3E63007CB17A /* OutputTableViewCell.swift */,
173 | );
174 | path = Views;
175 | sourceTree = "";
176 | };
177 | 412DB3AC245F0F5700A91314 /* Controllers */ = {
178 | isa = PBXGroup;
179 | children = (
180 | B66B548A2187C4750038C84A /* GeneratorViewController.swift */,
181 | );
182 | path = Controllers;
183 | sourceTree = "";
184 | };
185 | 412DB3AD245F0F6200A91314 /* Managers */ = {
186 | isa = PBXGroup;
187 | children = (
188 | B68C6EAA218A3493007CB17A /* TransformerManager.swift */,
189 | );
190 | path = Managers;
191 | sourceTree = "";
192 | };
193 | 412DB3AE245F0F6D00A91314 /* Views */ = {
194 | isa = PBXGroup;
195 | children = (
196 | B6E91DE921AA32CD003214C9 /* AboutLabelView.swift */,
197 | B6E91DEB21AA3542003214C9 /* AboutButtonView.swift */,
198 | 412DB3A5245E749300A91314 /* ConfettiView.swift */,
199 | 41187B5E245F74BA004C0958 /* LoadingView.swift */,
200 | );
201 | path = Views;
202 | sourceTree = "";
203 | };
204 | 412DB3AF245F0F7700A91314 /* Controllers */ = {
205 | isa = PBXGroup;
206 | children = (
207 | B6E91DE721AA2FA7003214C9 /* AboutViewController.swift */,
208 | );
209 | path = Controllers;
210 | sourceTree = "";
211 | };
212 | 412DB3B1245F0FCB00A91314 /* IAP */ = {
213 | isa = PBXGroup;
214 | children = (
215 | 412DB3B2245F0FD500A91314 /* IAPHelper.swift */,
216 | 412DB3B4245F0FEB00A91314 /* Products.swift */,
217 | );
218 | path = IAP;
219 | sourceTree = "";
220 | };
221 | B66B547C2187C4750038C84A = {
222 | isa = PBXGroup;
223 | children = (
224 | 412DB3B0245F0FAF00A91314 /* README.md */,
225 | B66B54872187C4750038C84A /* TypeStyle */,
226 | 4115950B236E7BE40049509F /* TypeStyleTests */,
227 | B66B54862187C4750038C84A /* Products */,
228 | 412DB3A2245E6F3800A91314 /* Frameworks */,
229 | );
230 | sourceTree = "";
231 | };
232 | B66B54862187C4750038C84A /* Products */ = {
233 | isa = PBXGroup;
234 | children = (
235 | B66B54852187C4750038C84A /* TypeStyle.app */,
236 | 4115950A236E7BE40049509F /* TypeStyleTests.xctest */,
237 | );
238 | name = Products;
239 | sourceTree = "";
240 | };
241 | B66B54872187C4750038C84A /* TypeStyle */ = {
242 | isa = PBXGroup;
243 | children = (
244 | 412DB3A7245F0EAA00A91314 /* Application */,
245 | 412DB3A9245F0F1F00A91314 /* Generator */,
246 | 412DB3AA245F0F2200A91314 /* About */,
247 | B66B548F2187C4770038C84A /* Assets.xcassets */,
248 | B66B54912187C4770038C84A /* LaunchScreen.storyboard */,
249 | B66B54942187C4770038C84A /* Info.plist */,
250 | 41588F6A2357CBC6004E78FD /* TypeStyle.entitlements */,
251 | );
252 | path = TypeStyle;
253 | sourceTree = "";
254 | };
255 | B69D280D218A7A3800A298A9 /* Models */ = {
256 | isa = PBXGroup;
257 | children = (
258 | 4197FA8E2221D06F000516AA /* CustomTransforms.swift */,
259 | B69D281E218BD2E800A298A9 /* Transformer.swift */,
260 | );
261 | path = Models;
262 | sourceTree = "";
263 | };
264 | B69D281D218BCA4600A298A9 /* Transformers */ = {
265 | isa = PBXGroup;
266 | children = (
267 | 412DB3B6245F10D200A91314 /* StyleTransformers.swift */,
268 | B69D281B218BC96E00A298A9 /* DecorationTransformers.swift */,
269 | 41D25C7F2455BEB20091F6AB /* EmoticonTransformers.swift */,
270 | );
271 | path = Transformers;
272 | sourceTree = "";
273 | };
274 | /* End PBXGroup section */
275 |
276 | /* Begin PBXNativeTarget section */
277 | 41159509236E7BE40049509F /* TypeStyleTests */ = {
278 | isa = PBXNativeTarget;
279 | buildConfigurationList = 41159513236E7BE40049509F /* Build configuration list for PBXNativeTarget "TypeStyleTests" */;
280 | buildPhases = (
281 | 41159506236E7BE40049509F /* Sources */,
282 | 41159507236E7BE40049509F /* Frameworks */,
283 | 41159508236E7BE40049509F /* Resources */,
284 | );
285 | buildRules = (
286 | );
287 | dependencies = (
288 | 41159510236E7BE40049509F /* PBXTargetDependency */,
289 | );
290 | name = TypeStyleTests;
291 | packageProductDependencies = (
292 | );
293 | productName = TypeStyleTests;
294 | productReference = 4115950A236E7BE40049509F /* TypeStyleTests.xctest */;
295 | productType = "com.apple.product-type.bundle.unit-test";
296 | };
297 | B66B54842187C4750038C84A /* TypeStyle */ = {
298 | isa = PBXNativeTarget;
299 | buildConfigurationList = B66B54972187C4770038C84A /* Build configuration list for PBXNativeTarget "TypeStyle" */;
300 | buildPhases = (
301 | B66B54812187C4750038C84A /* Sources */,
302 | B66B54822187C4750038C84A /* Frameworks */,
303 | B66B54832187C4750038C84A /* Resources */,
304 | );
305 | buildRules = (
306 | );
307 | dependencies = (
308 | );
309 | name = TypeStyle;
310 | packageProductDependencies = (
311 | 4141902823803FC5009D3225 /* SnapKit */,
312 | );
313 | productName = TypeStyle;
314 | productReference = B66B54852187C4750038C84A /* TypeStyle.app */;
315 | productType = "com.apple.product-type.application";
316 | };
317 | /* End PBXNativeTarget section */
318 |
319 | /* Begin PBXProject section */
320 | B66B547D2187C4750038C84A /* Project object */ = {
321 | isa = PBXProject;
322 | attributes = {
323 | LastSwiftUpdateCheck = 1120;
324 | LastUpgradeCheck = 1230;
325 | ORGANIZATIONNAME = "Eugeniu Belinski";
326 | TargetAttributes = {
327 | 41159509236E7BE40049509F = {
328 | CreatedOnToolsVersion = 11.2;
329 | TestTargetID = B66B54842187C4750038C84A;
330 | };
331 | B66B54842187C4750038C84A = {
332 | CreatedOnToolsVersion = 10.0;
333 | LastSwiftMigration = 1020;
334 | };
335 | };
336 | };
337 | buildConfigurationList = B66B54802187C4750038C84A /* Build configuration list for PBXProject "TypeStyle" */;
338 | compatibilityVersion = "Xcode 9.3";
339 | developmentRegion = en;
340 | hasScannedForEncodings = 0;
341 | knownRegions = (
342 | en,
343 | Base,
344 | );
345 | mainGroup = B66B547C2187C4750038C84A;
346 | packageReferences = (
347 | 4141902723803FC5009D3225 /* XCRemoteSwiftPackageReference "SnapKit" */,
348 | );
349 | productRefGroup = B66B54862187C4750038C84A /* Products */;
350 | projectDirPath = "";
351 | projectRoot = "";
352 | targets = (
353 | B66B54842187C4750038C84A /* TypeStyle */,
354 | 41159509236E7BE40049509F /* TypeStyleTests */,
355 | );
356 | };
357 | /* End PBXProject section */
358 |
359 | /* Begin PBXResourcesBuildPhase section */
360 | 41159508236E7BE40049509F /* Resources */ = {
361 | isa = PBXResourcesBuildPhase;
362 | buildActionMask = 2147483647;
363 | files = (
364 | 41159525236E802F0049509F /* LaunchScreen.storyboard in Resources */,
365 | );
366 | runOnlyForDeploymentPostprocessing = 0;
367 | };
368 | B66B54832187C4750038C84A /* Resources */ = {
369 | isa = PBXResourcesBuildPhase;
370 | buildActionMask = 2147483647;
371 | files = (
372 | B66B54932187C4770038C84A /* LaunchScreen.storyboard in Resources */,
373 | B66B54902187C4770038C84A /* Assets.xcassets in Resources */,
374 | );
375 | runOnlyForDeploymentPostprocessing = 0;
376 | };
377 | /* End PBXResourcesBuildPhase section */
378 |
379 | /* Begin PBXSourcesBuildPhase section */
380 | 41159506236E7BE40049509F /* Sources */ = {
381 | isa = PBXSourcesBuildPhase;
382 | buildActionMask = 2147483647;
383 | files = (
384 | 41159515236E7D860049509F /* StyleFactoryTests.swift in Sources */,
385 | );
386 | runOnlyForDeploymentPostprocessing = 0;
387 | };
388 | B66B54812187C4750038C84A /* Sources */ = {
389 | isa = PBXSourcesBuildPhase;
390 | buildActionMask = 2147483647;
391 | files = (
392 | B66B548B2187C4750038C84A /* GeneratorViewController.swift in Sources */,
393 | 2498BA6E263D901700B72F3F /* Log.swift in Sources */,
394 | B6E91DE621AA19B8003214C9 /* Global.swift in Sources */,
395 | 4131C16A245F7C92007626F6 /* Notification.Name+Extension.swift in Sources */,
396 | B66B54892187C4750038C84A /* AppDelegate.swift in Sources */,
397 | B69D2813218A8ACD00A298A9 /* ActionConfirmationView.swift in Sources */,
398 | B68C6EAB218A3493007CB17A /* TransformerManager.swift in Sources */,
399 | 41187B5F245F74BA004C0958 /* LoadingView.swift in Sources */,
400 | 412DB3A6245E749300A91314 /* ConfettiView.swift in Sources */,
401 | 412DB3B7245F10D200A91314 /* StyleTransformers.swift in Sources */,
402 | B6E91DEA21AA32CD003214C9 /* AboutLabelView.swift in Sources */,
403 | B6E91DE821AA2FA7003214C9 /* AboutViewController.swift in Sources */,
404 | B69D281C218BC96E00A298A9 /* DecorationTransformers.swift in Sources */,
405 | B6E91DEC21AA3542003214C9 /* AboutButtonView.swift in Sources */,
406 | 412DB3B3245F0FD500A91314 /* IAPHelper.swift in Sources */,
407 | 41D25C7E24553FFA0091F6AB /* MainTabBarController.swift in Sources */,
408 | B69D281F218BD2E800A298A9 /* Transformer.swift in Sources */,
409 | B68C6EAD218A365A007CB17A /* UIColor+Extension.swift in Sources */,
410 | 41D25C802455BEB20091F6AB /* EmoticonTransformers.swift in Sources */,
411 | B68C6EAF218A3E63007CB17A /* OutputTableViewCell.swift in Sources */,
412 | 412DB3B5245F0FEB00A91314 /* Products.swift in Sources */,
413 | B69D280A218A407C00A298A9 /* InputContainerView.swift in Sources */,
414 | 4197FA8F2221D06F000516AA /* CustomTransforms.swift in Sources */,
415 | );
416 | runOnlyForDeploymentPostprocessing = 0;
417 | };
418 | /* End PBXSourcesBuildPhase section */
419 |
420 | /* Begin PBXTargetDependency section */
421 | 41159510236E7BE40049509F /* PBXTargetDependency */ = {
422 | isa = PBXTargetDependency;
423 | target = B66B54842187C4750038C84A /* TypeStyle */;
424 | targetProxy = 4115950F236E7BE40049509F /* PBXContainerItemProxy */;
425 | };
426 | /* End PBXTargetDependency section */
427 |
428 | /* Begin PBXVariantGroup section */
429 | B66B54912187C4770038C84A /* LaunchScreen.storyboard */ = {
430 | isa = PBXVariantGroup;
431 | children = (
432 | B66B54922187C4770038C84A /* Base */,
433 | );
434 | name = LaunchScreen.storyboard;
435 | sourceTree = "";
436 | };
437 | /* End PBXVariantGroup section */
438 |
439 | /* Begin XCBuildConfiguration section */
440 | 41159511236E7BE40049509F /* Debug */ = {
441 | isa = XCBuildConfiguration;
442 | buildSettings = {
443 | BUNDLE_LOADER = "$(TEST_HOST)";
444 | CODE_SIGN_STYLE = Automatic;
445 | DEVELOPMENT_TEAM = H7ATB2ZBVD;
446 | INFOPLIST_FILE = TypeStyleTests/Info.plist;
447 | IPHONEOS_DEPLOYMENT_TARGET = 16.0;
448 | LD_RUNPATH_SEARCH_PATHS = (
449 | "$(inherited)",
450 | "@executable_path/Frameworks",
451 | "@loader_path/Frameworks",
452 | );
453 | PRODUCT_BUNDLE_IDENTIFIER = com.tapmoko.TypeStyleTests;
454 | PRODUCT_NAME = "$(TARGET_NAME)";
455 | SWIFT_VERSION = 5.0;
456 | TARGETED_DEVICE_FAMILY = "1,2";
457 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TypeStyle.app/TypeStyle";
458 | };
459 | name = Debug;
460 | };
461 | 41159512236E7BE40049509F /* Release */ = {
462 | isa = XCBuildConfiguration;
463 | buildSettings = {
464 | BUNDLE_LOADER = "$(TEST_HOST)";
465 | CODE_SIGN_STYLE = Automatic;
466 | DEVELOPMENT_TEAM = H7ATB2ZBVD;
467 | INFOPLIST_FILE = TypeStyleTests/Info.plist;
468 | IPHONEOS_DEPLOYMENT_TARGET = 16.0;
469 | LD_RUNPATH_SEARCH_PATHS = (
470 | "$(inherited)",
471 | "@executable_path/Frameworks",
472 | "@loader_path/Frameworks",
473 | );
474 | PRODUCT_BUNDLE_IDENTIFIER = com.tapmoko.TypeStyleTests;
475 | PRODUCT_NAME = "$(TARGET_NAME)";
476 | SWIFT_VERSION = 5.0;
477 | TARGETED_DEVICE_FAMILY = "1,2";
478 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TypeStyle.app/TypeStyle";
479 | };
480 | name = Release;
481 | };
482 | B66B54952187C4770038C84A /* Debug */ = {
483 | isa = XCBuildConfiguration;
484 | buildSettings = {
485 | ALWAYS_SEARCH_USER_PATHS = NO;
486 | CLANG_ANALYZER_NONNULL = YES;
487 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
488 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
489 | CLANG_CXX_LIBRARY = "libc++";
490 | CLANG_ENABLE_MODULES = YES;
491 | CLANG_ENABLE_OBJC_ARC = YES;
492 | CLANG_ENABLE_OBJC_WEAK = YES;
493 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
494 | CLANG_WARN_BOOL_CONVERSION = YES;
495 | CLANG_WARN_COMMA = YES;
496 | CLANG_WARN_CONSTANT_CONVERSION = YES;
497 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
498 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
499 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
500 | CLANG_WARN_EMPTY_BODY = YES;
501 | CLANG_WARN_ENUM_CONVERSION = YES;
502 | CLANG_WARN_INFINITE_RECURSION = YES;
503 | CLANG_WARN_INT_CONVERSION = YES;
504 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
505 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
506 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
507 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
508 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
509 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
510 | CLANG_WARN_STRICT_PROTOTYPES = YES;
511 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
512 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
513 | CLANG_WARN_UNREACHABLE_CODE = YES;
514 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
515 | CODE_SIGN_IDENTITY = "iPhone Developer";
516 | COPY_PHASE_STRIP = NO;
517 | DEBUG_INFORMATION_FORMAT = dwarf;
518 | ENABLE_STRICT_OBJC_MSGSEND = YES;
519 | ENABLE_TESTABILITY = YES;
520 | GCC_C_LANGUAGE_STANDARD = gnu11;
521 | GCC_DYNAMIC_NO_PIC = NO;
522 | GCC_NO_COMMON_BLOCKS = YES;
523 | GCC_OPTIMIZATION_LEVEL = 0;
524 | GCC_PREPROCESSOR_DEFINITIONS = (
525 | "DEBUG=1",
526 | "$(inherited)",
527 | );
528 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
529 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
530 | GCC_WARN_UNDECLARED_SELECTOR = YES;
531 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
532 | GCC_WARN_UNUSED_FUNCTION = YES;
533 | GCC_WARN_UNUSED_VARIABLE = YES;
534 | IPHONEOS_DEPLOYMENT_TARGET = 16.0;
535 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
536 | MTL_FAST_MATH = YES;
537 | ONLY_ACTIVE_ARCH = YES;
538 | SDKROOT = iphoneos;
539 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
540 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
541 | };
542 | name = Debug;
543 | };
544 | B66B54962187C4770038C84A /* Release */ = {
545 | isa = XCBuildConfiguration;
546 | buildSettings = {
547 | ALWAYS_SEARCH_USER_PATHS = NO;
548 | CLANG_ANALYZER_NONNULL = YES;
549 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
550 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
551 | CLANG_CXX_LIBRARY = "libc++";
552 | CLANG_ENABLE_MODULES = YES;
553 | CLANG_ENABLE_OBJC_ARC = YES;
554 | CLANG_ENABLE_OBJC_WEAK = YES;
555 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
556 | CLANG_WARN_BOOL_CONVERSION = YES;
557 | CLANG_WARN_COMMA = YES;
558 | CLANG_WARN_CONSTANT_CONVERSION = YES;
559 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
560 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
561 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
562 | CLANG_WARN_EMPTY_BODY = YES;
563 | CLANG_WARN_ENUM_CONVERSION = YES;
564 | CLANG_WARN_INFINITE_RECURSION = YES;
565 | CLANG_WARN_INT_CONVERSION = YES;
566 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
567 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
568 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
569 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
570 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
571 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
572 | CLANG_WARN_STRICT_PROTOTYPES = YES;
573 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
574 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
575 | CLANG_WARN_UNREACHABLE_CODE = YES;
576 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
577 | CODE_SIGN_IDENTITY = "iPhone Developer";
578 | COPY_PHASE_STRIP = NO;
579 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
580 | ENABLE_NS_ASSERTIONS = NO;
581 | ENABLE_STRICT_OBJC_MSGSEND = YES;
582 | GCC_C_LANGUAGE_STANDARD = gnu11;
583 | GCC_NO_COMMON_BLOCKS = YES;
584 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
585 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
586 | GCC_WARN_UNDECLARED_SELECTOR = YES;
587 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
588 | GCC_WARN_UNUSED_FUNCTION = YES;
589 | GCC_WARN_UNUSED_VARIABLE = YES;
590 | IPHONEOS_DEPLOYMENT_TARGET = 16.0;
591 | MTL_ENABLE_DEBUG_INFO = NO;
592 | MTL_FAST_MATH = YES;
593 | SDKROOT = iphoneos;
594 | SWIFT_COMPILATION_MODE = wholemodule;
595 | SWIFT_OPTIMIZATION_LEVEL = "-O";
596 | VALIDATE_PRODUCT = YES;
597 | };
598 | name = Release;
599 | };
600 | B66B54982187C4770038C84A /* Debug */ = {
601 | isa = XCBuildConfiguration;
602 | buildSettings = {
603 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
604 | CODE_SIGN_ENTITLEMENTS = TypeStyle/TypeStyle.entitlements;
605 | CODE_SIGN_STYLE = Automatic;
606 | CURRENT_PROJECT_VERSION = 16;
607 | DEVELOPMENT_TEAM = H7ATB2ZBVD;
608 | INFOPLIST_FILE = TypeStyle/Info.plist;
609 | IPHONEOS_DEPLOYMENT_TARGET = 16.0;
610 | LD_RUNPATH_SEARCH_PATHS = (
611 | "$(inherited)",
612 | "@executable_path/Frameworks",
613 | );
614 | MARKETING_VERSION = 1.4.5;
615 | PRODUCT_BUNDLE_IDENTIFIER = com.ebelinski.TypeStyle;
616 | PRODUCT_NAME = "$(TARGET_NAME)";
617 | SUPPORTS_MACCATALYST = YES;
618 | SWIFT_VERSION = 5.0;
619 | TARGETED_DEVICE_FAMILY = "1,2";
620 | };
621 | name = Debug;
622 | };
623 | B66B54992187C4770038C84A /* Release */ = {
624 | isa = XCBuildConfiguration;
625 | buildSettings = {
626 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
627 | CODE_SIGN_ENTITLEMENTS = TypeStyle/TypeStyle.entitlements;
628 | CODE_SIGN_STYLE = Automatic;
629 | CURRENT_PROJECT_VERSION = 16;
630 | DEVELOPMENT_TEAM = H7ATB2ZBVD;
631 | INFOPLIST_FILE = TypeStyle/Info.plist;
632 | IPHONEOS_DEPLOYMENT_TARGET = 16.0;
633 | LD_RUNPATH_SEARCH_PATHS = (
634 | "$(inherited)",
635 | "@executable_path/Frameworks",
636 | );
637 | MARKETING_VERSION = 1.4.5;
638 | PRODUCT_BUNDLE_IDENTIFIER = com.ebelinski.TypeStyle;
639 | PRODUCT_NAME = "$(TARGET_NAME)";
640 | SUPPORTS_MACCATALYST = YES;
641 | SWIFT_VERSION = 5.0;
642 | TARGETED_DEVICE_FAMILY = "1,2";
643 | };
644 | name = Release;
645 | };
646 | /* End XCBuildConfiguration section */
647 |
648 | /* Begin XCConfigurationList section */
649 | 41159513236E7BE40049509F /* Build configuration list for PBXNativeTarget "TypeStyleTests" */ = {
650 | isa = XCConfigurationList;
651 | buildConfigurations = (
652 | 41159511236E7BE40049509F /* Debug */,
653 | 41159512236E7BE40049509F /* Release */,
654 | );
655 | defaultConfigurationIsVisible = 0;
656 | defaultConfigurationName = Release;
657 | };
658 | B66B54802187C4750038C84A /* Build configuration list for PBXProject "TypeStyle" */ = {
659 | isa = XCConfigurationList;
660 | buildConfigurations = (
661 | B66B54952187C4770038C84A /* Debug */,
662 | B66B54962187C4770038C84A /* Release */,
663 | );
664 | defaultConfigurationIsVisible = 0;
665 | defaultConfigurationName = Release;
666 | };
667 | B66B54972187C4770038C84A /* Build configuration list for PBXNativeTarget "TypeStyle" */ = {
668 | isa = XCConfigurationList;
669 | buildConfigurations = (
670 | B66B54982187C4770038C84A /* Debug */,
671 | B66B54992187C4770038C84A /* Release */,
672 | );
673 | defaultConfigurationIsVisible = 0;
674 | defaultConfigurationName = Release;
675 | };
676 | /* End XCConfigurationList section */
677 |
678 | /* Begin XCRemoteSwiftPackageReference section */
679 | 4141902723803FC5009D3225 /* XCRemoteSwiftPackageReference "SnapKit" */ = {
680 | isa = XCRemoteSwiftPackageReference;
681 | repositoryURL = "https://github.com/SnapKit/SnapKit";
682 | requirement = {
683 | kind = upToNextMajorVersion;
684 | minimumVersion = 5.0.1;
685 | };
686 | };
687 | /* End XCRemoteSwiftPackageReference section */
688 |
689 | /* Begin XCSwiftPackageProductDependency section */
690 | 4141902823803FC5009D3225 /* SnapKit */ = {
691 | isa = XCSwiftPackageProductDependency;
692 | package = 4141902723803FC5009D3225 /* XCRemoteSwiftPackageReference "SnapKit" */;
693 | productName = SnapKit;
694 | };
695 | /* End XCSwiftPackageProductDependency section */
696 | };
697 | rootObject = B66B547D2187C4750038C84A /* Project object */;
698 | }
699 |
--------------------------------------------------------------------------------
/TypeStyle.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TypeStyle.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TypeStyle.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "pins" : [
3 | {
4 | "identity" : "snapkit",
5 | "kind" : "remoteSourceControl",
6 | "location" : "https://github.com/SnapKit/SnapKit",
7 | "state" : {
8 | "revision" : "d458564516e5676af9c70b4f4b2a9178294f1bc6",
9 | "version" : "5.0.1"
10 | }
11 | }
12 | ],
13 | "version" : 2
14 | }
15 |
--------------------------------------------------------------------------------
/TypeStyle.xcodeproj/xcshareddata/xcschemes/TypeStyle.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/TypeStyle/About/Controllers/AboutViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import SafariServices
3 | import StoreKit
4 |
5 | class AboutViewController: UIViewController {
6 |
7 | // MARK: - Static variables
8 |
9 | static let priceFormatter: NumberFormatter = {
10 | let formatter = NumberFormatter()
11 | formatter.formatterBehavior = .behavior10_4
12 | formatter.numberStyle = .currency
13 | return formatter
14 | }()
15 |
16 | // MARK: - Instance variables
17 |
18 | var confettiView: ConfettiView?
19 |
20 | let loadingView = LoadingView()
21 |
22 | let tipMessages = [
23 | "TypeStyle is ad-free, tracker-free, and free of charge! Instead, I rely on your support to fund its development. Please consider leaving a tip in the Tip Jar.",
24 | "Thank you so much for tipping! 💛",
25 | "Another tip?? You're the best!\n❤️🧡💛💚💙💜",
26 | "You are the reason there are no ads or trackers on this app. 😎",
27 | "Maybe some more confetti? 🤔",
28 | "Ok maybe a lot more confetti. 😄",
29 | "At this point we'll just keep increasing the confetti. 😛 Thanks again! 🥰",
30 | ]
31 |
32 | lazy var tipLabelView = AboutLabelView(text: tipMessages[0])
33 | lazy var tipButtonView = AboutButtonView(text: "Tip", kind: .tip)
34 |
35 | let scrollView = UIScrollView()
36 |
37 | lazy var stackView: UIStackView = {
38 | let stackView = UIStackView(arrangedSubviews: [
39 | AboutLabelView(text: "TypeStyle is an app created by me, Eugene Belinski."),
40 | AboutButtonView(text: "My Website", kind: .link("https://ebelinski.com")),
41 | tipLabelView,
42 | tipButtonView,
43 | AboutLabelView(text: "TypeStyle is open source! It is written in Swift 5, and released under the GNU-GPL 3.0 license."),
44 | AboutButtonView(text: "View Source", kind: .link("https://github.com/ebelinski/typestyle-ios")),
45 | AboutLabelView(text: "The TypeStyle privacy policy is available here:"),
46 | AboutButtonView(text: "Privacy Policy", kind: .link("https://typestyle.app/privacy-policy"))
47 | ])
48 |
49 | stackView.alignment = .fill
50 | stackView.axis = .vertical
51 | stackView.spacing = 0
52 | stackView.subviews.forEach { ($0 as? AboutButtonView)?.delegate = self }
53 |
54 | return stackView
55 | }()
56 |
57 | // MARK: - Methods
58 |
59 | override func viewDidLoad() {
60 | super.viewDidLoad()
61 |
62 | view.backgroundColor = .appBackground
63 |
64 | // Set up scroll view
65 |
66 | view.addSubview(scrollView)
67 | scrollView.snp.makeConstraints { make in
68 | make.edges.equalTo(view.safeAreaLayoutGuide)
69 | }
70 |
71 | // Set up stack
72 |
73 | stackView.backgroundColor = .appBackground
74 | scrollView.addSubview(stackView)
75 | stackView.snp.makeConstraints { make in
76 | make.edges.equalTo(scrollView)
77 | make.width.equalTo(view.safeAreaLayoutGuide)
78 | }
79 |
80 | // Tip
81 | NotificationCenter.default.addObserver(self,
82 | selector: #selector(handlePurchaseSuccess(_:)),
83 | name: Notification.Name.IAP.purchaseSuccess,
84 | object: nil)
85 |
86 | NotificationCenter.default.addObserver(self,
87 | selector: #selector(handlePurchaseCancelled(_:)),
88 | name: Notification.Name.IAP.purchaseCancelled,
89 | object: nil)
90 |
91 | NotificationCenter.default.addObserver(self,
92 | selector: #selector(handlePurchaseFailure(_:)),
93 | name: Notification.Name.IAP.purchaseFailed,
94 | object: nil)
95 | }
96 |
97 | override func viewWillAppear(_ animated: Bool) {
98 | super.viewWillAppear(animated)
99 |
100 | guard let product = Products.tipProducts.first else {
101 | removeTipButton()
102 | return
103 | }
104 | AboutViewController.priceFormatter.locale = product.priceLocale
105 | guard let price = AboutViewController.priceFormatter.string(from: product.price) else {
106 | removeTipButton()
107 | return
108 | }
109 |
110 | tipButtonView.set(text: "\(price) Tip")
111 | }
112 |
113 | func removeTipButton() {
114 | tipLabelView.removeFromSuperview()
115 | tipButtonView.removeFromSuperview()
116 | }
117 |
118 | @objc func handlePurchaseSuccess(_ notification: Notification) {
119 | guard let productID = notification.object as? String else {
120 | log.error("Could not get productID from purchase notification")
121 | return
122 | }
123 | log.info("Got purchase notification for productID \(productID)")
124 |
125 | confirmTipPurchase()
126 | }
127 |
128 | @objc func handlePurchaseCancelled(_ notification: Notification) {
129 | stopLoadingView()
130 | }
131 |
132 | @objc func handlePurchaseFailure(_ notification: Notification) {
133 | stopLoadingView()
134 | alert(errorMessage: "An unknown error occurred. Please try again later.")
135 | }
136 |
137 | private func confirmTipPurchase() {
138 | stopLoadingView()
139 | initializeConfettiView()
140 |
141 | let oldMessageIndex = tipMessages.firstIndex(of: tipLabelView.label.text ?? "") ?? 0
142 | let newMessageIndex = oldMessageIndex + 1
143 |
144 | if tipMessages.count - 1 >= newMessageIndex {
145 | tipLabelView.label.text = tipMessages[newMessageIndex]
146 | }
147 |
148 | if newMessageIndex >= 4 {
149 | confettiView?.increase()
150 | }
151 | }
152 |
153 | private func initializeConfettiView() {
154 | guard confettiView == nil else { return }
155 |
156 | confettiView = ConfettiView()
157 | confettiView?.alpha = 0
158 | confettiView?.isUserInteractionEnabled = false
159 |
160 | view.addSubview(confettiView!)
161 | confettiView?.snp.makeConstraints { make in
162 | make.edges.equalToSuperview()
163 | }
164 |
165 | confettiView?.start()
166 |
167 | UIView.animate(withDuration: 0.3, animations: {
168 | self.confettiView?.alpha = 1
169 | }, completion: nil)
170 | }
171 |
172 | private func startLoadingView() {
173 | loadingView.start()
174 |
175 | view.addSubview(loadingView)
176 |
177 | loadingView.snp.makeConstraints { make in
178 | make.center.equalToSuperview()
179 | }
180 | loadingView.start()
181 | }
182 |
183 | private func stopLoadingView() {
184 | loadingView.stop()
185 | loadingView.removeFromSuperview()
186 | }
187 |
188 | func alert(errorMessage: String = "An error occurred. Please try again later.") {
189 | let alert = UIAlertController(title: "Error", message: errorMessage, preferredStyle: .alert)
190 | alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil))
191 | present(alert, animated: true)
192 | }
193 |
194 | }
195 |
196 | // MARK: URL opening
197 |
198 | extension AboutViewController: AboutButtonViewDelegate {
199 |
200 | func open(link: String) {
201 | guard let url = URL(string: link) else { return }
202 | let svc = SFSafariViewController(url: url)
203 | svc.preferredBarTintColor = .appBackground
204 | svc.preferredControlTintColor = .appText
205 | present(svc, animated: true, completion: nil)
206 | }
207 |
208 | func openTip() {
209 | guard let product = Products.tipProducts.first else {
210 | log.error("tipProducts is empty")
211 | return
212 | }
213 |
214 | startLoadingView()
215 | Products.store.buyProduct(product)
216 | }
217 |
218 | }
219 |
--------------------------------------------------------------------------------
/TypeStyle/About/Views/AboutButtonView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | protocol AboutButtonViewDelegate: AnyObject {
4 | func open(link: String)
5 | func openTip()
6 | }
7 |
8 | class AboutButtonView: UIView {
9 |
10 | enum Kind {
11 | case link(String)
12 | case tip
13 | }
14 |
15 | let button = UIButton(type: .system)
16 | let padding = 20.0
17 | let kind: Kind
18 | weak var delegate: AboutButtonViewDelegate?
19 |
20 | init(text: String, kind: Kind) {
21 | self.kind = kind
22 |
23 | super.init(frame: .zero)
24 |
25 | backgroundColor = .appBackground
26 |
27 | setUpButton(text: text)
28 | }
29 |
30 | required init?(coder aDecoder: NSCoder) {
31 | fatalError("init(coder:) has not been implemented")
32 | }
33 |
34 | func setUpButton(text: String) {
35 | button.setTitleColor(.appText, for: .normal)
36 | button.titleLabel?.font = UIFont.preferredFont(forTextStyle: .title2)
37 | button.titleLabel?.adjustsFontForContentSizeCategory = true
38 | button.titleLabel?.numberOfLines = 0 // unlimited
39 |
40 | button.addTarget(self, action: #selector(didTapButton), for: .touchUpInside)
41 |
42 | set(text: text)
43 |
44 | addSubview(button)
45 |
46 | button.snp.makeConstraints { make in
47 | make.centerX.equalToSuperview()
48 | make.top.equalToSuperview().inset(padding / 2)
49 | make.width.lessThanOrEqualToSuperview().inset(padding * 2)
50 | make.bottom.equalToSuperview().inset(padding / 2)
51 | }
52 | }
53 |
54 | func set(text: String) {
55 | let attributes: [NSAttributedString.Key: Any] = [
56 | NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue,
57 | NSAttributedString.Key.foregroundColor: UIColor.appText
58 | ]
59 | let underlinedText = NSAttributedString(string: text,
60 | attributes: attributes)
61 | button.setAttributedTitle(underlinedText, for: .normal)
62 | }
63 |
64 | @objc func didTapButton() {
65 | switch kind {
66 | case .link(let link): delegate?.open(link: link)
67 | case .tip: delegate?.openTip()
68 | }
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/TypeStyle/About/Views/AboutLabelView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class AboutLabelView: UIView {
4 |
5 | let label = UILabel()
6 | let padding = 20.0
7 |
8 | init(text: String) {
9 | super.init(frame: .zero)
10 |
11 | backgroundColor = .appBackground
12 |
13 | setUpLabel()
14 | label.text = text
15 | }
16 |
17 | required init?(coder aDecoder: NSCoder) {
18 | fatalError("init(coder:) has not been implemented")
19 | }
20 |
21 | func setUpLabel() {
22 | label.textColor = .appText
23 | label.font = UIFont.preferredFont(forTextStyle: .body)
24 | label.adjustsFontForContentSizeCategory = true
25 | label.numberOfLines = 0 // unlimited
26 |
27 | addSubview(label)
28 |
29 | label.snp.makeConstraints { make in
30 | make.top.equalToSuperview().inset(padding / 2)
31 | make.leading.equalToSuperview().inset(padding)
32 | make.trailing.equalToSuperview().inset(padding)
33 | make.bottom.equalToSuperview().inset(padding / 2)
34 | }
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/TypeStyle/About/Views/ConfettiView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import QuartzCore
3 |
4 | class ConfettiView: UIView {
5 |
6 | private var emitter: CAEmitterLayer?
7 |
8 | private let colors: [UIColor] = [#colorLiteral(red: 0.95, green: 0.40, blue: 0.28, alpha: 1.0), #colorLiteral(red: 1.00, green: 0.78, blue: 0.36, alpha: 1.0), #colorLiteral(red: 0.48, green: 0.78, blue: 0.64, alpha: 1.0), #colorLiteral(red: 0.30, green: 0.75, blue: 0.85, alpha: 1.0)]
9 | private let intensity = 0.5
10 |
11 | func start() {
12 | let emitter = CAEmitterLayer()
13 |
14 | emitter.emitterPosition = CGPoint(x: frame.size.width / 2.0, y: 0)
15 | emitter.emitterShape = .line
16 | emitter.emitterSize = CGSize(width: frame.size.width, height: 1)
17 |
18 | let cells = colors.map { confettiCell(withColor: $0) }
19 |
20 | emitter.emitterCells = cells
21 | layer.addSublayer(emitter)
22 |
23 | self.emitter = emitter
24 | }
25 |
26 | func increase() {
27 | emitter?.birthRate *= 2
28 | }
29 |
30 | func stop() {
31 | emitter?.birthRate = 0
32 | }
33 |
34 | private func confettiCell(withColor color: UIColor) -> CAEmitterCell {
35 | let confettiCell = CAEmitterCell()
36 |
37 | confettiCell.contents = UIImage(named: "confetti")?.cgImage
38 | confettiCell.scale = 0.4
39 | confettiCell.color = color.cgColor
40 |
41 | confettiCell.birthRate = 5
42 | confettiCell.lifetime = 8
43 | confettiCell.lifetimeRange = 0
44 | confettiCell.velocity = 175
45 | confettiCell.velocityRange = 40
46 | confettiCell.emissionLongitude = .pi
47 | confettiCell.emissionRange = .pi
48 | confettiCell.spin = 1.75
49 | confettiCell.spinRange = 2
50 | confettiCell.scaleRange = 0.5
51 | confettiCell.scaleSpeed = -0.05
52 | return confettiCell
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/TypeStyle/About/Views/LoadingView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import SnapKit
3 |
4 | class LoadingView: UIView {
5 |
6 | let radius = 10.0
7 | let activityIndicator = UIActivityIndicatorView()
8 | let textLabel = UILabel()
9 | let textLabelPadding = 15.0
10 |
11 | override init(frame: CGRect) {
12 | super.init(frame: frame)
13 |
14 | backgroundColor = .appDarkBackground
15 | layer.cornerRadius = radius
16 |
17 | snp.makeConstraints { make in
18 | make.width.equalTo(snp.height)
19 | }
20 |
21 | // Shadow
22 | layer.shadowRadius = 8
23 | layer.shadowOffset = CGSize(width: 0, height: 0)
24 | layer.shadowColor = UIColor.black.cgColor
25 | layer.shadowOpacity = 0.3
26 |
27 | setUpActivityIndicator()
28 | setUpTextLabel()
29 | }
30 |
31 | required init?(coder aDecoder: NSCoder) {
32 | fatalError("init(coder:) has not been implemented")
33 | }
34 |
35 | private func setUpActivityIndicator() {
36 | addSubview(activityIndicator)
37 |
38 | activityIndicator.snp.makeConstraints { make in
39 | make.centerX.equalToSuperview()
40 | make.centerY.equalToSuperview().offset(-15)
41 | }
42 | }
43 |
44 | private func setUpTextLabel() {
45 | textLabel.text = "Loading..."
46 | textLabel.textColor = .appText
47 | textLabel.font = UIFont.preferredFont(forTextStyle: .body)
48 | textLabel.adjustsFontForContentSizeCategory = true
49 |
50 | addSubview(textLabel)
51 |
52 | textLabel.snp.makeConstraints { make in
53 | make.centerX.equalToSuperview()
54 | make.centerY.equalToSuperview().offset(20)
55 | make.leading.equalToSuperview().inset(textLabelPadding)
56 | make.trailing.equalToSuperview().inset(textLabelPadding)
57 | }
58 | }
59 |
60 | func start() {
61 | activityIndicator.startAnimating()
62 | }
63 |
64 | func stop() {
65 | activityIndicator.stopAnimating()
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/TypeStyle/Application/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | @UIApplicationMain
4 | class AppDelegate: UIResponder, UIApplicationDelegate {
5 |
6 | var window: UIWindow?
7 |
8 | var didAutomaticallyShowKeyboardOnce = false
9 |
10 | func application(
11 | _ application: UIApplication,
12 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
13 | ) -> Bool {
14 | window = UIWindow(frame: UIScreen.main.bounds)
15 | window?.rootViewController = MainTabBarController()
16 | window?.makeKeyAndVisible()
17 |
18 | Products.store.requestProducts { success, tipProducts in
19 | if success, let tipProducts = tipProducts {
20 | Products.tipProducts = tipProducts
21 | }
22 | }
23 |
24 | return true
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/TypeStyle/Application/Extensions/Notification.Name+Extension.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | extension Notification.Name {
4 |
5 | struct IAP {
6 |
7 | static let purchaseSuccess = Notification.Name("iap.purchaseSuccess")
8 | static let purchaseCancelled = Notification.Name("iap.purchaseCancelled")
9 | static let purchaseFailed = Notification.Name("iap.purchaseFailed")
10 |
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/TypeStyle/Application/Extensions/UIColor+Extension.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | extension UIColor {
4 |
5 | static let appBackground = #colorLiteral(red: 0.514, green: 0.294, blue: 0.639, alpha: 1) // #834ba3
6 | static let appDarkBackground = #colorLiteral(red: 0.247, green: 0.169, blue: 0.306, alpha: 1) // #3f2b4e
7 | static let appSelected = #colorLiteral(red: 0.659, green: 0.435, blue: 0.784, alpha: 1) // #a86fc8
8 | static let appText = UIColor.white
9 | static let appFadedText = UIColor.lightGray
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/TypeStyle/Application/Global.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | let bundleID = Bundle.main.bundleIdentifier ?? ""
4 |
5 | let transformerFavoritedKey = "\(bundleID).transformer.with.name.%@.favorited"
6 |
--------------------------------------------------------------------------------
/TypeStyle/Application/IAP/IAPHelper.swift:
--------------------------------------------------------------------------------
1 | import StoreKit
2 |
3 | typealias ProductIdentifier = String
4 | typealias ProductsRequestCompletionHandler = (_ success: Bool, _ products: [SKProduct]?) -> Void
5 |
6 | class IAPHelper: NSObject {
7 |
8 | private let productIdentifiers: Set
9 | private var productsRequest: SKProductsRequest?
10 | private var productsRequestCompletionHandler: ProductsRequestCompletionHandler?
11 |
12 | init(productIdentifiers: Set) {
13 | self.productIdentifiers = productIdentifiers
14 | super.init()
15 |
16 | SKPaymentQueue.default().add(self)
17 | }
18 | }
19 |
20 | // MARK: - StoreKit API
21 |
22 | extension IAPHelper {
23 |
24 | func requestProducts(_ completionHandler: @escaping ProductsRequestCompletionHandler) {
25 | productsRequest?.cancel()
26 | productsRequestCompletionHandler = completionHandler
27 |
28 | productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
29 | productsRequest?.delegate = self
30 | productsRequest?.start()
31 | }
32 |
33 | func buyProduct(_ product: SKProduct) {
34 | log.info("Buying: \(product.productIdentifier)")
35 | let payment = SKPayment(product: product)
36 | SKPaymentQueue.default().add(payment)
37 | }
38 | }
39 |
40 | // MARK: - SKProductsRequestDelegate
41 |
42 | extension IAPHelper: SKProductsRequestDelegate {
43 |
44 | func productsRequest(_ request: SKProductsRequest,
45 | didReceive response: SKProductsResponse) {
46 | log.info("Loaded list of products")
47 | let products = response.products
48 | productsRequestCompletionHandler?(true, products)
49 | clearRequestAndHandler()
50 |
51 | for product in products {
52 | log.info("Found product: \(product.productIdentifier) \(product.localizedTitle) \(product.price.floatValue)")
53 | }
54 | }
55 |
56 | func request(_ request: SKRequest, didFailWithError error: Error) {
57 | log.error("Failed to load list of products. Error: \(error)")
58 | productsRequestCompletionHandler?(false, nil)
59 | clearRequestAndHandler()
60 | }
61 |
62 | private func clearRequestAndHandler() {
63 | productsRequest = nil
64 | productsRequestCompletionHandler = nil
65 | }
66 | }
67 |
68 | // MARK: - SKPaymentTransactionObserver
69 |
70 | extension IAPHelper: SKPaymentTransactionObserver {
71 |
72 | func paymentQueue(_ queue: SKPaymentQueue,
73 | updatedTransactions transactions: [SKPaymentTransaction]) {
74 | for transaction in transactions {
75 | switch (transaction.transactionState) {
76 | case .purchased:
77 | complete(transaction: transaction)
78 | break
79 | case .failed:
80 | fail(transaction: transaction)
81 | break
82 | case .deferred: break
83 | case .purchasing: break
84 | default: break
85 | }
86 | }
87 | }
88 |
89 | private func complete(transaction: SKPaymentTransaction) {
90 | log.info("complete: \(transaction)")
91 | deliverPurchaseNotificationFor(identifier: transaction.payment.productIdentifier)
92 | SKPaymentQueue.default().finishTransaction(transaction)
93 | }
94 |
95 | private func fail(transaction: SKPaymentTransaction) {
96 | log.error("fail: \(transaction)")
97 | if let error = transaction.error as NSError? {
98 | if error.code == SKError.paymentCancelled.rawValue {
99 | NotificationCenter.default.post(name: Notification.Name.IAP.purchaseCancelled, object: nil)
100 | } else {
101 | log.error("Transaction Error: \(error.localizedDescription)")
102 | NotificationCenter.default.post(name: Notification.Name.IAP.purchaseFailed, object: nil)
103 | }
104 | }
105 |
106 | SKPaymentQueue.default().finishTransaction(transaction)
107 | }
108 |
109 | private func deliverPurchaseNotificationFor(identifier: ProductIdentifier?) {
110 | NotificationCenter.default.post(name: Notification.Name.IAP.purchaseSuccess, object: identifier)
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/TypeStyle/Application/IAP/Products.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import StoreKit
3 |
4 | struct Products {
5 |
6 | static let store = IAPHelper(productIdentifiers: Products.productIdentifiers)
7 | static let generousTipIAP = "\(bundleID).GenerousTip"
8 |
9 | static var tipProducts: [SKProduct] = []
10 |
11 | private static let productIdentifiers: Set = [
12 | Products.generousTipIAP
13 | ]
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/TypeStyle/Application/Log.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | let log = Log()
4 |
5 | struct Log {
6 |
7 | func verbose(_ string: String) {
8 | print("📄 \(string)")
9 | }
10 |
11 | func debug(_ string: String) {
12 | print("👁 \(string)")
13 | }
14 |
15 | func info(_ string: String) {
16 | print("ℹ️ \(string)")
17 | }
18 |
19 | func warning(_ string: String) {
20 | print("⚠️ \(string)")
21 | }
22 |
23 | func error(_ string: String) {
24 | print("🚨 \(string)")
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/TypeStyle/Application/MainTabBarController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class MainTabBarController: UITabBarController {
4 |
5 | override func viewDidLoad() {
6 | super.viewDidLoad()
7 |
8 | overrideUserInterfaceStyle = .dark
9 |
10 | let stylesVC = GeneratorViewController(transformerMode: .styles)
11 | stylesVC.tabBarItem = UITabBarItem(
12 | title: "Styles",
13 | image: UIImage(systemName: "bold.italic.underline"),
14 | tag: 0
15 | )
16 |
17 | let decorationsVC = GeneratorViewController(transformerMode: .decorations)
18 | decorationsVC.tabBarItem = UITabBarItem(
19 | title: "Decorations",
20 | image: UIImage(systemName: "wand.and.stars"),
21 | tag: 1
22 | )
23 |
24 | let emoticonsVC = GeneratorViewController(transformerMode: .emoticons)
25 | emoticonsVC.tabBarItem = UITabBarItem(
26 | title: "Emoticons",
27 | image: UIImage(systemName: "smiley"),
28 | tag: 2
29 | )
30 |
31 | let aboutVC = AboutViewController()
32 | aboutVC.tabBarItem = UITabBarItem(
33 | title: "About",
34 | image: UIImage(systemName: "info.circle"),
35 | tag: 3
36 | )
37 |
38 | viewControllers = [stylesVC, decorationsVC, emoticonsVC, aboutVC]
39 | view.tintColor = .appText
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/TypeStyle/Application/Models/CustomTransforms.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct CustomTransforms {
4 |
5 | static let mockingSpongeBob: (String) -> String = { input in
6 | let lowercaseInput = input.lowercased()
7 | let transformableChars = "abcdefghijklmnopqrstuvwxyz"
8 | var output = ""
9 | var makeNextUppercase = true
10 |
11 | for char in lowercaseInput {
12 | guard transformableChars.contains(char) else {
13 | output.append(char)
14 | continue
15 | }
16 |
17 | output.append(makeNextUppercase ? String(char).uppercased().first ?? char : char)
18 | makeNextUppercase.toggle()
19 | }
20 | return output
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/TypeStyle/Application/Models/Transformer.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct Transformer {
4 |
5 | typealias Grouping = (groupName: String, transformers: [Transformer])
6 |
7 | let name: String
8 | let transform: (String) -> String
9 |
10 | init(name: String, outputBase: String, reverse: Bool = false) {
11 | self.name = name
12 |
13 | let inputBase = StyleTransformers.inputBase
14 | let transformerDictionary = Dictionary(uniqueKeysWithValues: zip(inputBase, outputBase))
15 |
16 | self.transform = { input in
17 | let string = String(input.map {
18 | transformerDictionary[$0] ?? $0
19 | })
20 |
21 | if reverse {
22 | return String(string.reversed())
23 | }
24 |
25 | return string
26 | }
27 | }
28 |
29 | init(name: String, before: String, after: String) {
30 | self.name = name
31 | self.transform = { (input) -> String in
32 | return "\(before) \(input) \(after)"
33 | }
34 | }
35 |
36 | init(name: String, transform: @escaping (String) -> String) {
37 | self.name = name
38 | self.transform = transform
39 | }
40 |
41 | init(name: String, output: String) {
42 | self.init(name: name, transform: { _ in output })
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "57x57",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-57x57@1x.png",
49 | "scale" : "1x"
50 | },
51 | {
52 | "size" : "57x57",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-57x57@2x.png",
55 | "scale" : "2x"
56 | },
57 | {
58 | "size" : "60x60",
59 | "idiom" : "iphone",
60 | "filename" : "Icon-App-60x60@2x.png",
61 | "scale" : "2x"
62 | },
63 | {
64 | "size" : "60x60",
65 | "idiom" : "iphone",
66 | "filename" : "Icon-App-60x60@3x.png",
67 | "scale" : "3x"
68 | },
69 | {
70 | "size" : "20x20",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-20x20@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "20x20",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-20x20@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "29x29",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-29x29@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "29x29",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-29x29@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "40x40",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-40x40@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "40x40",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-40x40@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "50x50",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-Small-50x50@1x.png",
109 | "scale" : "1x"
110 | },
111 | {
112 | "size" : "50x50",
113 | "idiom" : "ipad",
114 | "filename" : "Icon-Small-50x50@2x.png",
115 | "scale" : "2x"
116 | },
117 | {
118 | "size" : "72x72",
119 | "idiom" : "ipad",
120 | "filename" : "Icon-App-72x72@1x.png",
121 | "scale" : "1x"
122 | },
123 | {
124 | "size" : "72x72",
125 | "idiom" : "ipad",
126 | "filename" : "Icon-App-72x72@2x.png",
127 | "scale" : "2x"
128 | },
129 | {
130 | "size" : "76x76",
131 | "idiom" : "ipad",
132 | "filename" : "Icon-App-76x76@1x.png",
133 | "scale" : "1x"
134 | },
135 | {
136 | "size" : "76x76",
137 | "idiom" : "ipad",
138 | "filename" : "Icon-App-76x76@2x.png",
139 | "scale" : "2x"
140 | },
141 | {
142 | "size" : "83.5x83.5",
143 | "idiom" : "ipad",
144 | "filename" : "Icon-App-83.5x83.5@2x.png",
145 | "scale" : "2x"
146 | },
147 | {
148 | "size" : "1024x1024",
149 | "idiom" : "ios-marketing",
150 | "filename" : "ItunesArtwork@2x.png",
151 | "scale" : "1x"
152 | }
153 | ],
154 | "info" : {
155 | "version" : 1,
156 | "author" : "xcode"
157 | }
158 | }
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/confetti.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "confetti.pdf",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/TypeStyle/Assets.xcassets/confetti.imageset/confetti.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/TypeStyle/Assets.xcassets/confetti.imageset/confetti.pdf
--------------------------------------------------------------------------------
/TypeStyle/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 |
29 |
--------------------------------------------------------------------------------
/TypeStyle/Generator/Controllers/GeneratorViewController.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import SnapKit
3 | import CoreServices
4 |
5 | class GeneratorViewController: UIViewController {
6 |
7 | enum ViewMode {
8 | case generate
9 | case browse
10 | }
11 |
12 | // MARK: - Properties
13 |
14 | override var preferredStatusBarStyle: UIStatusBarStyle { .lightContent }
15 | private let feedbackGenerator = UINotificationFeedbackGenerator()
16 | private var transformerManager: TransformerManager
17 |
18 | private let inputContainerView = InputContainerView()
19 | private var inputPlaceholder: String {
20 | (viewMode == .generate) ? "Your text..." : "Search..."
21 | }
22 |
23 | private let tableView = UITableView()
24 |
25 | private let viewModeSegmentedControl = UISegmentedControl(items: ["Generate", "Browse"])
26 |
27 | private let actionConfirmationView = ActionConfirmationView()
28 | private var actionConfirmationViewTimer: Timer?
29 |
30 | private let generalMargin = 15.0
31 |
32 | private var viewMode: ViewMode = .generate
33 |
34 | private var input = ""
35 |
36 | private var didAppearOnce = false
37 |
38 | // MARK: - Initialization
39 |
40 | init(transformerMode: TransformerManager.Mode) {
41 | transformerManager = TransformerManager(mode: transformerMode)
42 |
43 | // Browsing is the only view mode for emoticons
44 | if transformerMode == .emoticons { viewMode = .browse }
45 |
46 | super.init(nibName: nil, bundle: nil)
47 | }
48 |
49 | required init?(coder: NSCoder) {
50 | fatalError("init(coder:) has not been implemented")
51 | }
52 |
53 | // MARK: - View setup
54 |
55 | override func viewDidLoad() {
56 | super.viewDidLoad()
57 |
58 | overrideUserInterfaceStyle = .dark
59 |
60 | view.backgroundColor = .appBackground
61 |
62 | setUpInputContainerView()
63 | setUpModeSegmentedControl()
64 | setUpTableView()
65 | setUpActionConfirmationView()
66 | }
67 |
68 | func setUpInputContainerView() {
69 | inputContainerView.inputTextView.delegate = self
70 | inputContainerView.inputTextView.textColor = .appFadedText
71 |
72 | inputContainerView.clearButton.addTarget(
73 | self,
74 | action: #selector(didTapClearButton),
75 | for: .touchUpInside
76 | )
77 |
78 | view.addSubview(inputContainerView)
79 |
80 | inputContainerView.snp.makeConstraints { make in
81 | make.top.equalTo(view.safeAreaLayoutGuide.snp.top)
82 | make.leading.equalTo(view.safeAreaLayoutGuide.snp.leading)
83 | make.trailing.equalTo(view.safeAreaLayoutGuide.snp.trailing)
84 | }
85 | }
86 |
87 | func setUpModeSegmentedControl() {
88 | guard transformerManager.mode != .emoticons else {
89 | return
90 | }
91 |
92 | viewModeSegmentedControl.tintColor = .appText
93 | viewModeSegmentedControl.selectedSegmentIndex = 0
94 | viewModeSegmentedControl.addTarget(
95 | self,
96 | action: #selector(modeDidChange),
97 | for: .valueChanged
98 | )
99 |
100 | // TODO: Make this adjust automatically somehow, not just on app launch
101 | let font = UIFont.preferredFont(forTextStyle: .body)
102 | viewModeSegmentedControl.setTitleTextAttributes([.font: font], for: .normal)
103 |
104 | view.addSubview(viewModeSegmentedControl)
105 |
106 | viewModeSegmentedControl.snp.makeConstraints { make in
107 | make.centerX.equalToSuperview()
108 | make.leading.greaterThanOrEqualTo(view.safeAreaLayoutGuide.snp.leading).inset(generalMargin)
109 | make.bottom.equalTo(view.safeAreaLayoutGuide.snp.bottom).inset(generalMargin)
110 | }
111 | }
112 |
113 | func setUpTableView() {
114 | tableView.register(
115 | OutputTableViewCell.self,
116 | forCellReuseIdentifier: OutputTableViewCell.identifier
117 | )
118 |
119 | tableView.dataSource = self
120 | tableView.delegate = self
121 | tableView.dragDelegate = self
122 | tableView.backgroundColor = .clear
123 | tableView.separatorStyle = .none
124 |
125 | view.addSubview(tableView)
126 |
127 | tableView.snp.makeConstraints { make in
128 | make.top.equalTo(inputContainerView.snp.bottom)
129 | make.leading.equalTo(view.safeAreaLayoutGuide.snp.leading)
130 | make.trailing.equalTo(view.safeAreaLayoutGuide.snp.trailing)
131 |
132 | if transformerManager.mode != .emoticons {
133 | make.bottom.equalTo(viewModeSegmentedControl.snp.top).offset(-generalMargin)
134 | } else {
135 | make.bottom.equalTo(view.safeAreaLayoutGuide.snp.bottom)
136 | }
137 | }
138 | }
139 |
140 | func setUpActionConfirmationView() {
141 | view.addSubview(actionConfirmationView)
142 |
143 | actionConfirmationView.snp.makeConstraints { make in
144 | make.center.equalToSuperview()
145 | }
146 |
147 | actionConfirmationView.isHidden = true
148 | actionConfirmationView.alpha = 0
149 | }
150 |
151 | override func viewDidAppear(_ animated: Bool) {
152 | super.viewDidAppear(animated)
153 |
154 | let appDelegate = UIApplication.shared.delegate as? AppDelegate
155 | if appDelegate?.didAutomaticallyShowKeyboardOnce ?? false {
156 | refreshUI()
157 | return
158 | }
159 |
160 | if !didAppearOnce {
161 | inputContainerView.inputTextView.becomeFirstResponder()
162 | appDelegate?.didAutomaticallyShowKeyboardOnce = true
163 | }
164 |
165 | didAppearOnce = true
166 | }
167 |
168 | override func viewDidDisappear(_ animated: Bool) {
169 | super.viewDidDisappear(animated)
170 |
171 | inputContainerView.inputTextView.resignFirstResponder()
172 | }
173 |
174 | // MARK: - Instance methods
175 |
176 | @objc func didTapClearButton() {
177 | inputContainerView.inputTextView.resignFirstResponder()
178 | inputContainerView.inputTextView.text = nil
179 | refreshUI()
180 | inputContainerView.inputTextView.becomeFirstResponder()
181 | }
182 |
183 | func refreshUI() {
184 | if inputContainerView.inputTextView.textColor == .appFadedText {
185 | input = ""
186 | } else {
187 | input = inputContainerView.inputTextView.text ?? ""
188 | }
189 |
190 | transformerManager.updateTransformersToDisplay(
191 | filterInput: (viewMode == .browse) ? input : nil
192 | )
193 |
194 | inputContainerView.clearButton.isHidden = input.isEmpty || (inputContainerView.inputTextView.textColor == .appFadedText)
195 | tableView.reloadData()
196 |
197 | if input.isEmpty && !inputContainerView.inputTextView.isFirstResponder {
198 | showInputPlaceholder()
199 | }
200 |
201 | if input.count > 200 {
202 | inputContainerView.setTextSize(.footnote)
203 | } else if input.count > 100 {
204 | inputContainerView.setTextSize(.body)
205 | } else {
206 | inputContainerView.setTextSize(.title2)
207 | }
208 | }
209 |
210 | func showInputPlaceholder() {
211 | inputContainerView.inputTextView.text = inputPlaceholder
212 | inputContainerView.inputTextView.textColor = .appFadedText
213 | }
214 |
215 | func hideInputPlaceholder() {
216 | inputContainerView.inputTextView.text = nil
217 | inputContainerView.inputTextView.textColor = .appText
218 | }
219 |
220 | @objc func modeDidChange() {
221 | inputContainerView.inputTextView.text = nil
222 | switch viewModeSegmentedControl.selectedSegmentIndex {
223 | case 0: viewMode = .generate
224 | case 1: viewMode = .browse
225 | default: break
226 | }
227 | refreshUI()
228 | }
229 |
230 | func output(for indexPath: IndexPath) -> String {
231 | transformerManager.transformedText(
232 | for: (viewMode == .generate) ? input : nil,
233 | indexPath: indexPath
234 | )
235 | }
236 |
237 | }
238 |
239 | // MARK: - UITableViewDataSource
240 |
241 | extension GeneratorViewController: UITableViewDataSource {
242 |
243 | func numberOfSections(in tableView: UITableView) -> Int {
244 | transformerManager.transformerGroupingsToDisplay.count
245 | }
246 |
247 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
248 | // Don't show output cells if we are in generate mode and input is empty
249 | if viewMode == .generate && input.isEmpty {
250 | return 0
251 | }
252 |
253 | return transformerManager.transformerGroupingsToDisplay[section].transformers.count
254 | }
255 |
256 | func tableView(
257 | _ tableView: UITableView,
258 | titleForHeaderInSection section: Int
259 | ) -> String? {
260 | switch transformerManager.mode {
261 | case .styles, .decorations:
262 | return nil
263 | case .emoticons:
264 | return transformerManager.transformerGroupingsToDisplay[section].groupName
265 | }
266 | }
267 |
268 | func tableView(
269 | _ tableView: UITableView,
270 | cellForRowAt indexPath: IndexPath
271 | ) -> UITableViewCell {
272 | let cell = tableView.dequeueReusableCell(
273 | withIdentifier: OutputTableViewCell.identifier
274 | ) as! OutputTableViewCell
275 |
276 | cell.outputLabel.text = output(for: indexPath)
277 | cell.favoriteImageView.image = transformerManager.isFavorited(at: indexPath)
278 | ? UIImage(systemName: "heart")?.withRenderingMode(.alwaysTemplate)
279 | : nil
280 |
281 | return cell
282 | }
283 |
284 | func tableView(
285 | _ tableView: UITableView,
286 | trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath
287 | ) -> UISwipeActionsConfiguration? {
288 | let favoriteTitle = transformerManager.isFavorited(at: indexPath) ? "Unfavorite" : "Favorite"
289 | let favoriteAction = UIContextualAction(style: .normal, title: favoriteTitle) {
290 | contextualAction, view, boolValue in
291 |
292 | let transformer = self.transformerManager
293 | .transformerGroupingsToDisplay[indexPath.section]
294 | .transformers[indexPath.row]
295 | self.transformerManager.toggleFavorite(transformer: transformer)
296 | self.transformerManager.updateTransformersToDisplay()
297 | self.refreshUI()
298 | }
299 | favoriteAction.backgroundColor = .appDarkBackground
300 |
301 | return UISwipeActionsConfiguration(actions: [favoriteAction])
302 | }
303 |
304 | }
305 |
306 | // MARK: - UITableViewDelegate
307 |
308 | extension GeneratorViewController: UITableViewDelegate {
309 |
310 | func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
311 | inputContainerView.inputTextView.resignFirstResponder()
312 | }
313 |
314 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
315 | inputContainerView.inputTextView.resignFirstResponder()
316 |
317 | if viewMode == .generate || (viewMode == .browse && transformerManager.mode == .emoticons) {
318 | let selectedString = output(for: indexPath)
319 | UIPasteboard.general.string = selectedString
320 | actionConfirmationView.style = .copied
321 | } else {
322 | // Favorite or unfavorite
323 | let transformer = transformerManager
324 | .transformerGroupingsToDisplay[indexPath.section]
325 | .transformers[indexPath.row]
326 | transformerManager.toggleFavorite(transformer: transformer)
327 | actionConfirmationView.style = transformerManager.isFavorited(at: indexPath)
328 | ? .favorited
329 | : .unfavorited
330 | refreshUI()
331 | }
332 |
333 | showActionConfirmationView()
334 | feedbackGenerator.notificationOccurred(.success)
335 | }
336 |
337 | func showActionConfirmationView() {
338 | actionConfirmationViewTimer?.invalidate()
339 | actionConfirmationViewTimer = nil
340 | actionConfirmationView.alpha = 0
341 | actionConfirmationView.isHidden = false
342 | UIView.animate(withDuration: 0.1, delay: 0, options: [], animations: {
343 | self.actionConfirmationView.alpha = 1
344 | }, completion: { _ in
345 | self.actionConfirmationViewTimer = Timer.scheduledTimer(
346 | timeInterval: 0.5,
347 | target: self,
348 | selector: #selector(self.hideActionConfirmationView),
349 | userInfo: nil,
350 | repeats: false
351 | )
352 | })
353 | }
354 |
355 | @objc func hideActionConfirmationView() {
356 | actionConfirmationViewTimer?.invalidate()
357 | actionConfirmationViewTimer = nil
358 | UIView.animate(withDuration: 0.1, animations: {
359 | self.actionConfirmationView.alpha = 0
360 | }, completion: { _ in
361 | self.actionConfirmationView.isHidden = true
362 | })
363 | }
364 |
365 | }
366 |
367 | // MARK: - UITextViewDelegate
368 |
369 | extension GeneratorViewController: UITextViewDelegate {
370 |
371 | func textViewDidBeginEditing(_ textView: UITextView) {
372 | if textView.textColor == .appFadedText {
373 | hideInputPlaceholder()
374 | }
375 | }
376 |
377 | func textViewDidChange(_ textView: UITextView) {
378 | refreshUI()
379 | }
380 |
381 | func textViewDidEndEditing(_ textView: UITextView) {
382 | if textView.text.isEmpty {
383 | showInputPlaceholder()
384 | }
385 |
386 | refreshUI()
387 | }
388 |
389 | }
390 |
391 | // MARK: - UITableViewDragDelegate
392 |
393 | extension GeneratorViewController: UITableViewDragDelegate {
394 |
395 | func tableView(
396 | _ tableView: UITableView,
397 | itemsForBeginning session: UIDragSession,
398 | at indexPath: IndexPath
399 | ) -> [UIDragItem] {
400 | let draggedValue = output(for: indexPath).data(using: .utf8)
401 |
402 | let itemProvider = NSItemProvider()
403 | let typeIdentifier = kUTTypePlainText as String
404 |
405 | itemProvider.registerDataRepresentation(
406 | forTypeIdentifier: typeIdentifier,
407 | visibility: .all
408 | ) { completion in
409 | completion(draggedValue, nil)
410 | return nil
411 | }
412 |
413 | return [UIDragItem(itemProvider: itemProvider)]
414 | }
415 |
416 | }
417 |
--------------------------------------------------------------------------------
/TypeStyle/Generator/Managers/TransformerManager.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | struct TransformerManager {
4 |
5 | enum Mode {
6 | case styles
7 | case decorations
8 | case emoticons
9 | }
10 |
11 | let mode: Mode
12 |
13 | let transformerGroupings: [Transformer.Grouping]
14 | var transformerGroupingsToDisplay: [Transformer.Grouping] = []
15 |
16 | init(mode: Mode) {
17 | self.mode = mode
18 |
19 | switch mode {
20 | case .styles: self.transformerGroupings = StyleTransformers.all
21 | case .decorations: self.transformerGroupings = DecorationTransformers.all
22 | case .emoticons: self.transformerGroupings = EmoticonTransformers.all
23 | }
24 |
25 | updateTransformersToDisplay()
26 | }
27 |
28 | mutating func updateTransformersToDisplay(filterInput: String? = nil) {
29 | let favorited: [Transformer.Grouping] = [(
30 | groupName: "Favorites",
31 | transformers: transformerGroupings.flatMap {
32 | $0.transformers.filter { isFavorited(transformer: $0) }
33 | }
34 | )]
35 |
36 | let unfavorited: [Transformer.Grouping] = transformerGroupings.map {
37 | (
38 | groupName: $0.groupName,
39 | transformers: $0.transformers.filter { !isFavorited(transformer: $0) }
40 | )
41 | }
42 |
43 | transformerGroupingsToDisplay = favorited + unfavorited
44 |
45 | if let filterInput = filterInput {
46 | if !filterInput.isEmpty {
47 | let lowercasedInput = filterInput.lowercased()
48 |
49 | transformerGroupingsToDisplay = transformerGroupingsToDisplay.map {
50 | (
51 | groupName: $0.groupName,
52 | transformers: $0.transformers.filter { $0.name.lowercased().contains(lowercasedInput) }
53 | )
54 | }
55 | }
56 | }
57 | }
58 |
59 | func transformedText(for text: String?, indexPath: IndexPath) -> String {
60 | // If no text is provided, we use the name of the transformer.
61 | let transformer = transformerGroupingsToDisplay[indexPath.section].transformers[indexPath.row]
62 | let textToTransform = text ?? transformer.name
63 |
64 | return transformer.transform(textToTransform)
65 | }
66 |
67 | }
68 |
69 | // MARK: Favoriting
70 |
71 | extension TransformerManager {
72 |
73 | func isFavorited(at indexPath: IndexPath) -> Bool {
74 | isFavorited(
75 | transformer: transformerGroupingsToDisplay[indexPath.section].transformers[indexPath.row]
76 | )
77 | }
78 |
79 | func isFavorited(transformer: Transformer) -> Bool {
80 | UserDefaults.standard.bool(
81 | forKey: String.localizedStringWithFormat(transformerFavoritedKey, transformer.name)
82 | )
83 | }
84 |
85 | func toggleFavorite(transformer: Transformer) {
86 | UserDefaults.standard.set(
87 | !isFavorited(transformer: transformer),
88 | forKey: String.localizedStringWithFormat(transformerFavoritedKey, transformer.name)
89 | )
90 | }
91 |
92 | }
93 |
--------------------------------------------------------------------------------
/TypeStyle/Generator/Transformers/DecorationTransformers.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | enum DecorationTransformers {
4 |
5 | static let all: [Transformer.Grouping] = [
6 | (groupName: "All Decorations", transformers: [
7 | Transformer(name: "Decoration 1", before: "`•.,¸¸,.•´¯", after: "¯`•.,¸¸,.•´"),
8 | Transformer(name: "Decoration 2", before: "¸,ø¤º°`°º¤ø,¸", after: "¸,ø¤º°`°º¤ø,¸"),
9 | Transformer(name: "Decoration 3", before: "★·.·´¯`·.·★", after: "★·.·´¯`·.·★"),
10 | Transformer(name: "Decoration 4", before: "¸„.-•~¹°”ˆ˜¨", after: "¨˜ˆ”°¹~•-.„¸"),
11 | Transformer(name: "Decoration 5", before: "·.¸¸.·♩♪♫", after: "♫♪♩·.¸¸.·"),
12 | Transformer(name: "Decoration 6", before: "׺°”˜`”°º×", after: "׺°”˜`”°º×"),
13 | Transformer(name: "Decoration 7", before: "•?((¯°·._.•", after: "•._.·°¯))؟•"),
14 | Transformer(name: "Decoration 8", before: "(¯´•._.•", after: "•._.•´¯)"),
15 | Transformer(name: "Decoration 9", before: "¸„.-•~¹°”ˆ˜¨", after: "¨˜ˆ”°¹~•-.„¸"),
16 | Transformer(name: "Decoration 10", before: "|!¤*'~``~'*¤!|", after: "|!¤*'~``~'*¤!|"),
17 | Transformer(name: "Decoration 11", before: "(¯`·.¸¸.·´¯`·.¸¸.->", after: "<-.¸¸.·´¯`·.¸¸.·´¯)"),
18 | Transformer(name: "Decoration 12", before: ",-*' ^ '~*-.,_,.-*~", after: "~*-.,_,.-*~' ^ '*-,"),
19 | Transformer(name: "Decoration 13", before: "°°°·.°·..·°¯°·._.·", after: "·._.·°¯°·.·° .·°°°"),
20 | Transformer(name: "Decoration 14", before: "•._.••´¯``•.¸¸.•`", after: "`•.¸¸.•´´¯`••._.•"),
21 | Transformer(name: "Decoration 15", before: "¸,ø¤º°`°º¤ø,¸¸,ø¤º°", after: "°º¤ø,¸¸,ø¤º°`°º¤ø,¸"),
22 | Transformer(name: "Decoration 16", before: ".•°¤*(¯`★´¯)*¤°", after: "°¤*(¯´★`¯)*¤°•."),
23 | Transformer(name: "Decoration 17", before: "¤¸¸.•´¯`•¸¸.•..>>", after: "<<..•.¸¸•´¯`•.¸¸¤"),
24 | Transformer(name: "Decoration 18", before: "`•.¸¸.•´´¯`••._.•", after: "•._.••`¯´´•.¸¸.•`"),
25 | Transformer(name: "Decoration 19", before: "(¯´•._.•", after: "•._.•´¯)"),
26 | Transformer(name: "Decoration 20", before: "••¤(`×[¤", after: "¤]×´)¤••"),
27 | Transformer(name: "Decoration 21", before: "•´¯`•»", after: "«•´¯`•"),
28 | Transformer(name: "Decoration 22", before: "—(••÷[", after: "]÷••)—"),
29 | Transformer(name: "Decoration 23", before: "•]••´º´•»", after: "«•´º´••[•"),
30 | Transformer(name: "Decoration 24", before: "*•.¸♡", after: "♡¸.•*"),
31 | Transformer(name: "Decoration 25", before: "╰☆☆", after: "☆☆╮"),
32 | Transformer(name: "Decoration 26", before: "↤↤↤↤↤↤", after: "↦↦↦↦↦↦"),
33 | Transformer(name: "Decoration 27", before: "➶➶➶➶➶➶", after: "➷➷➷➷➷➷"),
34 | Transformer(name: "Decoration 28", before: "↫↫↫↫↫", after: "↬↬↬↬↬"),
35 | Transformer(name: "Decoration 29", before: "╚»★«╝", after: "╚»★«╝"),
36 | Transformer(name: "Decoration 30", before: "•´¯`•.", after: ".•´¯`•"),
37 | Transformer(name: "Decoration 31", before: "§.•´¨'°÷•..×", after: "×,.•´¨'°÷•..§"),
38 | Transformer(name: "Decoration 32", before: "•°¯`••", after: "••´¯°•"),
39 | Transformer(name: "Decoration 33", before: "]|I{•------»", after: "«------•}I|["),
40 | Transformer(name: "Decoration 34", before: "(-_-)", after: "(-_-)"),
41 | Transformer(name: "Decoration 35", before: "•´¯`•.", after: ".•´¯`•"),
42 | Transformer(name: "Decoration 36", before: "-漫~*'¨¯¨'*·舞~", after: "~舞*'¨¯¨'*·~漫-"),
43 | Transformer(name: "Decoration 37", before: "¤¸¸.•´¯`•¸¸.•..>>", after: "<<..•.¸¸•´¯`•.¸¸¤"),
44 | Transformer(name: "Decoration 38", before: "๑۞๑,¸¸,ø¤º°`°๑۩", after: "๑۩ ,¸¸,ø¤º°`°๑۞๑"),
45 | Transformer(name: "Decoration 39", before: ".•°¤*(¯`★´¯)*¤°", after: "°¤*(¯´★`¯)*¤°•."),
46 | Transformer(name: "Decoration 40", before: "••.•´¯`•.••", after: "••.•´¯`•.••"),
47 | Transformer(name: "Decoration 41", before: ".o0×X×0o.", after: ".o0×X×0o."),
48 | Transformer(name: "Decoration 42", before: "ıllıllı", after: "ıllıllı"),
49 | Transformer(name: "Decoration 43", before: "▀▄▀▄▀▄", after: "▄▀▄▀▄▀"),
50 | Transformer(name: "Decoration 44", before: "▁ ▂ ▄ ▅ ▆ ▇ █", after: "█ ▇ ▆ ▅ ▄ ▂ ▁"),
51 | Transformer(name: "Decoration 45", before: "▌│█║▌║▌║", after: "║▌║▌║█│▌"),
52 | Transformer(name: "Decoration 46", before: "░▒▓█", after: "█▓▒░"),
53 | Transformer(name: "Decoration 47", before: "░▒▓█►─═", after: "═─◄█▓▒░"),
54 | Transformer(name: "Decoration 48", before: "ஜ۩۞۩ஜ", after: "ஜ۩۞۩ஜ"),
55 | Transformer(name: "Decoration 49", before: "★彡", after: "彡★"),
56 | Transformer(name: "Decoration 50", before: "◦•●◉✿", after: "✿◉●•◦"),
57 | Transformer(name: "Decoration 51", before: "۰۪۫ ۪۫☃۰۪۫ ۪۫ ", after: "۰۪۫ ۪۫☃۰۪۫ ۪۫ "),
58 | Transformer(name: "Decoration 52", before: "✦ ( -_・) ︻デ═一 ▸", after: "(/❛o❛)/ ✦"),
59 | Transformer(name: "Decoration 53", before: "♔ (◐ ε ◑)", after: "(◐ ε ◑) ♔"),
60 | Transformer(name: "Decoration 54", before: "★ 乂❤‿❤乂", after: "乂❤‿❤乂 ★"),
61 | Transformer(name: "Decoration 55", before: "¯\\_(ツ)_/¯", after: "¯\\_(ツ)_/¯"),
62 | Transformer(name: "Decoration 56", before: "♬♪♫", after: "ヾ(*・。・)ノ ♬♪♫"),
63 | Transformer(name: "Decoration 57", before: "꧁꧂ ヽ(⌐■_■)ノ♪♬", after: "♬♪♫ ꧁꧂"),
64 | Transformer(name: "Decoration 58", before: "ƪ(˘⌣˘)┐", after: "┌(˘⌣˘)ʃ"),
65 | Transformer(name: "Decoration 59", before: "( ˘ ³˘)❤", after: "( ˘ ³˘)❤"),
66 | Transformer(name: "Decoration 60", before: "༼ つ ◕_◕ ༽つ", after: "༼ つ ◕_◕ ༽つ"),
67 | Transformer(name: "Decoration 61", before: "ヘ( ^o^)ノ", after: "\(^_^ )"),
68 | Transformer(name: "Decoration 62", before: "(~˘▾˘)~", after: "~(˘▾˘~)"),
69 | Transformer(name: "Decoration 63", before: "└(^o^ )", after: "( ^o^)┘")
70 | ])
71 | ]
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/TypeStyle/Generator/Transformers/StyleTransformers.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | enum StyleTransformers {
4 |
5 | static let inputBase = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"
6 |
7 | static let all: [Transformer.Grouping] = [
8 | (groupName: "All Styles", transformers: [
9 | Transformer(name: "Monospace",
10 | outputBase: "𝙰𝙱𝙲𝙳𝙴𝙵𝙶𝙷𝙸𝙹𝙺𝙻𝙼𝙽𝙾𝙿𝚀𝚁𝚂𝚃𝚄𝚅𝚆𝚇𝚈𝚉𝚊𝚋𝚌𝚍𝚎𝚏𝚐𝚑𝚒𝚓𝚔𝚕𝚖𝚗𝚘𝚙𝚚𝚛𝚜𝚝𝚞𝚟𝚠𝚡𝚢𝚣𝟷𝟸𝟹𝟺𝟻𝟼𝟽𝟾𝟿𝟶"),
11 | Transformer(name: "Fantasy",
12 | outputBase: "ꪖ᥇ᥴᦔꫀᠻᧁꫝ꠸꠹ᛕꪶꪑꪀꪮρꪇ᥅ᦓꪻꪊꪜ᭙᥊ꪗƺꪖ᥇ᥴᦔꫀᠻᧁꫝ꠸꠹ᛕꪶꪑꪀꪮρꪇ᥅ᦓꪻꪊꪜ᭙᥊ꪗƺ᧒ᒿᗱᔰƼᦆᒣᲖၦᦲ"),
13 | Transformer(name: "Reverse",
14 | outputBase: "ɐqɔpǝɟƃɥıɾʞlɯuodbɹsʇnʌʍxʎzɐbɔdǝɟƃɥıɾʞlɯnodbɹsʇnʌʍxʎz1234567890",
15 | reverse: true),
16 | Transformer(name: "Fraktur",
17 | outputBase: "𝔄𝔅ℭ𝔇𝔈𝔉𝔊ℌℑ𝔍𝔎𝔏𝔐𝔑𝔒𝔓𝔔ℜ𝔖𝔗𝔘𝔙𝔚𝔛𝔜ℨ𝔞𝔟𝔠𝔡𝔢𝔣𝔤𝔥𝔦𝔧𝔨𝔩𝔪𝔫𝔬𝔭𝔮𝔯𝔰𝔱𝔲𝔳𝔴𝔵𝔶𝔷յշՅկՏճԴՑգօ"),
18 | Transformer(name: "Bold Fraktur",
19 | outputBase: "𝕬𝕭𝕮𝕯𝕰𝕱𝕲𝕳𝕴𝕵𝕶𝕷𝕸𝕹𝕺𝕻𝕼𝕽𝕾𝕿𝖀𝖁𝖂𝖃𝖄𝖅𝖆𝖇𝖈𝖉𝖊𝖋𝖌𝖍𝖎𝖏𝖐𝖑𝖒𝖓𝖔𝖕𝖖𝖗𝖘𝖙𝖚𝖛𝖜𝖝𝖞𝖟յշՅկՏճԴՑգօ"),
20 | Transformer(name: "Double Struck",
21 | outputBase: "𝔸𝔹ℂ𝔻𝔼𝔽𝔾ℍ𝕀𝕁𝕂𝕃𝕄ℕ𝕆ℙℚℝ𝕊𝕋𝕌𝕍𝕎𝕏𝕐ℤ𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡𝟘"),
22 | Transformer(name: "Small caps",
23 | outputBase: "ᴀʙᴄᴅᴇғɢʜɪᴊᴋʟᴍɴᴏᴘǫʀsᴛᴜᴠᴡxʏᴢᴀʙᴄᴅᴇғɢʜɪᴊᴋʟᴍɴᴏᴘǫʀsᴛᴜᴠᴡxʏᴢ𝟷𝟸𝟹𝟺𝟻𝟼𝟽𝟾𝟿𝟶"),
24 | Transformer(name: "Currency",
25 | outputBase: "₳฿₵ĐɆ₣₲ⱧłJ₭Ⱡ₥₦Ø₱QⱤ₴₮ɄV₩ӾɎⱫ₳฿₵ĐɆ₣₲ⱧłJ₭Ⱡ₥₦Ø₱QⱤ₴₮ɄV₩ӾɎⱫ1234567890"),
26 | Transformer(name: "Antrophobia",
27 | outputBase: "αв¢∂єfgнιנкℓмиσρqяѕтυνωχуzαв¢∂єfgнιנкℓмиσρqяѕтυνωχуz1234567890"),
28 | Transformer(name: "Paranormal",
29 | outputBase: "αвcdєfghíjklmnσpqrstuvwхчzαвcdєfghíjklmnσpqrstuvwхчz1234567890"),
30 | Transformer(name: "Bold Script",
31 | outputBase: "𝓐𝓑𝓒𝓓𝓔𝓕𝓖𝓗𝓘𝓙𝓚𝓛𝓜𝓝𝓞𝓟𝓠𝓡𝓢𝓣𝓤𝓥𝓦𝓧𝓨𝓩𝓪𝓫𝓬𝓭𝓮𝓯𝓰𝓱𝓲𝓳𝓴𝓵𝓶𝓷𝓸𝓹𝓺𝓻𝓼𝓽𝓾𝓿𝔀𝔁𝔂𝔃1234567890"),
32 | Transformer(name: "Hand Writing 1",
33 | outputBase: "𝒜𝐵𝒞𝒟𝐸𝐹𝒢𝐻𝐼𝒥𝒦𝐿𝑀𝒩𝒪𝒫𝒬𝑅𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵𝒶𝒷𝒸𝒹𝑒𝒻𝑔𝒽𝒾𝒿𝓀𝓁𝓂𝓃𝑜𝓅𝓆𝓇𝓈𝓉𝓊𝓋𝓌𝓍𝓎𝓏1234567890"),
34 | Transformer(name: "Hand Writing 2",
35 | outputBase: "ABCDEFGHIJKLMNOPQRSTUVWXYZαႦƈԃҽϝɠԋιʝƙʅɱɳσρϙɾʂƚυʋɯxყȥ1234567890"),
36 | Transformer(name: "Square",
37 | outputBase: "🄰🄱🄲🄳🄴🄵🄶🄷🄸🄹🄺🄻🄼🄽🄾🄿🅀🅁🅂🅃🅄🅅🅆🅇🅈🅉🄰🄱🄲🄳🄴🄵🄶🄷🄸🄹🄺🄻🄼🄽🄾🄿🅀🅁🅂🅃🅄🅅🅆🅇🅈🅉1234567890"),
38 | Transformer(name: "Black square",
39 | outputBase: "🅰🅱🅲🅳🅴🅵🅶🅷🅸🅹🅺🅻🅼🅽🅾🅿🆀🆁🆂🆃🆄🆅🆆🆇🆈🆉🅰🅱🅲🅳🅴🅵🅶🅷🅸🅹🅺🅻🅼🅽🅾🅿🆀🆁🆂🆃🆄🆅🆆🆇🆈🆉1234567890"),
40 | Transformer(name: "Bubble",
41 | outputBase: "ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ①②③④⑤⑥⑦⑧⑨⓪"),
42 | Transformer(name: "Black bubble",
43 | outputBase: "🅐🅑🅒🅓🅔🅕🅖🅗🅘🅙🅚🅛🅜🅝🅞🅟🅠🅡🅢🅣🅤🅥🅦🅧🅨🅩🅐🅑🅒🅓🅔🅕🅖🅗🅘🅙🅚🅛🅜🅝🅞🅟🅠🅡🅢🅣🅤🅥🅦🅧🅨🅩➊➋➌➍➎➏➐➑➒⓿"),
44 | Transformer(name: "Bold",
45 | outputBase: "𝐀𝐁𝐂𝐃𝐄𝐅𝐆𝐇𝐈𝐉𝐊𝐋𝐌𝐍𝐎𝐏𝐐𝐑𝐒𝐓𝐔𝐕𝐖𝐗𝐘𝐙𝐚𝐛𝐜𝐝𝐞𝐟𝐠𝐡𝐢𝐣𝐤𝐥𝐦𝐧𝐨𝐩𝐪𝐫𝐬𝐭𝐮𝐯𝐰𝐱𝐲𝐳𝟏𝟐𝟑𝟒𝟓𝟔𝟕𝟖𝟗𝟎"),
46 | Transformer(name: "Italic",
47 | outputBase: "𝘈𝘉𝘊𝘋𝘌𝘍𝘎𝘏𝘐𝘑𝘒𝘓𝘔𝘕𝘖𝘗𝘘𝘙𝘚𝘛𝘜𝘝𝘞𝘟𝘠𝘡𝘢𝘣𝘤𝘥𝘦𝘧𝘨𝘩𝘪𝘫𝘬𝘭𝘮𝘯𝘰𝘱𝘲𝘳𝘴𝘵𝘶𝘷𝘸𝘹𝘺𝘻1234567890"),
48 | Transformer(name: "Bold Italic",
49 | outputBase: "𝘼𝘽𝘾𝘿𝙀𝙁𝙂𝙃𝙄𝙅𝙆𝙇𝙈𝙉𝙊𝙋𝙌𝙍𝙎𝙏𝙐𝙑𝙒𝙓𝙔𝙕𝙖𝙗𝙘𝙙𝙚𝙛𝙜𝙝𝙞𝙟𝙠𝙡𝙢𝙣𝙤𝙥𝙦𝙧𝙨𝙩𝙪𝙫𝙬𝙭𝙮𝙯1234567890"),
50 | Transformer(name: "Magic",
51 | outputBase: "ᎪbᏟᎠᎬfᎶhᎥjᏦᏞmᏁᎾᏢqᏒsᏆuᏉᎳxᎽᏃᎪbᏟᎠᎬfᎶhᎥjᏦᏞmᏁᎾᏢqᏒsᏆuᏉᎳxᎽᏃ1234567890"),
52 | Transformer(name: "Sorcerer",
53 | outputBase: "ǟɮƈɖɛʄɢɦɨʝӄʟʍռօքզʀֆȶʊʋաӼʏʐǟɮƈɖɛʄɢɦɨʝӄʟʍռօքզʀֆȶʊʋաӼʏʐ1234567890"),
54 | Transformer(name: "Fairy",
55 | outputBase: "ᏗᏰፈᎴᏋᎦᎶᏂᎥᏠᏦᏝᎷᏁᎧᎮᎤᏒᏕᏖᏬᏉᏇጀᎩፚᏗᏰፈᎴᏋᎦᎶᏂᎥᏠᏦᏝᎷᏁᎧᎮᎤᏒᏕᏖᏬᏉᏇጀᎩፚ1234567890"),
56 | Transformer(name: "Invisible Ink",
57 | outputBase: "A҉B҉C҉D҉E҉F҉G҉H҉I҉J҉K҉L҉M҉N҉O҉P҉Q҉R҉S҉T҉U҉V҉W҉X҉Y҉Z҉a҉b҉c҉d҉e҉f҉g҉h҉i҉j҉k҉l҉m҉n҉o҉p҉q҉r҉s҉t҉u҉v҉w҉x҉y҉z҉1҉2҉3҉4҉5҉6҉7҉8҉9҉0҉"),
58 | Transformer(name: "Special",
59 | outputBase: "ᗩᗷᑕᗪEᖴGᕼIᒍKᒪᗰᑎOᑭᑫᖇᔕTᑌᐯᗯ᙭YᘔᗩᗷᑕᗪEᖴGᕼIᒍKᒪᗰᑎOᑭᑫᖇᔕTᑌᐯᗯ᙭Yᘔ1234567890"),
60 | Transformer(name: "Dirty",
61 | outputBase: "ÄḄĊĎỆḞĠḦÏJḲĿṂŃÖṖQŔṨT̈ÜṾẄẌŸẒäḅċďệḟġḧïjḳŀṃńöṗqŕṩẗüṿẅẍÿẓ1234567890"),
62 | Transformer(name: "Knight",
63 | outputBase: "ḀḂḈḊḔḞḠḦḬJḲḶṀṆṎṖQṘṠṮṲṼẆẌẎẒḀḃḉḊḕḟḠḧḭjḲḶṁṆṏṖqṙṠṮṳṼẇẌẏẒ1234567890"),
64 | Transformer(name: "Symbols",
65 | outputBase: "ꍏ♭☾◗€Ϝ❡♄♗♪ϰ↳♔♫⊙ρ☭☈ⓢ☂☋✓ω⌘☿☡ꍏ♭☾◗€Ϝ❡♄♗♪ϰ↳♔♫⊙ρ☭☈ⓢ☂☋✓ω⌘☿☡➊➋➌➍➎➏➐➑➒⓪"),
66 | Transformer(name: "Upside down",
67 | outputBase: "ɐqɔpǝɟƃɥıɾʞlɯuodbɹsʇnʌʍxʎzɐbɔdǝɟƃɥıɾʞlɯnodbɹsʇnʌʍxʎz1234567890"),
68 | Transformer(name: "Rusify",
69 | outputBase: "АБCДЄFGHЇJКГѪЙѲPФЯ$TЦѴШЖЧЗабcдёfgнїjкгѫпѳpфя$тцѵщжчз1234567890k"),
70 | Transformer(name: "Kanjify",
71 | outputBase: "丹日亡句ヨ乍呂廾工勹片し冊几回尸甲尺己卞凵レ山メと乙丹日亡句ヨ乍呂廾工勹片し冊几回尸甲尺己卞凵レ山メと乙亅己ヨ牙与石丁曰彑"),
72 | Transformer(name: "Emoji text",
73 | outputBase: "🅰🅱🌜🌛🎗🎏🌀♓🎐🎷🎋👢〽️🎵⚽🅿️🍳🌱💲🌴⛎✅🔱❎🍸💤🅰🅱🌜🌛🎗🎏🌀♓🎐🎷🎋👢〽️🎵⚽🅿️🍳🌱💲🌴⛎✅🔱❎🍸💤1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣0️⃣"),
74 | Transformer(name: "H4k3r",
75 | outputBase: "48(D3F9H!JK1MN0PQR57UVWXY248(d3f9h!jk1mn0pqr57uvwxy21234567890"),
76 | Transformer(name: "Thin",
77 | outputBase: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"),
78 | Transformer(name: "Tiny",
79 | outputBase: "ABCDEFGHIJKLMNOPQRSTUVWXYZᴀʙᴄᴅᴇғɢʜɪᴊᴋʟᴍɴᴏᴘϙʀꜱᴛᴜᴠᴡxʏᴢ1234567890"),
80 | Transformer(name: "Slash",
81 | outputBase: "A̸B̸C̸D̸E̸F̸G̸H̸I̸J̸K̸L̸M̸N̸O̸P̸Q̸R̸S̸T̸U̸V̸W̸X̸Y̸Z̸a̸b̸c̸d̸e̸f̸g̸h̸i̸j̸k̸l̸m̸n̸o̸p̸q̸r̸s̸t̸u̸v̸w̸x̸y̸z̸1̸2̸3̸4̸5̸6̸7̸8̸9̸0̸"),
82 | Transformer(name: "Strikethrough",
83 | outputBase: "A̶B̶C̶D̶E̶F̶G̶H̶I̶J̶K̶L̶M̶N̶O̶P̶Q̶R̶S̶T̶U̶V̶W̶X̶Y̶Z̶a̶b̶c̶d̶e̶f̶g̶h̶i̶j̶k̶l̶m̶n̶o̶p̶q̶r̶s̶t̶u̶v̶w̶x̶y̶z̶1̶2̶3̶4̶5̶6̶7̶8̶9̶0̶"),
84 | Transformer(name: "Mocking SpongeBob", transform: CustomTransforms.mockingSpongeBob)
85 | ])
86 | ]
87 |
88 | }
89 |
--------------------------------------------------------------------------------
/TypeStyle/Generator/Views/ActionConfirmationView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import SnapKit
3 |
4 | class ActionConfirmationView: UIView {
5 |
6 | enum Style {
7 | case copied
8 | case favorited
9 | case unfavorited
10 | }
11 |
12 | var style: Style = .copied {
13 | didSet {
14 | switch style {
15 | case .copied:
16 | imageView.image = UIImage(systemName: "doc.on.doc")
17 | textLabel.text = "Copied"
18 | case .favorited:
19 | imageView.image = UIImage(systemName: "heart")
20 | textLabel.text = "Favorited"
21 | case .unfavorited:
22 | imageView.image = UIImage(systemName: "heart.slash")
23 | textLabel.text = "Unfavorited"
24 | }
25 | }
26 | }
27 |
28 | let radius = 10.0
29 | let imageView = UIImageView()
30 | let textLabel = UILabel()
31 | let textLabelPadding = 15.0
32 |
33 | override init(frame: CGRect) {
34 | super.init(frame: frame)
35 |
36 | backgroundColor = .appDarkBackground
37 | layer.cornerRadius = radius
38 |
39 | snp.makeConstraints { make in
40 | make.width.equalTo(snp.height)
41 | }
42 |
43 | // Shadow
44 | layer.shadowRadius = 8
45 | layer.shadowOffset = CGSize(width: 0, height: 0)
46 | layer.shadowColor = UIColor.black.cgColor
47 | layer.shadowOpacity = 0.3
48 |
49 | setUpImageView()
50 | setUpTextLabel()
51 | }
52 |
53 | required init?(coder aDecoder: NSCoder) {
54 | fatalError("init(coder:) has not been implemented")
55 | }
56 |
57 | private func setUpImageView() {
58 | imageView.image = UIImage(systemName: "doc.on.doc")
59 | imageView.tintColor = .appText
60 |
61 | addSubview(imageView)
62 |
63 | imageView.snp.makeConstraints { make in
64 | make.width.equalTo(30)
65 | make.height.equalTo(30)
66 | make.centerX.equalToSuperview()
67 | make.centerY.equalToSuperview().offset(-15)
68 | }
69 | }
70 |
71 | private func setUpTextLabel() {
72 | textLabel.text = "Copied"
73 | textLabel.textColor = .appText
74 | textLabel.font = UIFont.preferredFont(forTextStyle: .body)
75 | textLabel.adjustsFontForContentSizeCategory = true
76 |
77 | addSubview(textLabel)
78 |
79 | textLabel.snp.makeConstraints { make in
80 | make.centerX.equalToSuperview()
81 | make.centerY.equalToSuperview().offset(20)
82 | make.leading.equalToSuperview().inset(textLabelPadding)
83 | make.trailing.equalToSuperview().inset(textLabelPadding)
84 | }
85 | }
86 |
87 | }
88 |
--------------------------------------------------------------------------------
/TypeStyle/Generator/Views/InputContainerView.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class InputContainerView: UIView {
4 |
5 | // MARK: - Public properties
6 |
7 | lazy var inputTextView: UITextView = {
8 | let inputTextView = UITextView()
9 |
10 | // Editing
11 | inputTextView.isEditable = true
12 | inputTextView.isScrollEnabled = false
13 |
14 | // Keyboard
15 | inputTextView.keyboardAppearance = .dark
16 |
17 | // Color
18 | inputTextView.textColor = .appText
19 | inputTextView.tintColor = .appText
20 | inputTextView.backgroundColor = .appDarkBackground
21 |
22 | // Font
23 | inputTextView.font = UIFont.preferredFont(forTextStyle: .title2)
24 | inputTextView.adjustsFontForContentSizeCategory = true
25 |
26 | // Shape
27 | inputTextView.layer.cornerRadius = inputTextViewRadius
28 | inputTextView.textContainerInset = UIEdgeInsets(
29 | top: inputTextViewPadding,
30 | left: inputTextViewPadding,
31 | bottom: inputTextViewPadding,
32 | right: inputTextViewPadding
33 | )
34 |
35 | return inputTextView
36 | }()
37 |
38 | lazy var inputTextViewContainer: UIView = {
39 | let inputTextViewContainer = UIView()
40 |
41 | inputTextViewContainer.layer.cornerRadius = inputTextViewRadius
42 | inputTextViewContainer.backgroundColor = .appDarkBackground
43 |
44 | return inputTextViewContainer
45 | }()
46 |
47 | let clearButton: UIButton = {
48 | let clearButton = UIButton()
49 |
50 | clearButton.setTitle("×", for: .normal)
51 | clearButton.titleLabel?.font = UIFont.preferredFont(forTextStyle: .title2)
52 | clearButton.titleLabel?.adjustsFontForContentSizeCategory = true
53 | clearButton.setTitleColor(.appText, for: .normal)
54 | clearButton.isHidden = true
55 |
56 | return clearButton
57 | }()
58 |
59 | // MARK: - Private properties
60 |
61 | private let inputTextViewRadius = 10.0
62 | private let inputTextViewPadding = 15.0
63 | private let inputTextViewMargin = 10.0
64 |
65 | // MARK: - Setup
66 |
67 | override func willMove(toSuperview newSuperview: UIView?) {
68 | super.willMove(toSuperview: newSuperview)
69 |
70 | setUpShadow()
71 | addSubviews()
72 | }
73 |
74 | private func setUpShadow() {
75 | layer.shadowRadius = 8
76 | layer.shadowOffset = CGSize(width: 0, height: 0)
77 | layer.shadowColor = UIColor.black.cgColor
78 | layer.shadowOpacity = 0.3
79 | }
80 |
81 | private func addSubviews() {
82 | addSubview(inputTextViewContainer)
83 |
84 | inputTextViewContainer.snp.makeConstraints { make in
85 | make.edges.equalToSuperview().inset(inputTextViewMargin)
86 | }
87 |
88 | inputTextViewContainer.addSubview(clearButton)
89 |
90 | clearButton.snp.makeConstraints { make in
91 | make.centerY.equalToSuperview()
92 | make.trailing.equalToSuperview().inset(inputTextViewPadding)
93 | }
94 |
95 | inputTextViewContainer.addSubview(inputTextView)
96 |
97 | inputTextView.snp.makeConstraints { make in
98 | make.top.equalToSuperview()
99 | make.leading.equalToSuperview()
100 | make.bottom.equalToSuperview()
101 | make.trailing.equalTo(clearButton.snp.leading)
102 | }
103 | }
104 |
105 | // MARK: - Public methods
106 |
107 | func setTextSize(_ size: UIFont.TextStyle) {
108 | inputTextView.font = UIFont.preferredFont(forTextStyle: size)
109 | }
110 |
111 | }
112 |
--------------------------------------------------------------------------------
/TypeStyle/Generator/Views/OutputTableViewCell.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class OutputTableViewCell: UITableViewCell {
4 |
5 | static let identifier = "OutputTableViewCell"
6 |
7 | let outputLabel = UILabel()
8 | let favoriteImageView = UIImageView()
9 | let padding = 10.0
10 |
11 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
12 | super.init(style: style, reuseIdentifier: reuseIdentifier)
13 |
14 | backgroundColor = .clear
15 |
16 | let selectedView = UIView()
17 | selectedView.backgroundColor = .appSelected
18 | selectedBackgroundView = selectedView
19 |
20 | setUpOutputLabel()
21 | setUpFavoriteImageView()
22 | }
23 |
24 | required init?(coder aDecoder: NSCoder) {
25 | fatalError("init(coder:) has not been implemented")
26 | }
27 |
28 | func setUpOutputLabel() {
29 | outputLabel.textColor = .appText
30 | outputLabel.font = UIFont.preferredFont(forTextStyle: .body)
31 | outputLabel.adjustsFontForContentSizeCategory = true
32 | outputLabel.numberOfLines = 0 // unlimited
33 |
34 | addSubview(outputLabel)
35 |
36 | outputLabel.snp.makeConstraints { make in
37 | make.top.equalToSuperview().inset(padding)
38 | make.leading.equalToSuperview().inset(padding)
39 | make.bottom.equalToSuperview().inset(padding)
40 | }
41 | }
42 |
43 | func setUpFavoriteImageView() {
44 | favoriteImageView.tintColor = .appText
45 | favoriteImageView.setContentCompressionResistancePriority(
46 | UILayoutPriority(rawValue: 10000),
47 | for: .horizontal
48 | )
49 |
50 | addSubview(favoriteImageView)
51 |
52 | favoriteImageView.snp.makeConstraints { make in
53 | make.leading.greaterThanOrEqualTo(outputLabel.snp.trailing).offset(padding)
54 | make.trailing.equalToSuperview().inset(padding)
55 | make.centerY.equalToSuperview()
56 | make.width.equalTo(25)
57 | make.height.equalTo(25)
58 | }
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/TypeStyle/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 | $(MARKETING_VERSION)
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | ITSAppUsesNonExemptEncryption
22 |
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UIStatusBarStyle
32 | UIStatusBarStyleLightContent
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 | UIInterfaceOrientationPortraitUpsideDown
39 |
40 | UISupportedInterfaceOrientations~ipad
41 |
42 | UIInterfaceOrientationPortrait
43 | UIInterfaceOrientationPortraitUpsideDown
44 | UIInterfaceOrientationLandscapeLeft
45 | UIInterfaceOrientationLandscapeRight
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/TypeStyle/TypeStyle.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.network.client
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/TypeStyleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/TypeStyleTests/StyleFactoryTests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | @testable import TypeStyle
3 |
4 | class StyleTransformersTests: XCTestCase {
5 |
6 | func testAllStyles() {
7 | let styles = StyleTransformers.allStyles()
8 |
9 | XCTAssertFalse(styles.isEmpty)
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/media/app-store-badge.svg:
--------------------------------------------------------------------------------
1 |
47 |
--------------------------------------------------------------------------------
/media/iphone-x-screenshots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tapmoko/typestyle/91f0fa067a96072e745f3ef1ac31487560388493/media/iphone-x-screenshots.png
--------------------------------------------------------------------------------