Skip to content

pugdevgit/MasteringSwiftUI

Repository files navigation

Mastering SwiftUI

A comprehensive collection of SwiftUI examples and tutorials demonstrating various UI components, animations, and design patterns for iOS development.

📋 Overview

This repository contains practical examples and implementations of SwiftUI components, perfect for learning and mastering modern iOS development. The project includes multiple modules showcasing different aspects of SwiftUI, from basic UI elements to advanced animations and custom components.

🎯 Features

Core Components

  • Text Styling - Various text formatting options including custom fonts, markdown support, and 3D transformations
  • Buttons - Comprehensive button examples with custom styles, gradients, shadows, and animations
  • Images - Image handling and manipulation examples
  • Stack Layouts - VStack, HStack, and ZStack usage patterns
  • ScrollView - Scrollable content implementations
  • State & Binding - State management and data binding examples

Advanced Features

  • Custom Button Styles - Reusable button styles with gradient backgrounds and animations
  • Animations - Various animation techniques and effects
  • Path Drawing - Custom path and shape examples
  • Forms - Complete form implementation (SUIForm module)
  • Modals - Modal presentation patterns (SwiftUIModal module)
  • Registration Forms - User registration UI examples
  • Custom Fonts - Integration of custom font files

🏗️ Project Structure

MasteringSwiftUI/
├── MasteringSwiftUI/          # Main application module
│   ├── Animation/             # Animation examples
│   ├── PathExample/           # Custom path drawing
│   ├── RegistrationForm/      # Registration UI
│   ├── RockGroups/            # List examples
│   ├── ButtonsSwiftUI.swift   # Button components
│   ├── ContentView.swift      # Main view
│   ├── ImageView.swift        # Image examples
│   ├── StackUsingView.swift   # Layout examples
│   ├── ScrollViewExamle.swift # Scroll examples
│   └── SUIStateBinding.swift  # State management
├── SUIForm/                   # Form module
└── SwiftUIModal/              # Modal module

🚀 Getting Started

Prerequisites

  • Xcode 14.0 or later
  • iOS 15.0 or later
  • macOS 12.0 or later (for development)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/MasteringSwiftUI.git
  1. Open the project in Xcode:
cd MasteringSwiftUI
open MasteringSwiftUI.xcodeproj
  1. Build and run the project (⌘ + R)

📱 Examples Included

Button Styles

  • Basic buttons with different styles
  • Gradient background buttons
  • Icon buttons with SF Symbols
  • Custom animated buttons
  • iOS 15+ button styles (bordered, prominent)
  • Destructive and cancel button roles

Text Formatting

  • System fonts and custom fonts
  • Text modifiers (weight, color, spacing)
  • 3D transformations and rotations
  • Markdown support
  • Multi-line text with truncation

Custom Components

  • GradientBackgroundStyle - Reusable gradient button style
  • RotatingPlusButton - Animated rotating button
  • Custom color extensions (brightGreen, darkGreen)

🎨 Key Concepts Demonstrated

  • Declarative UI - Building interfaces with SwiftUI's declarative syntax
  • View Composition - Creating complex views from simple components
  • State Management - Using @State, @Binding, and other property wrappers
  • Modifiers - Applying and chaining view modifiers
  • Custom Styles - Creating reusable component styles
  • Animations - Implementing smooth transitions and effects
  • Layout System - Using stacks and frames for responsive layouts

📚 Learning Resources

This project serves as a practical companion for learning SwiftUI. Each file contains well-commented code (in Russian) explaining the purpose and functionality of different components.

🤝 Contributing

Contributions are welcome! Feel free to:

  • Add new examples
  • Improve existing code
  • Fix bugs
  • Enhance documentation

👨‍💻 Author

Created as a learning resource for mastering SwiftUI development.

🔗 Related Topics

  • SwiftUI
  • iOS Development
  • UI/UX Design
  • Mobile Development
  • Swift Programming

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages