Skip to content

SwiftUI practice project using containerRelativeFrame - Cat food shop app (home screen)

Notifications You must be signed in to change notification settings

uhcakip/CatFoodShop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CatFoodShop

Swift 6 Xcode 16 iOS 18

mockup

Overview

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:

Design & Assets

The app uses Catppuccin Mocha theme and product images from Animals Like Us.

Demo

demo

Project Structure

.
└── 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

About

SwiftUI practice project using containerRelativeFrame - Cat food shop app (home screen)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages