How lsj8706/ios-image-compress-poc works
Main Components
A. User Interface Layer
• Main View Controller (ViewController.swift)
• Storyboards (Main.storyboard, LaunchScreen.storyboard)
B. Core Functionality Modules
• Compression Module (Compress folder)
• CompressType.swift (Compression options/configurations)
• ImageCompressor.swift (Main compression logic)
• Resize Module (Resize folder)
• ImageResizer.swift (Image resizing functionality)
C. Utility Layer
• Extensions (Utils folder)
• Data+ extensions
• UIImage+ extensions
• UILabel+ extensions
D. Application Support
• App Delegates
• AppDelegate.swift
• SceneDelegate.swift
┌─────────────────────────────────────┐
• UI Layer │
• (ViewController + Storyboards) │
• ┬───────────────────┘
• ↓
┌─────────────────────────────────────┐
• Core Processing Layer │
• ┐ ┌─────────────────┤
• Compression │ │ Resize │
• Module │ │ Module │
• ┘ └─────────────────┘
• ↑
┌─────────────────────────────────────┐
• Utility Layer │
• (Extensions and Helpers) │
• ┘
Important Elements to Highlight
a) Component Interactions:
• How the ViewController interacts with both Compression and Resize modules
• How the Utility layer supports all upper layers
• Demonstrate the flow of image data through the system
b) Module Responsibilities:
• Compression Module: Handles image compression strategies
• Resize Module: Manages image dimension modifications
• Utils: Provides extension support for core types
Technical Details
• Swift-specific components
• IOS framework dependencies
• Where UIKit integration occurs
• Extension points for future scalability