How suzuki-0000/skphotobrowser works
Main Components
a. Core Components:
• Photo Browser Controller (SKPhotoBrowser.swift)
• Photo Model Layer (SKPhoto.swift, SKLocalPhoto.swift)
• UI Components Layer
• Caching System
• Animation System
b. Supporting Components:
• Extension Layer
• Configuration Layer
• Delegate System
┌─────────────────────────────────────────────────────┐
• Client Application │
• ┬─────────────────────────┘
┌─────────────────────────────────────────────────────┐
• SKPhotoBrowser │
• ┌───────────────┐ ┌──────────────┐ │
• Configuration │ │ Delegate │ │
• Layer │ │ Protocol │ │
• ┘ └──────────────┘ │
• ┌───────────────┐ ┌──────────────┐ │
• Photo Model │ │ UI │ │
• Layer │◄───│ Components │ │
• ┘ └──────────────┘ │
• ┌───────────────┐ ┌──────────────┐ │
• Cache │ │ Animation │ │
• System │ │ System │ │
• ┘ └──────────────┘ │
• ┌───────────────────────────────────────┐ │
• Extensions Layer │ │
• ┘ │
• ┘
Component Details
a. Core Components (Blue):
• SKPhotoBrowser (Main Controller)
• Photo Models (SKPhoto, SKLocalPhoto)
• UI Components (SKCaptionView, SKToolbar, etc.)
b. Support Systems (Green):
• Cache System (SKCache, SKCacheable)
• Animation System (SKAnimator)
c. Configuration (Yellow):
• SKPhotoBrowserOptions
• SKToolbarOptions
d. Extensions (Gray):
• UIImage extensions
• UIView extensions
Interaction Flows
• Data flow between components
• Initialization sequence
• Photo loading and caching process
• User interaction handling
Technical Details
Important technical aspects:
• Swift 5.4 compatibility
• iOS 9.0+ requirement
• CocoaPods/Carthage support
• Main dependencies
Remember to include version compatibility information and note the key features like zooming, panning, and dismissal gestures as annotations to the relevant components.
This system design will help developers understand the architecture and make it easier to maintain and extend the library.