Автор: Chris Eidhof, Florian Kugler
Издательство: objc
Год: 2023-09-22
Страниц: 152
Язык: английский
Формат: pdf (true), djvu
Размер: 10.2 MB
Updated for iOS 17.
SwiftUI is radically different from UIKit. In this short book, we will help you build a mental model of how SwiftUI works. We explain the most important concepts in detail and help you build a solid foundation for understanding SwiftUI.
Since SwiftUI is a large framework, the book focuses on the concepts behind the framework that we believe are essential to understand. It is not a reference for SwiftUI’s platform-specific APIs, but rather a guide to honing your intuition about how SwiftUI works. Thinking in SwiftUI is geared toward developers who have both prior experience with Apple’s platforms and a good understanding of the Swift language.
When SwiftUI came out, it was a radical departure from UIKit. We wrote the first edition of this book to help you build a mental model of the way SwiftUI works. A few years have passed since then, and we’ve had the opportunity to teach this material to many teams of developers, large and small. During this process, we continued to improve and refine our approach of explaining SwiftUI’s fundamentals based on the feedback from the workshops. This new edition of Thinking in SwiftUI is the result of that journey: we rewrote the entire book from the ground up to be on par with the way we teach SwiftUI in our workshops.
While Apple’s SwiftUI API documentation has improved a lot over the years, we still believe that there’s a need for more conceptual documentation explaining how SwiftUI works. Just as with the first edition, this is still the focus of this book. We hope to facilitate a solid conceptual understanding of SwiftUI so that you can learn about the continuously expanding platform-specific APIs on your own.
We believe that a key aspect of working efficiently with SwiftUI is to understand how the code we write translates into view trees. We cover this aspect in detail in the first chapter, and then we move on to discuss how these view trees are interpreted in terms of state, layout, animations, and more.
While we were wrapping up this edition of the book, WWDC23 took place, and Apple announced a series of new and updated SwiftUI APIs. We added explanations throughout the book for many of the new APIs, but we took care to explicitly mention wherever we use an iOS 17-only API (which also means macOS 14 or any of the other platforms released at the same time).
As we’ve observed many times in our workshops, the best way to learn SwiftUI is by writing code yourself. This book cannot replace that, but it aims to be a helpful companion. We encourage you to regularly put what you’ve learned from this book into practice. Nothing will make your insights stick better than experimenting with them and seeing for yourself how things work.
Contents:
Скачать Thinking in SwiftUI, 2nd Edition