Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SwiftUI Projects

You're reading from   SwiftUI Projects Build six real-world, cross-platform mobile applications using Swift, Xcode 12, and SwiftUI

Arrow left icon
Product type Paperback
Published in Dec 2020
Publisher Packt
ISBN-13 9781839214660
Length 410 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Craig Clayton Craig Clayton
Author Profile Icon Craig Clayton
Craig Clayton
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Chapter 1: SwiftUI Basics 2. Chapter 2: SwiftUI Watch Tour FREE CHAPTER 3. Chapter 3: NBA Draft – Watch App 4. Chapter 4: Car Order Form – Design 5. Chapter 5: Car Order Form – Data 6. Chapter 6: Financial App – Design 7. Chapter 7: Financial App – Core Data 8. Chapter 8: Shoe Point of Sale System – Design 9. Chapter 9: Shoe Point of Sale System – CloudKit 10. Chapter 10: Sports News App – Design 11. Chapter 11: Sports News App – Data 12. Other Books You May Enjoy

Understanding the home view logic

Let's look at our first screen now, the home view. Let's take a look at how we will break down the home view into smaller views:

Figure 6.2

If you look at the preceding screen, you will notice that we have a header at the top, followed by our card view, representing the account we selected. Next, we have our submenu, which contains quick links to other services. Finally, we have basic account information, and this information is based on whether it's a credit card or debit card. Let's get started by opening the starter project.

Home header

You can find the starter project for this chapter in the Chapter06 folder called starter. To get started, open HomeHeaderView. Update the variable previews inside of HomeHeaderView_Previews with the following:

HomeHeaderView()
    .previewLayout(.fixed(width: 600, height: 80))

Now, inside of this file, add the following inside of...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime