Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

📱 LabeledContentDemo (SwiftUI)

A modern SwiftUI demo app demonstrating how to build a clean, scalable Profile & Settings screen using LabeledContent, enum-driven data, and iOS 26–ready MapKit APIs.

This project focuses on clean architecture, type safety, and future-proof Apple frameworks.

image

✨ Features

  • Profile screen with avatar and personal details
  • LabeledContent-based Settings UI (iOS 16+)
  • Enum & helper-driven data source (no hardcoded strings)
  • Light / Dark / System theme support
  • Address → Map preview using MapKit (iOS 26 compliant)
  • External links (Website & LinkedIn)
  • Clean MVVM-style SwiftUI architecture

Sample Code to use

LabeledContent {
                Text("john.doe@example.com")
                    .foregroundColor(.blue)
            } label: {
                Label("Email", systemImage: "envelope.fill")
            }

🗂 Project Structure

LabeledContentDemo
├── App
│   ├── Helpers
│   │   ├── AppHelper.swift
│   │   └── AppTheme.swift
│   └── LabeledContentDemoApp.swift
│
├── Model
│   └── UserProfile.swift
│
├── View
│   ├── AddressMapView.swift
│   ├── ContentView.swift
│   ├── OtherInfoSectionView.swift
│   ├── PreferencesSectionView.swift
│   ├── ProfileAvatarView.swift
│   └── ProfileSectionView.swift
│
├── ViewModel
│   └── AddressMapViewModel.swift
│
└── Assets

🧠 Architecture Overview

  • MVVM-inspired SwiftUI architecture
  • Views are fully declarative and data-driven
  • Enums define UI structure for type safety
  • Helpers centralize sample data and app-level logic
  • ViewModels handle business logic and MapKit interaction
  • Address → Map (iOS 26+)
  • Uses MKLocalSearch
  • No deprecated CLGeocoder or placemark
  • Uses MapCameraPosition
  • Fully async and future-proof

🎨 Theme Support

Users can switch between:

  • System
  • Light
  • Dark

Theme preference is stored using @AppStorage and applied globally.


📸 Screenshots

Profile Preferences
image image

Landscape Mode

image image

Screenshots taken on iPhone simulator (Light & Dark mode)


🛠 Requirements

Xcode 16+ iOS 16+ (UI) iOS 26+ (MapKit APIs) SwiftUI

🚀 Getting Started

Clone the repository

Open in Xcode

  • open LabeledContentDemo.xcodeproj Run on Simulator or device

📌 Use Cases

SwiftUI learning reference Interview-ready demo project Profile / Settings screen boilerplate Exploring iOS 26 MapKit changes Medium article companion code

👤 Author

Viswa Bharath |  iOS Developer

📄 License

MIT License. Feel free to use, modify, and learn from this project.

About

A modern SwiftUI demo app demonstrating how to build a clean, scalable Profile & Settings screen using LabeledContent, enum-driven data, and iOS 26–ready MapKit APIs.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages