This SwiftUI application is a practice project exploring alternative layout approaches. It uses .containerRelativeFrame
modifier as an alternative to GeometryReader
, while replacing Spacer
with .frame
modifier and its alignment
parameter for view positioning. These approaches also enable automatic view proportion adjustments based on screen size while maintaining less code.
For my notes on these layout concepts, check out:
The app uses Catppuccin Mocha theme and product images from Animals Like Us.
.
└── CatFoodShop
├── CatFoodShopApp.swift
├── Components
│ ├── BottomTabView.swift
│ ├── HeaderView.swift
│ └── RootView.swift
├── Extensions
│ └── View+Extension.swift
└── Screens
└── Home
├── Components
│ ├── CategoryTextView.swift
│ ├── OfferProductView.swift
│ └── ProductListView.swift
├── HomeView.swift
└── Models
└── CatFood.swift