SwiftUI Tips and Tricks
In the previous chapters, we tried to solve different problems in different recipes, grouping them together within a common theme. However, in this chapter, the recipes are not connected, apart from the fact that they are solutions for real-world problems.
We’ll start by exploring how we can test SwiftUI views using XCTest, which is Apple’s official framework for implementing automated tests.
SwiftUI provides a variety of built-in fonts that we can use in most of our apps but, sometimes, we may want more customization. So, we’ll see how to use custom fonts in SwiftUI.
Sometimes we must show some kind of documentation in the app, so we’ll see how to present Portable Document Format (PDF) documents.
Finally, we’ll implement a Markdown editor that shows an attributed preview while adding text with Markdown tags.
In this chapter, we will cover different topics in SwiftUI and real-world problems that you are...